File tree Expand file tree Collapse file tree 3 files changed +29
-2
lines changed
src/BootstrapBlazor.Server Expand file tree Collapse file tree 3 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 33// See the LICENSE file in the project root for more information.
44// Maintainer: Argo Zhang([email protected] ) Website: https://www.blazor.zone 55
6+ using Longbow . SerialPorts ;
67using Microsoft . AspNetCore . Components . Routing ;
78
89namespace BootstrapBlazor . Server . Extensions ;
@@ -97,6 +98,13 @@ public static List<MenuItem> GenerateMenus(this IStringLocalizer<NavMenu> Locali
9798 } ;
9899 AddModbus ( item ) ;
99100
101+ item = new DemoMenuItem ( )
102+ {
103+ Text = Localizer [ "SerialPortComponents" ] ,
104+ Icon = "fa-fw fa-solid fa-satellite-dish text-danger"
105+ } ;
106+ AddSerialPort ( item ) ;
107+
100108 item = new DemoMenuItem ( )
101109 {
102110 Text = Localizer [ "Services" ] ,
@@ -266,6 +274,21 @@ void AddModbus(DemoMenuItem item)
266274 AddBadge ( item , count : 2 ) ;
267275 }
268276
277+ void AddSerialPort ( DemoMenuItem item )
278+ {
279+ item . Items = new List < DemoMenuItem >
280+ {
281+ new ( )
282+ {
283+ IsNew = true ,
284+ Text = Localizer [ "SerialPortFactory" ] ,
285+ Url = "serial-port-factory"
286+ }
287+ } ;
288+
289+ AddBadge ( item , count : 2 ) ;
290+ }
291+
269292 void AddQuickStar ( DemoMenuItem item )
270293 {
271294 item . Items = new List < DemoMenuItem >
Original file line number Diff line number Diff line change 48624862 "SocketAutoConnect": "Reconnect",
48634863 "SocketDataEntity": "DataEntity",
48644864 "ModbusComponents": "Modbus Services",
4865+ "SerialPortComponents": "SerialPort Services",
48654866 "ModbusFactory": "IModbusFactory",
4867+ "SerialPortFactory": "ISerialPortFactory",
48664868 "NetworkMonitor": "Network Monitor",
48674869 "Toolbar": "Toolbar",
48684870 "OpcDaService": "OpcDaServer",
Original file line number Diff line number Diff line change 48604860 "SocketManualReceive": "手动接收数据",
48614861 "DataPackageAdapter": "数据适配器",
48624862 "SocketAutoConnect": "自动重连",
4863- "SocketDataEntity": "通讯数据转实体类 ",
4863+ "SocketDataEntity": "通信数据转实体类 ",
48644864 "ModbusComponents": "串行通信协议 Modbus",
4865- "ModbusFactory": "通讯服务 IModbusFactory",
4865+ "SerialPortComponents": "串行通信协议 SerialPort",
4866+ "ModbusFactory": "通信服务 IModbusFactory",
4867+ "SerialPortFactory": "通信服务 ISerialPortFactory",
48664868 "NetworkMonitor": "网络状态 NetworkMonitor",
48674869 "Toolbar": "工具栏 Toolbar",
48684870 "OpcDaService": "OpcDaServer 服务",
You can’t perform that action at this time.
0 commit comments