| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using HDL_ON.DAL; |
| | | using HDL_ON.DAL.Net; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON.Entity |
| | |
| | | public DB_ResidenceData() |
| | | { |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 主人token |
| | | /// </summary> |
| | | public string MasterToken; |
| | | /// <summary> |
| | | /// 0:bus网关 |
| | | /// 1:A协议网关 |
| | |
| | | } |
| | | else |
| | | { |
| | | var curRegion = MainPage.LoginUser.regionList.Find((obj) => obj.RegionID == CurReginID); |
| | | var curRegion = UserInfo.Current.regionList.Find((obj) => obj.RegionID == CurReginID); |
| | | //if (curRegion == null) |
| | | //{ |
| | | // CurReginID = MainPage.LoginUser.regionList[0].RegionID; |
| | | // return MainPage.LoginUser.regionList[0]; |
| | | // CurReginID = UserInfo.Current.regionList[0].RegionID; |
| | | // return UserInfo.Current.regionList[0]; |
| | | //} |
| | | return curRegion; |
| | | } |
| | |
| | | ins_Function = null; |
| | | if (MainPage.IsRemote) |
| | | { |
| | | Mqtt_Cloud.DisConnectRemoteMqttClient("退出登录,或者切换住宅"); |
| | | DAL.Mqtt.MqttClient.DisConnectRemote("退出登录,或者切换住宅"); |
| | | } |
| | | } |
| | | |
| | |
| | | /// <summary> |
| | | /// 当前住宅的网关MAC |
| | | /// </summary> |
| | | public string residenceGatewayMAC = "0281B9078C000000";// "00964E19C4467B1E"; |
| | | public string residenceGatewayMAC = "4E47323347591243";//"0281B9078C000000";// "00964E19C4467B1E"; |
| | | /// <summary> |
| | | /// 保存住宅数据 |
| | | /// </summary> |
| | |
| | | case FunctionCategory.Thermostat: |
| | | if (DB_ResidenceData.residenceData.GatewayType == 0) |
| | | { |
| | | DriverLayer.Control.ins.SendReadCommand(function); |
| | | DriverLayer.Control.Ins.SendReadCommand(function); |
| | | } |
| | | break; |
| | | } |