| | |
| | | if (mode == GetNameMode.SpecialGateway && localWay.getGwInfo != null)
|
| | | {
|
| | | string keyName = Common.LocalDevice.deviceModelIdName + this.GetGwInfoAttribute(localWay, "LinuxImageType").ToString();
|
| | | if (Common.LocalDevice.Current.dicDeviceDefultNameID.ContainsKey(keyName) == true)
|
| | | if (LocalDevice.Current.dicDeviceAllNameID.ContainsKey(keyName) == true)
|
| | | {
|
| | | //没有名称时,则使用R文件里面设置的东西
|
| | | return Language.StringByID(Common.LocalDevice.Current.dicDeviceDefultNameID[keyName]);
|
| | | //没有名称时,则使用R文件里面设置的默认设备名称
|
| | | return Language.StringByID(LocalDevice.Current.dicDeviceAllNameID[keyName] + 20000);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | if (zbGateway.getGwInfo != null && zbGateway.getGwInfo.LinuxImageType != 0)
|
| | | {
|
| | | string keyName = Common.LocalDevice.deviceModelIdName + zbGateway.getGwInfo.LinuxImageType;
|
| | | if (Common.LocalDevice.Current.dicDeviceDefultNameID.ContainsKey(keyName) == true)
|
| | | if (Common.LocalDevice.Current.dicDeviceAllNameID.ContainsKey(keyName) == true)
|
| | | {
|
| | | //使用R文件里面设置的东西
|
| | | button.TextID = LocalDevice.Current.dicDeviceDefultNameID[keyName];
|
| | | button.TextID = LocalDevice.Current.dicDeviceAllNameID[keyName];
|
| | | }
|
| | | }
|
| | | else
|
| | |
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | string keyName = Common.LocalDevice.deviceModelIdName + zbGateway.getGwInfo.LinuxImageType;
|
| | | if (Common.LocalDevice.Current.dicDeviceDefultNameID.ContainsKey(keyName) == true)
|
| | | if (Common.LocalDevice.Current.dicDeviceAllNameID.ContainsKey(keyName) == true)
|
| | | {
|
| | | //使用R文件里面设置的东西
|
| | | button.TextID = LocalDevice.Current.dicDeviceDefultNameID[keyName];
|
| | | button.TextID = LocalDevice.Current.dicDeviceAllNameID[keyName];
|
| | | }
|
| | | });
|
| | | }
|
| | |
| | | else
|
| | | {
|
| | | string keyName = Common.LocalDevice.deviceModelIdName + this.dicGateway[gwId].getGwInfo.LinuxImageType;
|
| | | if (Common.LocalDevice.Current.dicDeviceDefultNameID.ContainsKey(keyName) == true)
|
| | | if (Common.LocalDevice.Current.dicDeviceAllNameID.ContainsKey(keyName) == true)
|
| | | {
|
| | | //使用R文件里面设置的东西
|
| | | button.TextID = Common.LocalDevice.Current.dicDeviceDefultNameID[keyName];
|
| | | button.TextID = Common.LocalDevice.Current.dicDeviceAllNameID[keyName];
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 网关房间相关_______________________
|
| | |
|
| | | /// <summary>
|
| | | /// 获取网关所在的房间
|
| | | /// </summary>
|
| | | /// <param name="zbGateway">网关对象</param>
|
| | | /// <returns></returns>
|
| | | public Room GetRoomByGateway(ZbGateway zbGateway)
|
| | | {
|
| | | var gatewayId = this.GetGatewayId(zbGateway);
|
| | | return this.GetRoomByGateway(gatewayId);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 获取网关所在的房间
|
| | | /// </summary>
|
| | | /// <param name="gatewayId">网关ID</param>
|
| | | /// <returns></returns>
|
| | | public Room GetRoomByGateway(string gatewayId)
|
| | | {
|
| | | var localGateway = this.GetLocalGateway(gatewayId);
|
| | | if (localGateway == null)
|
| | | {
|
| | | return null;
|
| | | }
|
| | | return HdlRoomLogic.Current.GetRoomById(localGateway.RoomId);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 变更网关房间
|
| | | /// </summary>
|
| | | /// <param name="zbGateway">网关对象</param>
|
| | | /// <param name="roomId">房间ID</param>
|
| | | public void ChangedGatewayRoom(ZbGateway zbGateway, string roomId)
|
| | | {
|
| | | var gatewayId = this.GetGatewayId(zbGateway);
|
| | | var localGateway = this.GetLocalGateway(gatewayId);
|
| | | if (localGateway != null)
|
| | | {
|
| | | localGateway.RoomId = roomId;
|
| | | localGateway.ReSave();
|
| | | //添加备份
|
| | | HdlAutoBackupLogic.AddOrEditorFile(localGateway.FilePath);
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 清空真实网关列表___________________
|
| | |
|
| | | /// <summary>
|