| | |
| | | /// <summary> |
| | | /// 版本号 |
| | | /// </summary> |
| | | public static string CodeIDString = "1.0.20051301"; |
| | | public static string CodeIDString = "1.0.20051801"; |
| | | /// <summary> |
| | | /// 注册来源(0:HDL On 1:Zigbee) |
| | | /// </summary> |
| | |
| | | /// <returns></returns>
|
| | | public bool DeviceIsCanFixedPosition(CommonDevice device)
|
| | | {
|
| | | if (device.Type == DeviceType.DoorLock)
|
| | | if (device.Type == DeviceType.DoorLock || device.Type == DeviceType.PMSensor)
|
| | | {
|
| | | //门锁没有定位功能
|
| | | return false;
|
| | |
| | | this.dicDeviceRoomId[listDevice[0].DeviceAddr] = roomId;
|
| | | save = true;
|
| | | }
|
| | | else
|
| | | {
|
| | | //2020.05.18追加:如果记录的房间ID是不存在的话,则重新覆盖
|
| | | var room = HdlRoomLogic.Current.GetRoomById(this.dicDeviceRoomId[listDevice[0].DeviceAddr]);
|
| | | if (room == null)
|
| | | {
|
| | | this.dicDeviceRoomId[listDevice[0].DeviceAddr] = roomId;
|
| | | save = true;
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (save == true)
|
| | |
| | | HdlAutoBackupLogic.AddOrEditorFile(DirNameResourse.DeviceRoomIdFile);
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 根据房间ID,移除指定的真实物理设备的所属房间记录
|
| | | /// </summary>
|
| | | /// <param name="i_RoomId"></param>
|
| | | public void DeleteRealDeviceByRoomId(string i_RoomId)
|
| | | {
|
| | | var listDeleteKey = new List<string>();
|
| | | foreach (var deviceAddr in this.dicDeviceRoomId.Keys)
|
| | | {
|
| | | if (this.dicDeviceRoomId[deviceAddr] == i_RoomId
|
| | | && listDeleteKey.Contains(deviceAddr) == false)
|
| | | {
|
| | | listDeleteKey.Add(deviceAddr);
|
| | | }
|
| | | }
|
| | | //将真实物理设备从房间中移除
|
| | | this.DeleteRealDeviceFromRoom(listDeleteKey);
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 设备排序___________________________
|
| | |
| | | { |
| | | continue; |
| | | } |
| | | Common.Logic.LockLogicList.Add(listlogic[j]); |
| | | Common.Logic.LockLogicList.Add(logic); |
| | | //bool yes = false; |
| | | //for (int a = 0; a < logic.Accounts.Count; a++) |
| | | //{ |
| | | // //Option4是设备mac;Option2是设备端口; |
| | | // if (logic.Accounts[a]["Option4"].ToString() != Send.CurrentDoorLock.DeviceAddr && logic.Accounts[a]["Option2"].ToString() != Send.CurrentDoorLock.DeviceEpoint.ToString()) |
| | | // if (logic.Accounts[a]["Option4"].ToString() != Send.CurrentDoorLock.DeviceAddr) |
| | | // { |
| | | // //查找是否是那个门锁; |
| | | // //如果不是该门锁联动事件不显示出来; |
| | | // yes = false; |
| | | |
| | | // } |
| | | // else |
| | | // { |
| | | // yes = true; |
| | | |
| | | // } |
| | | // //if (logic.Accounts[a]["Account"].ToString() == Config.Instance.Guid) |
| | | // //{ |
| | |
| | | /// <returns></returns> |
| | | private bool Exist(Common.Logic logic) |
| | | { |
| | | bool yes = false; |
| | | for (int j = 0; j < logic.Accounts.Count; j++) |
| | | { |
| | | //Option4是设备mac;Option2是设备端口; |
| | | if (logic.Accounts[j]["Option4"].ToString() != Send.CurrentDoorLock.DeviceAddr && logic.Accounts[j]["Option2"].ToString() != Send.CurrentDoorLock.DeviceEpoint.ToString()) |
| | | if (logic.Accounts[j]["Option4"].ToString() == Send.CurrentDoorLock.DeviceAddr) |
| | | { |
| | | //查找是否是那个门锁; |
| | | //如果不是该门锁联动事件不显示出来; |
| | | yes = false; |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | yes = true; |
| | | } |
| | | //if (logic.Accounts[j]["Account"].ToString() == Config.Instance.Guid) |
| | | //{ |
| | | // //查找自己账号下的创建联动事件; |
| | | // yes = true; |
| | | // break; |
| | | //} |
| | | |
| | | } |
| | | return yes; |
| | | return false; |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | if (LogicView.IfString._SoneLogic == if_logic) |
| | | { |
| | | //Sone门锁联动事件逻辑列表 |
| | | //Sone门锁常开模式逻辑列表 |
| | | Common.Logic.SoneLogicList.Add(CurrentLogic); |
| | | |
| | | } |
old mode 100644
new mode 100755
| | |
| | | return await System.Threading.Tasks.Task.Run(async () => |
| | | { |
| | | List<int> logicIdList = new List<int>(); |
| | | |
| | | Action<string, string> action = (topic, data) => |
| | | { |
| | | var gatewayID = topic.Split('/')[0]; |
| | |
| | | { |
| | | return; |
| | | } |
| | | |
| | | |
| | | if (topic == $"{gatewayID}/Logic/GetLogicList_Respon") |
| | | { |
| | | |
| | |
| | | { |
| | | var logicId = int.Parse(listIfon["LogicId"].ToString()); |
| | | logicIdList.Add(logicId); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | case 8: |
| | | { |
| | | var accounts1 = new JObject(); |
| | | if (dictionary.ContainsKey("Type")) |
| | | { |
| | | accounts1.Add("Type", dictionary["Type"]); |
| | | } |
| | | if (dictionary.ContainsKey("Option4")) |
| | | { |
| | | accounts1.Add("Option4", dictionary["Option4"]); |
| | |
| | | accounts.Add(accounts1); |
| | | } |
| | | break; |
| | | |
| | | } |
| | | |
| | | } |
old mode 100644
new mode 100755
| | |
| | | timeConditionsInfo.Add("DelayTime", "0"); |
| | | timeConditionsInfo.Add("StartHour", h); |
| | | timeConditionsInfo.Add("StartMin", m); |
| | | timeConditionsInfo.Add("DoorLockOpenDelayTime", timeVlaue.ToString()); |
| | | timeConditionsInfo.Add("DoorLockOpenDelayTime", (timeVlaue*60*60).ToString()); |
| | | //timeConditionsInfo.Add("DoorLockOpenDelayTime", (timeVlaue * 3600).ToString()); |
| | | Dictionary<string, object> actionsInfo = new Dictionary<string, object>(); |
| | | actionsInfo.Add("LinkType", 8); |
| | | actionsInfo.Add("DeviceAddr", common.DeviceAddr); |
| | | actionsInfo.Add("Epoint", common.DeviceEpoint); |
| | | actionsInfo.Add("Epoint", "200"); |
| | | actionsInfo.Add("PassData", "055704010113");//默认门锁常关 |
| | | |
| | | Dictionary<string, string> accounts = new Dictionary<string, string>(); |
| | |
| | | /// <returns></returns> |
| | | public static bool ExistLogic(Common.Logic logic, ZigBee.Device.DoorLock doorLock) |
| | | { |
| | | bool yes = false; |
| | | for (int j = 0; j < logic.Accounts.Count; j++) |
| | | { |
| | | //Option4是设备mac;Option2是设备端口; |
| | | if (logic.Accounts[j]["Option4"].ToString() != doorLock.DeviceAddr && logic.Accounts[j]["Option2"].ToString() != doorLock.DeviceEpoint.ToString()) |
| | | if (logic.Accounts[j]["Option4"].ToString() == doorLock.DeviceAddr) |
| | | { |
| | | //查找是否是那个门锁; |
| | | //如果不是该门锁联动事件不显示出来; |
| | | yes = false; |
| | | return true; |
| | | } |
| | | else |
| | | { |
| | | yes = true; |
| | | } |
| | | |
| | | } |
| | | return yes; |
| | | return false; |
| | | } |
| | | |
| | | } |
old mode 100644
new mode 100755
| | |
| | | |
| | | } |
| | | /// 给徐梅刷新界面用的 |
| | | public Action<bool> action; |
| | | public Action<bool> action; |
| | | ///第二块第一级父控件 |
| | | FrameLayout fLayout = new FrameLayout(); |
| | | ///第三块第一级父控件 |
| | |
| | | /// 记录选中时间 |
| | | /// </summary> |
| | | public int timeValue = 0; |
| | | /// <summary> |
| | | /// 标记显示执行日期(用网关的,还是用系统的时间) |
| | | /// </summary> |
| | | public bool _if = false; |
| | | /// <summary> |
| | | /// 时间戳 |
| | | /// </summary> |
| | | public int timeLong = 0; |
| | | public async void Show() |
| | | { |
| | | |
| | | |
| | | #region 界面的布局代码 |
| | | UserView.HomePage.Instance.ScrollEnabled = false;//锁住左滑 |
| | | TopView view = new TopView(); |
| | |
| | | this.AddChidren(middle); |
| | | #endregion |
| | | //是常开模式再去读取 |
| | | |
| | | if (Send.CurrentDoorLock.IsDoorLockNormallyMode) |
| | | { |
| | | //进来更新一次 |
| | | //查找是否存在时效性自动化;有的话就返回自动化对象; |
| | | var logic = await SkipView.GetLogicIfon(Send.CurrentDoorLock); |
| | | var logic = await SkipView.GetLogicIfon(Send.CurrentDoorLock); |
| | | if (logic != null) |
| | | { |
| | | try |
| | |
| | | //进来更新一次值 |
| | | logicId = logic.LogicId; |
| | | timeValue = int.Parse(logic.Conditions[0]["DoorLockOpenDelayTime"]); |
| | | timeLong = int.Parse(logic.Conditions[0]["TriggerTime"]); |
| | | |
| | | } |
| | | catch { } |
| | | } |
| | |
| | | BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor, |
| | | }; |
| | | middle.AddChidren(fLayout); |
| | | ModeView(); |
| | | #endregion |
| | | #region 常开自动化 |
| | | ///第三块第一级父控件 |
| | |
| | | }; |
| | | middle.AddChidren(listLogicFl); |
| | | listLogicFl.SetCornerWithSameRadius(Application.GetRealHeight(58), HDLUtils.RectCornerTopLeft); |
| | | |
| | | ModeView(); |
| | | ///添加常开自动化的父控件 |
| | | var addLogicfL = new FrameLayout |
| | | { |
| | |
| | | actionsInfo.Add("DeviceAddr", Send.CurrentDoorLock.DeviceAddr); |
| | | actionsInfo.Add("Epoint", "200"); |
| | | actionsInfo.Add("PassData", "055704010113");//默认门锁常关
|
| | | Dictionary<string, string> accounts = new Dictionary<string, string>(); |
| | | accounts.Add("Type", "8");
|
| | | Dictionary<string, string> accounts = new Dictionary<string, string>();
|
| | | accounts.Add("Type", "8"); |
| | | accounts.Add("Option4", Send.CurrentDoorLock.DeviceAddr.ToString());//用于判断识别是哪个门锁;
|
| | | accounts.Add("Option2", Send.CurrentDoorLock.DeviceEpoint.ToString()); |
| | | //new一个新逻辑对象; |
| | |
| | | /// <summary> |
| | | /// 常开模式开关切换图标界面 |
| | | /// </summary> |
| | | public void ModeView() |
| | | public void ModeView() |
| | | { |
| | | |
| | | fLayout.RemoveAll(); |
| | |
| | | Send.DelLogic(logicId); |
| | | } |
| | | Send.CurrentDoorLock.IsDoorLockNormallyMode = false; |
| | | _if = false; |
| | | ModeView(); |
| | | } |
| | | else |
| | |
| | | var timeTextBtn = new Button |
| | | { |
| | | Y = Application.GetRealHeight(127 + 69), |
| | | X = Application.GetRealWidth(125), |
| | | Width = Application.GetRealWidth(634 + 200), |
| | | X = Application.GetRealWidth(86),//125 |
| | | Width = Application.GetRealWidth(907),//634 + 200 |
| | | Height = Application.GetRealHeight(60), |
| | | TextSize = 15, |
| | | TextColor = ZigbeeColor.Current.LogicTextBlackColor, |
| | |
| | | if (logicId != 0) |
| | | { |
| | | openModeFl.AddChidren(timeTextBtn); |
| | | ///有时效性常开才显示时间条件文本 |
| | | var y = DateTime.Now.Year.ToString();//那一年 |
| | | var m = DateTime.Now.Month.ToString();//那一月 |
| | | var d = DateTime.Now.ToString("dd");//那一天 |
| | | var h = int.Parse(DateTime.Now.ToString("HH"));//当前系统时间 |
| | | int dayInt = (h + timeValue) / 24;//算出几天后执行 |
| | | int hour = (h + timeValue) % 24;//算出几天后那个时间执行 |
| | | int days = int.Parse(d) + dayInt; |
| | | string text1 = Language.StringByID(MyInternationalizationString.timeSensitive); |
| | | string text2 = Language.StringByID(MyInternationalizationString.yearSone); |
| | | string text3 = Language.StringByID(MyInternationalizationString.monthSone); |
| | | string text4 = Language.StringByID(MyInternationalizationString.numberSone); |
| | | string text5 = Language.StringByID(MyInternationalizationString.executeSone); |
| | | timeTextBtn.Text = text1 + y + text2 + m + text3 + days.ToString() + text4 + hour.ToString() + text5; |
| | | string text5 = Language.StringByID(MyInternationalizationString.hour1); |
| | | string text6 = Language.StringByID(MyInternationalizationString.executeSone); |
| | | if (_if) |
| | | { |
| | | |
| | | ///第一次进来读取网关时间; |
| | | var datetime = GetLocalTime(timeLong); |
| | | ///有时效性常开才显示时间条件文本 |
| | | var y = datetime.Year.ToString();//那一年 |
| | | var m = datetime.Month.ToString();//那一月 |
| | | var d = datetime.ToString("dd");//那一天 |
| | | var h = int.Parse(datetime.ToString("HH"));//小时 |
| | | int minute = datetime.Minute;//分钟 |
| | | timeTextBtn.Text = text1 + y + text2 + m + text3 + d + text4 + h + text5 + minute.ToString() + text6; |
| | | |
| | | } |
| | | else |
| | | { |
| | | |
| | | ///有时效性常开才显示时间条件文本 |
| | | var y = DateTime.Now.Year.ToString();//那一年 |
| | | var m = DateTime.Now.Month.ToString();//那一月 |
| | | var d = DateTime.Now.ToString("dd");//那一天 |
| | | var h = int.Parse(DateTime.Now.ToString("HH"));//小时 |
| | | int dayInt = (h + timeValue) / 24;//算出几天后执行 |
| | | int hour = (h + timeValue) % 24;//算出几天后那个时间执行 |
| | | int days = int.Parse(d) + dayInt; |
| | | int minute = DateTime.Now.Minute;//分钟 |
| | | timeTextBtn.Text = text1 + y + text2 + m + text3 + days.ToString() + text4 + hour.ToString() + text5 + minute.ToString() + text6; |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | |
| | | LogicView.TipView.ShowConfrimTip(() => |
| | | |
| | | {///再次确认 |
| | | LogicView.TipView.ShowInputTip(true, async (str) => |
| | | {///确认发送命令 |
| | | CommonPage.Loading.Start(); |
| | | try |
| | | { |
| | | ///xm |
| | | var result = await UserCenter.DoorLock.DoorLockCommonInfo.SetNormallyOpenModeFuncAsync(Send.CurrentDoorLock); |
| | | if (!result) |
| | | { |
| | | LogicView.TipView.ShowFlashTip(Language.StringByID(MyInternationalizationString.openFailed)); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | ///因为有常开模式下才可以创建失效逻辑; |
| | | SkipView.GetLogicAll(Send.CurrentDoorLock);//删除之前所有失效逻辑 |
| | | var addResult = await SkipView.LockAddModifyLogic(int.Parse(str), Send.CurrentDoorLock);//添加一条失效逻辑 |
| | | if (addResult == 0) |
| | | { |
| | | ///可欣说如果常开模式开,创建自动化失败,那么将要发一条常开模式关闭命令; |
| | | UserCenter.DoorLock.DoorLockCommonInfo.DelNormallyOpenMode(Send.CurrentDoorLock); |
| | | ///提示失败 |
| | | LogicView.TipView.ShowFlashTip(Language.StringByID(MyInternationalizationString.addFailed)); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | logicId = addResult; |
| | | timeValue = int.Parse(str); |
| | | Send.CurrentDoorLock.IsDoorLockNormallyMode = true; |
| | | ModeView();
|
| | | ///添加APP开启常开模式的历史记录
|
| | | UserCenter.HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(Send.CurrentDoorLock,9001,string.Empty); |
| | | } |
| | | LogicView.TipView.ShowInputTip(true, async (str) => |
| | | {///确认发送命令 |
| | | CommonPage.Loading.Start(); |
| | | try |
| | | { |
| | | ///xm |
| | | var result = await UserCenter.DoorLock.DoorLockCommonInfo.SetNormallyOpenModeFuncAsync(Send.CurrentDoorLock); |
| | | if (!result) |
| | | { |
| | | LogicView.TipView.ShowFlashTip(Language.StringByID(MyInternationalizationString.openFailed)); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | ///因为有常开模式下才可以创建失效逻辑; |
| | | SkipView.GetLogicAll(Send.CurrentDoorLock);//删除之前所有失效逻辑 |
| | | var addResult = await SkipView.LockAddModifyLogic(int.Parse(str), Send.CurrentDoorLock);//添加一条失效逻辑 |
| | | if (addResult == 0) |
| | | { |
| | | ///可欣说如果常开模式开,创建自动化失败,那么将要发一条常开模式关闭命令; |
| | | UserCenter.DoorLock.DoorLockCommonInfo.DelNormallyOpenMode(Send.CurrentDoorLock); |
| | | ///提示失败 |
| | | LogicView.TipView.ShowFlashTip(Language.StringByID(MyInternationalizationString.addFailed)); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | logicId = addResult; |
| | | timeValue = int.Parse(str); |
| | | Send.CurrentDoorLock.IsDoorLockNormallyMode = true; |
| | | _if = false; |
| | | ModeView();
|
| | | ///添加APP开启常开模式的历史记录
|
| | | UserCenter.HdlDeviceDoorLockLogic.Current.AddDoorHistoryLog(Send.CurrentDoorLock, 9001, string.Empty); |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | catch |
| | | { |
| | | } |
| | | } |
| | | catch |
| | | { |
| | | |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | } |
| | | finally |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | |
| | | }); |
| | | } |
| | | }); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | }); |
| | | |
| | |
| | | listLogicFl.Height = Application.GetRealHeight(Method.H - 184) - fLayout.Height; |
| | | listLogicFl.Width = Application.GetRealWidth(1022); |
| | | listLogicFl.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor; |
| | | |
| | | verticalRefresh.Y = Application.GetRealHeight(187); |
| | | verticalRefresh.X = Application.GetRealWidth(46); |
| | | verticalRefresh.Height = listLogicFl.Height - Application.GetRealHeight(187);//动态改动上下滑动view高度; |
| | | verticalRefresh.Width = listLogicFl.Width - Application.GetRealWidth(46); |
| | | } |
| | | /// <summary> |
| | | /// 读取自动化列表数据; |
| | | /// </summary> |
| | | /// <param name="yes"></param> |
| | | private async void Read( bool yes) |
| | | private async void Read(bool yes) |
| | | { |
| | | if (yes) |
| | | { |
| | |
| | | { |
| | | continue; |
| | | }
|
| | | if (SkipView.ExistLogic(logic,Send.CurrentDoorLock))
|
| | | if (SkipView.ExistLogic(logic, Send.CurrentDoorLock))
|
| | | {
|
| | | Common.Logic.SoneLogicList.Add(logic);
|
| | | } |
| | |
| | | verticalRefresh.RemoveAll(); |
| | | foreach (var logic in Common.Logic.SoneLogicList) |
| | | { |
| | | if (!SkipView.ExistLogic(logic, Send.CurrentDoorLock)) |
| | | { |
| | | continue; |
| | | } |
| | | #region 自动化布局View |
| | | ///自动化父控件 |
| | | var fLayoutLogic = new FrameLayout |
| | |
| | | TextColor = ZigbeeColor.Current.LogicBtnSaveTextColor, |
| | | }; |
| | | logicRow.AddRightView(edit); |
| | | |
| | | |
| | | ///删除 |
| | | var del = new Button |
| | | { |
| | |
| | | else |
| | | { |
| | | //逻辑关 |
| | | logic.IsEnable = 0; |
| | | typeIconBtn.UnSelectedImagePath = "ZigeeLogic/nofunction.png"; |
| | | typeBjBtn.BackgroundColor = ZigbeeColor.Current.LogicMiddleBackgroundColor; |
| | | } |
| | |
| | | };
|
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 将UNIX时间戳转换成系统时间(精确到秒) |
| | | /// <returns></returns> |
| | | public DateTime GetLocalTime(int unixTimeStamp) |
| | | { |
| | | DateTime dtStart = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1)); |
| | | long lTime = long.Parse(unixTimeStamp + "0000000"); |
| | | TimeSpan toNow = new TimeSpan(lTime); |
| | | DateTime dtResult = dtStart.Add(toNow); |
| | | return dtResult; |
| | | } |
| | | } |
| | | } |
| | |
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 设置PM2.5传感器状态文本(不需要指定【当前两个字】)
|
| | | /// </summary>
|
| | | /// <param name="text"></param>
|
| | | public void SetPmTwoPointFiveStatuText(string text)
|
| | | {
|
| | | this.btnStatu.Text = text;
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 重新设置设备名字控件和状态控件的Y轴
|
| | | /// </summary>
|
| | | /// <param name="i_NameY">设备名字控件的Y轴(真实值)</param>
|
| | |
| | | /// </summary> |
| | | public class DevicePmSensorDetailCardForm : DeviceDetailCardCommonForm |
| | | { |
| | | #region ■ 变量声明___________________________ |
| | | #region ■ 变量声明___________________________
|
| | | /// <summary>
|
| | | /// 界面上可以操作的控件
|
| | | /// </summary>
|
| | |
| | | this.pMSensor = (PMSensor)this.device; |
| | | //先清空 |
| | | this.listControl = new List<ButtonBase>(); |
| | | InitFreshAirControl(frameWhiteBack); |
| | | InitPmControl(frameWhiteBack); |
| | | UpdateStatus(); |
| | | } |
| | | |
| | |
| | | /// 初始化PM2.5传感器控件
|
| | | /// </summary>
|
| | | /// <param name="frameWhiteBack"></param>
|
| | | private void InitFreshAirControl(FrameLayout frameWhiteBack)
|
| | | private void InitPmControl(FrameLayout frameWhiteBack)
|
| | | { |
| | | //湿度容器 |
| | | var frameHumidityPic = new FrameLayout(); |
| | |
| | | var btnHumidityStatus = new NormalViewControl(193, 92, true);
|
| | | btnHumidityStatus.Y = Application.GetRealHeight(181); |
| | | btnHumidityStatus.Text = "20"; |
| | | btnHumidityStatus.TextSize = 32; |
| | | btnHumidityStatus.TextSize = 30; |
| | | btnHumidityStatus.TextColor = ZigbeeColor.Current.XMWhite; |
| | | btnHumidityStatus.TextAlignment = TextAlignment.CenterRight; |
| | | frameHumidityPic.AddChidren(btnHumidityStatus); |
| | |
| | | //湿度单位 |
| | | var btnHumidityUnit = new NormalViewControl(37 + 81, 40, true);
|
| | | btnHumidityUnit.Y = Application.GetRealHeight(181 + 46); |
| | | btnHumidityUnit.X = Application.GetRealWidth(190); |
| | | btnHumidityUnit.X = Application.GetRealWidth(180); |
| | | btnHumidityUnit.Text = "%"; |
| | | btnHumidityUnit.TextSize = 14; |
| | | btnHumidityUnit.TextColor = ZigbeeColor.Current.XMWhite; |
| | |
| | | var btnTemperatureStatus = new NormalViewControl(193, 92, true);
|
| | | btnTemperatureStatus.Y = Application.GetRealHeight(181); |
| | | btnTemperatureStatus.Text = "20"; |
| | | btnTemperatureStatus.TextSize = 32; |
| | | btnTemperatureStatus.TextSize = 30; |
| | | btnTemperatureStatus.TextColor = ZigbeeColor.Current.XMWhite; |
| | | btnTemperatureStatus.TextAlignment = TextAlignment.CenterRight; |
| | | frameTemperaturePic.AddChidren(btnTemperatureStatus); |
| | |
| | | //温度单位 |
| | | var btnTemperatureUnit = new NormalViewControl(40 + 81, 40, true);
|
| | | btnTemperatureUnit.Y = Application.GetRealHeight(181 + 46); |
| | | btnTemperatureUnit.X = Application.GetRealWidth(188); |
| | | btnTemperatureUnit.X = Application.GetRealWidth(180); |
| | | btnTemperatureUnit.Text = "℃"; |
| | | btnTemperatureUnit.TextSize = 14; |
| | | btnTemperatureUnit.TextColor = ZigbeeColor.Current.XMWhite; |
| | |
| | | framePmPic.AddChidren(btnPmText); |
| | | |
| | | //PM2.5数据(第3个,listControl【2】) |
| | | var btnPmStatus = new NormalViewControl(109 + 40, 92, true);
|
| | | var btnPmStatus = new NormalViewControl(162, 92, true);
|
| | | btnPmStatus.Y = Application.GetRealHeight(181); |
| | | btnPmStatus.Text = "35"; |
| | | btnPmStatus.TextSize = 32; |
| | | btnPmStatus.Text = "155"; |
| | | btnPmStatus.TextSize = 30; |
| | | btnPmStatus.TextColor = ZigbeeColor.Current.XMWhite; |
| | | btnPmStatus.TextAlignment = TextAlignment.CenterRight; |
| | | framePmPic.AddChidren(btnPmStatus); |
| | | this.listControl.Add(btnPmStatus); |
| | | |
| | | //PM2.5单位 |
| | | var btnPmUnit = new NormalViewControl(124 + 15, 43, true);
|
| | | //PM2.5单位 (第4个,listControl【3】) |
| | | var btnPmUnit = new NormalViewControl(120 + 26, 43, true);
|
| | | btnPmUnit.Y = Application.GetRealHeight(181 + 46); |
| | | btnPmUnit.X = Application.GetRealWidth(150); |
| | | btnPmUnit.X = Application.GetRealWidth(153); |
| | | btnPmUnit.Text = "μg/m³"; |
| | | btnPmUnit.TextSize = 14; |
| | | btnPmUnit.TextColor = ZigbeeColor.Current.XMWhite; |
| | | btnPmUnit.TextAlignment = TextAlignment.CenterLeft; |
| | | framePmPic.AddChidren(btnPmUnit); |
| | | this.listControl.Add(btnPmUnit); |
| | | } |
| | | #endregion |
| | | #endregion |
| | | |
| | | #region ■ 是否获取网关反馈的结果_____________
|
| | | |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region ■ 设置方法 |
| | | /// <summary> |
| | | ///命令 |
| | | ///0:Off |
| | | ///1:Low |
| | | ///3:High |
| | | ///4:On |
| | | ///5:Auto |
| | | /// 15:Manual |
| | | /// </summary> |
| | | private void SetFanComand(int command)
|
| | | {
|
| | | //检测是否获取网关反馈的结果,如果网关没有回复,则会弹出消息
|
| | | this.StartCheckResponeResult(this.listControl, (result) =>
|
| | | {
|
| | | //接收到网关回复
|
| | | if (result == true)
|
| | | { |
| | | }
|
| | | }); |
| | | |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | #region ■ 刷新状态_____________ |
| | | /// <summary> |
| | | /// 刷新状态 |
| | |
| | | this.listControl[0].Text = pMSensor.currentTemperature.ToString(); |
| | | this.listControl[1].Text = pMSensor.currentHumidity.ToString(); |
| | | this.listControl[2].Text = pMSensor.currentPmData.ToString(); |
| | | //设置状态文字 |
| | | this.SetStatuText(Language.StringByID(R.MyInternationalizationString.uOpen1)); |
| | | //设置状态文字 |
| | | var curText = Language.StringByID(R.MyInternationalizationString.AirQuality) + QuailityType(); |
| | | this.SetStatuText(curText); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 质量等级 |
| | | /// </summary> |
| | | private string QuailityType() |
| | | { |
| | | string curQuality = string.Empty; |
| | | |
| | | if (pMSensor.currentPmData <= 35 && pMSensor.currentPmData >= 0) |
| | | { |
| | | curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality); |
| | | |
| | | if (pMSensor.currentPmData < 10) |
| | | { |
| | | this.listControl[2].Width = Application.GetRealWidth(188 - 70); |
| | | this.listControl[3].X = Application.GetRealWidth(180 - 70); |
| | | } |
| | | else |
| | | { |
| | | this.listControl[2].Width = Application.GetRealWidth(193 - 40); |
| | | this.listControl[3].X = Application.GetRealWidth(137); |
| | | } |
| | | } |
| | | |
| | | else if (pMSensor.currentPmData <= 75 && pMSensor.currentPmData > 35) |
| | | { |
| | | curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality); |
| | | this.listControl[2].Width = Application.GetRealWidth(193 - 40); |
| | | this.listControl[3].X = Application.GetRealWidth(137); |
| | | } |
| | | else if (pMSensor.currentPmData <= 115 && pMSensor.currentPmData > 75) |
| | | { |
| | | curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality); |
| | | |
| | | if (pMSensor.currentPmData < 100) |
| | | { |
| | | this.listControl[2].Width = Application.GetRealWidth(193 - 40); |
| | | this.listControl[3].X = Application.GetRealWidth(137); |
| | | } |
| | | else |
| | | { |
| | | this.listControl[2].Width = Application.GetRealWidth(162); |
| | | this.listControl[3].X = Application.GetRealWidth(153); |
| | | } |
| | | } |
| | | else if (pMSensor.currentPmData <= 150 && pMSensor.currentPmData > 115) |
| | | { |
| | | curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality); |
| | | this.listControl[2].Width = Application.GetRealWidth(162); |
| | | this.listControl[3].X = Application.GetRealWidth(153); |
| | | } |
| | | else if (pMSensor.currentPmData <= 250 && pMSensor.currentPmData > 150) |
| | | { |
| | | curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality); |
| | | this.listControl[2].Width = Application.GetRealWidth(162); |
| | | this.listControl[3].X = Application.GetRealWidth(153); |
| | | } |
| | | else if (pMSensor.currentPmData > 250) |
| | | { |
| | | curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality); |
| | | this.listControl[2].Width = Application.GetRealWidth(162); |
| | | this.listControl[3].X = Application.GetRealWidth(153); |
| | | } |
| | | else |
| | | { |
| | | curQuality = ""; |
| | | this.listControl[2].Width = Application.GetRealWidth(162); |
| | | this.listControl[3].X = Application.GetRealWidth(153); |
| | | } |
| | | //设置状态文字 |
| | | return curQuality; |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | |
|
| | | #endregion |
| | | |
| | | #region ■ PM2.5_______________________________
|
| | | /// <summary>
|
| | | /// SendPmSensorComand
|
| | | /// </summary>
|
| | | /// <param name="device">设备</param>
|
| | | public void SendPmSensorComand(CommonDevice device)
|
| | | {
|
| | | if (device == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | new System.Threading.Thread(() =>
|
| | | {
|
| | | SendPmSensorStatuComand(device);
|
| | | //读取Pm2.5传感器的温度数据
|
| | | HdlDeviceAttributeLogic.Current.SendTemperatureStatuComand(device);
|
| | | //读取Pm2.5传感器的湿度数据
|
| | | HdlDeviceAttributeLogic.Current.SendHumidityStatuComand(device);
|
| | | System.Threading.Thread.Sleep(300);
|
| | | })
|
| | | { IsBackground = true }.Start();
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// SendFanStatuComand
|
| | | /// </summary>
|
| | | /// <param name="device">设备</param>
|
| | | private void SendPmSensorStatuComand(CommonDevice device)
|
| | | {
|
| | | if (device == null)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var jObject = new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "DeviceAddr",device.DeviceAddr },
|
| | | { "Epoint", device.DeviceEpoint },
|
| | | { "Cluster_ID", (int)Cluster_ID.PmTwoPointFiveMeasurement },
|
| | | { "Command", 108 }
|
| | | };
|
| | | var attriBute = new Newtonsoft.Json.Linq.JArray
|
| | | {
|
| | | new Newtonsoft.Json.Linq.JObject
|
| | | {
|
| | | { "AttriButeId", (int)AttriButeId.MeasuredValue}
|
| | | }
|
| | | };
|
| | | var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } };
|
| | | jObject.Add("Data", data);
|
| | | device.Gateway?.Send("GetDeviceStatus", jObject.ToString());
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 窗帘_______________________________ |
| | | /// <summary>
|
| | | /// 发送获取窗帘状态命令
|
| | |
| | | }
|
| | | return $"{wind}";
|
| | | }
|
| | | else if (device.Type == DeviceType.PMSensor)
|
| | | {
|
| | | //在网关没有回复之前,默认离线
|
| | | if (device.HadReadDeviceStatu == false)
|
| | | {
|
| | | return Language.StringByID(R.MyInternationalizationString.uOffLine);
|
| | | }
|
| | | //空气质量
|
| | | string curQuality = "";
|
| | | //温度
|
| | | string temperature = string.Empty;
|
| | | //湿度
|
| | | string humidity = string.Empty;
|
| | | //PM2.5
|
| | | string pm = string.Empty;
|
| | | var pMSensor = device as PMSensor;
|
| | | if (pMSensor.currentPmData <= 35 && pMSensor.currentPmData >= 0)
|
| | | {
|
| | | curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
|
| | | }
|
| | | else if (pMSensor.currentPmData <= 75 && pMSensor.currentPmData > 35)
|
| | | {
|
| | | curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
|
| | | }
|
| | | else if (pMSensor.currentPmData <= 115 && pMSensor.currentPmData > 75)
|
| | | {
|
| | | curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
|
| | | }
|
| | | else if (pMSensor.currentPmData <= 150 && pMSensor.currentPmData > 115)
|
| | | {
|
| | | curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
|
| | | }
|
| | | else if (pMSensor.currentPmData <= 250 && pMSensor.currentPmData > 150)
|
| | | {
|
| | | curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
|
| | | }
|
| | | else if (pMSensor.currentPmData > 250)
|
| | | {
|
| | | curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality);
|
| | | }
|
| | | else
|
| | | {
|
| | | curQuality = "--";
|
| | | }
|
| | |
|
| | | humidity = $"{pMSensor.currentHumidity}%";
|
| | | temperature = $"{pMSensor.currentTemperature}℃";
|
| | | pm = $"{pMSensor.currentPmData}μg/m³";
|
| | | return $"{curQuality},{pm},{temperature},{humidity}";
|
| | |
|
| | | }
|
| | | else if (device.Type == DeviceType.Thermostat)
|
| | | {
|
| | | //在网关没有回复之前,默认离线
|
| | |
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region ■ PM2.5数据
|
| | | //PM2.5数据
|
| | | else if (report.DeviceStatusReport.CluterID == 1066)
|
| | | {
|
| | | foreach (var attData in report.DeviceStatusReport.AttriBute)
|
| | | {
|
| | | //PM2.5
|
| | | if (attData.AttributeId == (int)AttriButeId.MeasuredValue)
|
| | | {
|
| | |
|
| | | if (attData.AttriButeDataType == 57)
|
| | | {
|
| | | ((PMSensor)locadevice).currentPmData = attData.AttriButeData;
|
| | | }
|
| | | }
|
| | | //已经接收到状态
|
| | | locadevice.HadReadDeviceStatu = true;
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | |
|
| | | this.DeviceReportPush(report, ReceiveComandDiv.A设备属性上报);
|
| | |
| | | Global.DeleteFilebyHomeId(roomFilePath);
|
| | | }
|
| | | HdlAutoBackupLogic.DeleteFile(roomFilePath);
|
| | |
|
| | | //根据房间ID,移除指定的真实物理设备的所属房间记录
|
| | | Common.LocalDevice.Current.DeleteRealDeviceByRoomId(roomId);
|
| | |
|
| | | //刷新房间视图列表
|
| | | this.RefreshRoomListView();
|
| | | }
|
| | |
| | | /// <returns></returns>
|
| | | public string GetZoneById(int sceneId)
|
| | | {
|
| | | var room =HdlRoomLogic.Current.GetRoomBySceneId(sceneId);
|
| | | var room = HdlRoomLogic.Current.GetRoomBySceneId(sceneId);
|
| | | if (room == null)
|
| | | {
|
| | | return null;
|
| | | }
|
| | | var floorName = Shared.Common.Config.Instance.Home.GetFloorNameById(room.FloorId);
|
| | | if (floorName == null)
|
| | | //更改代码:如果floorName=“”也要判断,否则有“,”
|
| | | if (string.IsNullOrEmpty(floorName))
|
| | | {
|
| | | return room.Name;
|
| | | }
|
| | |
| | | continue; |
| | | } |
| | | roomTempList.Add(room); |
| | | if (roomTempList.Count != 0) |
| | | { |
| | | curRoom = roomTempList[0]; |
| | | } |
| | | } |
| | | |
| | | for (int i = 0; i < roomTempList.Count; i++) |
| | | { |
| | | var room = roomTempList[i]; |
| | | curRoom = roomTempList[0]; |
| | | |
| | | var btnRoomFrameLayout = new FrameLayout |
| | | { |
| | |
| | | curentOldRoom = btnRoom; |
| | | curentOldRoomFrameLayout = btnRoomFrameLayout; |
| | | } |
| | | if (index == roomTempList.Count - 1 && index > 3) |
| | | { |
| | | var btnRoomFrameLayoutEmpty = new FrameLayout |
| | | { |
| | | Height = Application.GetMinReal(159), |
| | | Width = Application.GetMinReal(50), |
| | | Y = Application.GetRealHeight(23), |
| | | X = Application.GetRealWidth(5), |
| | | BorderWidth = 1, |
| | | }; |
| | | btnHorizontalScrolViewLayout.AddChidren(btnRoomFrameLayoutEmpty); |
| | | } |
| | | EventHandler<MouseEventArgs> eHandlerRoom = (sender, e) => |
| | | { |
| | | if (!btnRoom.IsSelected) |
| | |
| | | { |
| | | roomTempList.Add(room); |
| | | } |
| | | if (roomTempList.Count != 0) |
| | | { |
| | | curRoom = roomTempList[0]; |
| | | } |
| | | |
| | | } |
| | | for (int i = 0; i < roomTempList.Count; i++) |
| | | { |
| | | var room = roomTempList[i]; |
| | | curRoom = roomTempList[0]; |
| | | var btnRoomFrameLayout = new FrameLayout |
| | | { |
| | | Height = Application.GetMinReal(159), |
| | |
| | | curentOldRoom = btnRoom; |
| | | curentOldRoomFrameLayout = btnRoomFrameLayout; |
| | | } |
| | | |
| | | if (index == roomTempList.Count - 1 && index > 3) |
| | | { |
| | | var btnRoomFrameLayoutEmpty = new FrameLayout |
| | | { |
| | | Height = Application.GetMinReal(159), |
| | | Width = Application.GetMinReal(50), |
| | | Y = Application.GetRealHeight(23), |
| | | X = Application.GetRealWidth(5), |
| | | BorderWidth = 1, |
| | | }; |
| | | btnHorizontalScrolViewLayout.AddChidren(btnRoomFrameLayoutEmpty); |
| | | } |
| | | |
| | | EventHandler<MouseEventArgs> eHandlerRoom = (sender, e) => |
| | | { |
| | | if (!btnRoom.IsSelected) |
| | |
| | | if (typeModeList == null) |
| | | { |
| | | //再次动态获取按键支持的大类 |
| | | CommonPage.Loading.Start(); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Start(); |
| | | }); |
| | | typeModeList = await GetTypeMode(); |
| | | if (typeModeList == null) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | CommonPage.Loading.Hide(); |
| | | dialog.Close(); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | } |
| | | } |
| | | |
| | |
| | |
|
| | | frameColor.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new PanelColorSelectForm();
|
| | | form.AddForm(R1, G1, B1);
|
| | | form.FinishSelectColorEvent += (Rcolor, Gcolor, Bcolor) =>
|
| | | {
|
| | | R1 = Rcolor;
|
| | | G1 = Gcolor;
|
| | | B1 = Bcolor;
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | btnColorView.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | btnColor.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | btnColorLine.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | btnRight.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | }
|
| | |
|
| | | this.keyColorData.CloseColorR = Convert.ToString(Rcolor, 16);
|
| | | this.keyColorData.CloseColorG = Convert.ToString(Gcolor, 16);
|
| | | this.keyColorData.CloseColorB = Convert.ToString(Bcolor, 16);
|
| | | /// <summary>
|
| | | /// PanelColorBefore
|
| | | /// </summary>
|
| | | private void PanelColor(NormalViewControl btnColor, SeekBarControl seekBar1, int R1, int G1, int B1)
|
| | | {
|
| | | var form = new PanelColorSelectForm();
|
| | | form.AddForm(R1, G1, B1);
|
| | | form.FinishSelectColorEvent += (Rcolor, Gcolor, Bcolor) =>
|
| | | {
|
| | | R1 = Rcolor;
|
| | | G1 = Gcolor;
|
| | | B1 = Bcolor;
|
| | |
|
| | | btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor);
|
| | | //变更滑动条的颜色
|
| | | seekBar1.ProgressBarColor = btnColor.BackgroundColor;
|
| | | };
|
| | | this.keyColorData.CloseColorR = Convert.ToString(Rcolor, 16);
|
| | | this.keyColorData.CloseColorG = Convert.ToString(Gcolor, 16);
|
| | | this.keyColorData.CloseColorB = Convert.ToString(Bcolor, 16);
|
| | |
|
| | | btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor);
|
| | | //变更滑动条的颜色
|
| | | seekBar1.ProgressBarColor = btnColor.BackgroundColor;
|
| | | };
|
| | | }
|
| | |
|
| | |
| | |
|
| | | frameColor.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var form = new PanelColorSelectForm();
|
| | | form.AddForm(R1, G1, B1);
|
| | | form.FinishSelectColorEvent += (Rcolor, Gcolor, Bcolor) =>
|
| | | {
|
| | | R1 = Rcolor;
|
| | | G1 = Gcolor;
|
| | | B1 = Bcolor;
|
| | |
|
| | | this.keyColorData.OpenColorR = Convert.ToString(Rcolor, 16);
|
| | | this.keyColorData.OpenColorG = Convert.ToString(Gcolor, 16);
|
| | | this.keyColorData.OpenColorB = Convert.ToString(Bcolor, 16);
|
| | |
|
| | | btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor);
|
| | | //变更滑动条的颜色
|
| | | seekBar1.ProgressBarColor = btnColor.BackgroundColor;
|
| | | };
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | btnColorView.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | btnColor.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | btnColorLine.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | btnRight.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | PanelColor(btnColor, seekBar1, R1, G1, B1);
|
| | | };
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 获取初始数据_______________________
|
| | |
| | | /// 被绑目标是PM2.5 |
| | | /// </summary> |
| | | private CommonDevice bindPMDev; |
| | | // <summary> |
| | | /// 按键中被绑定的目标列表 |
| | | /// </summary> |
| | | public List<BindObj.BindListResponseObj> bindList = new List<BindObj.BindListResponseObj>(); |
| | | |
| | | #endregion |
| | | |
| | |
| | | var panelBindListRes = await curControlDev.GetDeviceBindAsync(); |
| | | if (panelBindListRes != null && panelBindListRes.getAllBindResponseData != null) |
| | | { |
| | | foreach (var bDev in panelBindListRes.getAllBindResponseData.BindList) |
| | | bindList = panelBindListRes.getAllBindResponseData.BindList; |
| | | foreach (var bDev in bindList) |
| | | { |
| | | curControlDev.bindList.Add(bDev); |
| | | var device = Common.LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint); |
| | | |
| | | if (device.Type == DeviceType.FreshAir) |
| | |
| | | { |
| | | continue; |
| | | } |
| | | bindFreshAirName = device.DeviceEpointName; |
| | | if (string.IsNullOrEmpty(bDev.ESName)) |
| | | { |
| | | bindFreshAirName = device.DeviceEpointName; |
| | | } |
| | | else |
| | | { |
| | | bindFreshAirName = bDev.ESName; |
| | | } |
| | | |
| | | bindFreshAirDev = device; |
| | | } |
| | | if (device.Type == DeviceType.TemperatureSensor) |
| | |
| | | var bD = device as TemperatureSensor; |
| | | if (bD.SensorDiv == 1) |
| | | { |
| | | bindTemperatureName = device.DeviceEpointName; |
| | | if (string.IsNullOrEmpty(bDev.ESName)) |
| | | { |
| | | bindTemperatureName = device.DeviceEpointName; |
| | | } |
| | | else |
| | | { |
| | | bindTemperatureName = bDev.ESName; |
| | | } |
| | | bindTemperatureDev = device; |
| | | } |
| | | if (bD.SensorDiv == 2) |
| | | { |
| | | bindHumidityName = device.DeviceEpointName; |
| | | if (string.IsNullOrEmpty(bDev.ESName)) |
| | | { |
| | | bindHumidityName = device.DeviceEpointName; |
| | | } |
| | | else |
| | | { |
| | | bindHumidityName = bDev.ESName; |
| | | } |
| | | |
| | | bindHumidityDev = device; |
| | | } |
| | | } |
| | | if (device.Type == DeviceType.FreshAirHumiditySensor) |
| | | { |
| | | bindHumidityName = device.DeviceEpointName; |
| | | if (string.IsNullOrEmpty(bDev.ESName)) |
| | | { |
| | | bindHumidityName = device.DeviceEpointName; |
| | | } |
| | | else |
| | | { |
| | | bindHumidityName = bDev.ESName; |
| | | } |
| | | |
| | | bindHumidityDev = device; |
| | | } |
| | | if (device.Type == DeviceType.PMSensor) |
| | | { |
| | | bindPmName = device.DeviceEpointName; |
| | | bindPMDev = device; |
| | | if (bDev.BindCluster == 1026) |
| | | { |
| | | bindTemperatureName = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor); |
| | | bindTemperatureDev = device; |
| | | } |
| | | if (bDev.BindCluster == 1029) |
| | | { |
| | | bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor); |
| | | bindHumidityDev = device; |
| | | } |
| | | if (bDev.BindCluster == 1066) |
| | | { |
| | | if (string.IsNullOrEmpty(bDev.ESName)) |
| | | { |
| | | bindPmName = device.DeviceEpointName; |
| | | } |
| | | else |
| | | { |
| | | bindPmName = bDev.ESName; |
| | | } |
| | | |
| | | bindPMDev = device; |
| | | } |
| | | } |
| | | } |
| | | result = true; |
| | |
| | | /// PM绑定目标回调 |
| | | /// </summary> |
| | | public Action<string> actionPMTarget = null; |
| | | /// <summary> |
| | | /// 是否能点击保存按钮 |
| | | /// </summary> |
| | | private bool canSave = true; |
| | | |
| | | #endregion |
| | | |
| | | #region UI设计 |
| | |
| | | } |
| | | } |
| | | |
| | | if (index == roomTempList.Count - 1 && index > 3) |
| | | { |
| | | var btnRoomFrameLayoutEmpty = new FrameLayout |
| | | { |
| | | Height = Application.GetMinReal(159), |
| | | Width = Application.GetMinReal(50), |
| | | Y = Application.GetRealHeight(23), |
| | | X = Application.GetRealWidth(5), |
| | | BorderWidth = 1, |
| | | }; |
| | | btnHorizontalScrolViewLayout.AddChidren(btnRoomFrameLayoutEmpty); |
| | | } |
| | | |
| | | EventHandler<MouseEventArgs> eHandlerRoom = (sender, e) => |
| | | { |
| | | if (!btnRoom.IsSelected) |
| | |
| | | break; |
| | | case 2: |
| | | devicePic.UnSelectedImagePath = "Device/SensorTemperature.png"; |
| | | if (device.Type == DeviceType.PMSensor) |
| | | { |
| | | btnBindName.Text = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor); |
| | | } |
| | | break; |
| | | case 3: |
| | | devicePic.UnSelectedImagePath = "Device/SensorHumidity.png"; |
| | | if (device.Type == DeviceType.PMSensor) |
| | | { |
| | | btnBindName.Text = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor); |
| | | } |
| | | break; |
| | | case 4: |
| | | devicePic.UnSelectedImagePath = "Device/FreshAirEpoint.png"; |
| | | devicePic.UnSelectedImagePath = "Device/AirQualitySensorEpoint.png"; |
| | | break; |
| | | } |
| | | #endregion |
| | |
| | | //获取所有房间中匹配的能绑的目标 |
| | | currentPanelSupportBindDeviceList = GetAllRoomSupportDeviceList(); |
| | | |
| | | //获取面板中存在的绑定目标 |
| | | //获取面板中存在的绑定目标 |
| | | var panelBindListRes = await this.curControlDev.GetDeviceBindAsync(); |
| | | if (panelBindListRes != null && panelBindListRes.getAllBindResponseData != null) |
| | | { |
| | |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(Common.CommonPage.Instance); |
| | | }); |
| | | } |
| | | |
| | | targetList.Clear(); |
| | | //选中目标列表 targetList |
| | | if (currentPanelSupportBindDeviceList.Count != 0 && curControlDev.bindList.Count != 0) |
| | | { |
| | | foreach (var bindDev in currentPanelSupportBindDeviceList) |
| | | foreach (var bindDev in curControlDev.bindList) |
| | | { |
| | | var mainKey = bindDev.DeviceAddr + bindDev.DeviceEpoint; |
| | | var dev = curControlDev.bindList.Find(obj => (obj != null) && (obj.BindMacAddr + obj.BindEpoint == mainKey)); |
| | | var mainKey = bindDev.BindMacAddr + bindDev.BindEpoint; |
| | | var dev = currentPanelSupportBindDeviceList.Find(obj => (obj != null) && (obj.DeviceAddr + obj.DeviceEpoint == mainKey)); |
| | | if (dev != null) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(bindDev.DeviceAddr, bindDev.DeviceEpoint); |
| | | var device = LocalDevice.Current.GetDevice(dev.DeviceAddr, dev.DeviceEpoint); |
| | | if (device != null) |
| | | { |
| | | switch (curDeviceBindType) |
| | |
| | | oldTargetList.Add(device); |
| | | } |
| | | } |
| | | if (device.Type == DeviceType.PMSensor) |
| | | { |
| | | if (bindDev.BindCluster == 1026) |
| | | { |
| | | targetList.Add(device); |
| | | oldTargetList.Add(device); |
| | | } |
| | | } |
| | | break; |
| | | case 3: |
| | | if (device.Type == DeviceType.TemperatureSensor) |
| | |
| | | targetList.Add(device); |
| | | oldTargetList.Add(device); |
| | | } |
| | | if (device.Type == DeviceType.PMSensor) |
| | | { |
| | | if (bindDev.BindCluster == 1029) |
| | | { |
| | | targetList.Add(device); |
| | | oldTargetList.Add(device); |
| | | } |
| | | } |
| | | break; |
| | | case 4: |
| | | //PM2.5 |
| | | if (device.Type == DeviceType.PMSensor) |
| | | { |
| | | if (bindDev.BindCluster == 1066) |
| | | { |
| | | targetList.Add(device); |
| | | oldTargetList.Add(device); |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | |
| | |
| | | break; |
| | | case 4: |
| | | //PM2.5 |
| | | removeDevice.BindCluster = 1066; |
| | | break; |
| | | } |
| | | removeDevice.BindMacAddr = bd.DeviceAddr; |
| | |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | this.RemoveFromParent(); |
| | | }); |
| | | |
| | | } |
| | | else |
| | | { |
| | |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.OperrateFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | } |
| | |
| | | var delDevice = DelBindDevice(bd); |
| | | var delResult = new DelDeviceBindResponseAllData(); |
| | | delResult = await curControlDev.DelDeviceBindAsync(delDevice); |
| | | if (delResult == null || delResult.removeBindResultResponseData == null) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | return; |
| | | } |
| | | if (delResult != null && delResult.removeBindResultResponseData != null) |
| | | { |
| | | if (delResult.removeBindResultResponseData.Result != 0) |
| | |
| | | var delDevice = DelBindDevice(curBindDevice); |
| | | var delResult = new DelDeviceBindResponseAllData(); |
| | | delResult = await curControlDev.DelDeviceBindAsync(delDevice); |
| | | if (delResult == null || delResult.removeBindResultResponseData == null) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.BindFailed), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); |
| | | btnFinifh.Enable = true; |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | return; |
| | | } |
| | | if (delResult != null && delResult.removeBindResultResponseData != null) |
| | | { |
| | | if (delResult.removeBindResultResponseData.Result != 0) |
| | |
| | | break; |
| | | case 4: |
| | | //PM2.5 |
| | | addBindInfo.BindCluster = 1066; |
| | | break; |
| | | } |
| | | addBindInfo.BindType = 0; |
| | | addBindInfo.BindMacAddr = de.DeviceAddr; |
| | | addBindInfo.BindEpoint = de.DeviceEpoint; |
| | | addBindeDev.BindName = de.DeviceEpointName; |
| | | switch (curDeviceBindType) |
| | | { |
| | | case 2: |
| | | if (de.Type == DeviceType.PMSensor) |
| | | { |
| | | addBindeDev.BindName = Common.LocalDevice.Current.GetDeviceEpointName(de) + "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor); |
| | | } |
| | | break; |
| | | case 3: |
| | | if (de.Type == DeviceType.PMSensor) |
| | | { |
| | | addBindeDev.BindName = Common.LocalDevice.Current.GetDeviceEpointName(de) + "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor); |
| | | } |
| | | break; |
| | | } |
| | | addBindeDev.BindList.Add(addBindInfo); |
| | | bindName = de.DeviceEpointName; |
| | | } |
| | | |
| | | var dev = new AddedDeviceBindResponseAllData(); |
| | |
| | | { |
| | | if (dev.addedDeviceBindResponseData.Result == 0) |
| | | { |
| | | curControlDev.bindList = dev.addedDeviceBindResponseData.BindList; |
| | | targetList.Clear(); |
| | | |
| | | switch (curDeviceBindType) |
| | | { |
| | | case 1: |
| | | if (actionFreshAirTarget != null) |
| | | { |
| | | actionFreshAirTarget(bindName); |
| | | actionFreshAirTarget(addBindeDev.BindName); |
| | | } |
| | | break; |
| | | case 2: |
| | | if (actionTemperatureTarget != null) |
| | | { |
| | | actionTemperatureTarget(bindName); |
| | | actionTemperatureTarget(addBindeDev.BindName); |
| | | } |
| | | break; |
| | | case 3: |
| | | if (actionHumidityTarget != null) |
| | | { |
| | | actionHumidityTarget(bindName); |
| | | actionHumidityTarget(addBindeDev.BindName); |
| | | } |
| | | break; |
| | | case 4: |
| | | if (actionPMTarget != null) |
| | | { |
| | | actionPMTarget(bindName); |
| | | actionPMTarget(addBindeDev.BindName); |
| | | } |
| | | break; |
| | | } |
| | |
| | | break; |
| | | case 4: |
| | | //PM2.5 |
| | | removeDevice.BindCluster = 1066; |
| | | break; |
| | | } |
| | | removeDevice.BindMacAddr = bd.DeviceAddr; |
| | |
| | | foreach (var de in room.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(de); |
| | | |
| | | if (device != null) |
| | | { |
| | | //获取设备类型的 |
| | |
| | | } |
| | | break; |
| | | case 4: |
| | | foreach (var de in room.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(de); |
| | | if (device != null) |
| | | { |
| | | if (device.Type == DeviceType.PMSensor) |
| | | { |
| | | roomIncludeMatchDevice.Add(device); |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | |
| | |
| | | roomIncludeMatchTempDevice.Add(device); |
| | | } |
| | | } |
| | | else if (device.Type == DeviceType.PMSensor) |
| | | { |
| | | var dev = device as PMSensor; |
| | | foreach (var clu in dev.InClusterList) |
| | | { |
| | | if (clu.InCluster == 1026) |
| | | { |
| | | roomIncludeMatchTempDevice.Add(device); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return roomIncludeMatchTempDevice; |
| | |
| | | if (dev.SensorDiv == 2) |
| | | { |
| | | roomIncludeMatchHumpDevice.Add(device); |
| | | } |
| | | } |
| | | else if (device.Type == DeviceType.PMSensor) |
| | | { |
| | | var dev = device as PMSensor; |
| | | foreach (var clu in dev.InClusterList) |
| | | { |
| | | if (clu.InCluster == 1029) |
| | | { |
| | | roomIncludeMatchHumpDevice.Add(device); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | break; |
| | | case 4: |
| | | foreach (var r in supportRoomList) |
| | | { |
| | | if (r.ListDevice.Count == 0) |
| | | { |
| | | continue; |
| | | } |
| | | foreach (var deviceKeys in r.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(deviceKeys); |
| | | if (device != null) |
| | | { |
| | | if (device.Type == DeviceType.PMSensor) |
| | | { |
| | | currentPanelBindSupportDeviceListTemp.Add(device); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | return currentPanelBindSupportDeviceListTemp; |
| | |
| | | } |
| | | break; |
| | | case 4: |
| | | foreach (var deviceKeys in curRoom.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(deviceKeys); |
| | | if (device != null) |
| | | { |
| | | if (device.Type == DeviceType.PMSensor) |
| | | { |
| | | curRoomDeviceListTemp.Add(device); |
| | | } |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | return curRoomDeviceListTemp; |
| | |
| | | /// <summary> |
| | | /// 中部布局中门锁名称显示 |
| | | /// </summary> |
| | | Button btnDoorLockTitle; |
| | | NormalViewControl btnDoorLockTitle; |
| | | /// <summary> |
| | | /// 分享 |
| | | /// </summary> |
| | |
| | | }; |
| | | this.midFrameLayout.AddChidren(midTopFrameLayout); |
| | | |
| | | //门锁标题 |
| | | btnDoorLockTitle = new Button() |
| | | { |
| | | Width = Application.GetRealWidth(250), |
| | | Height = Application.GetRealHeight(60), |
| | | X = Application.GetRealWidth(372), |
| | | Y = Application.GetRealHeight(46), |
| | | TextColor = Shared.Common.ZigbeeColor.Current.XMBlack, |
| | | TextSize = 15, |
| | | TextAlignment = TextAlignment.Center, |
| | | IsBold = true, |
| | | }; |
| | | //设备名称 |
| | | btnDoorLockTitle = new NormalViewControl(100, 60, true); |
| | | btnDoorLockTitle.Y = Application.GetRealHeight(46); |
| | | btnDoorLockTitle.TextSize = 15; |
| | | btnDoorLockTitle.IsBold = true; |
| | | btnDoorLockTitle.Text = Common.LocalDevice.Current.GetDeviceMacName(doorLock); |
| | | btnDoorLockTitle.Width = btnDoorLockTitle.GetRealWidthByText(); |
| | | btnDoorLockTitle.TextAlignment = TextAlignment.Center; |
| | | btnDoorLockTitle.Gravity = Gravity.CenterHorizontal; |
| | | midTopFrameLayout.AddChidren(btnDoorLockTitle); |
| | | |
| | | //记录 |
| | |
| | | {
|
| | | Application.RunOnMainThread(() => |
| | | { |
| | | NomallyOpenModeInvalidDialog(); |
| | | Action<bool> action = (obj) => |
| | | { |
| | | UpdateNomallyOpenStatus(); |
| | | }; |
| | | DoorLockCommonInfo.NomallyOpenModeInvalidDialog(doorLock, DoorLockCommonInfo.DoorLockMessType.AppOperate, haveLogicNormallyOpenMode, action); |
| | | }); |
| | | } |
| | | else |
| | |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | NomallyOpenModeInvalidDialog(); |
| | | Action<bool> action = (obj) => |
| | | { |
| | | UpdateNomallyOpenStatus(); |
| | | }; |
| | | DoorLockCommonInfo.NomallyOpenModeInvalidDialog(doorLock, DoorLockCommonInfo.DoorLockMessType.AppOperate, haveLogicNormallyOpenMode, action); |
| | | }); |
| | | } |
| | | } |
| | |
| | | /// </summary> |
| | | private async void NomallyOpenDialog() |
| | | { |
| | | #region 后续版本 |
| | | if (UserCenterResourse.UserInfo.AuthorityNo != 1) |
| | | { |
| | | this.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.OnlyMasterOperate)); |
| | |
| | | addLogicPage.action += (w) =>
|
| | | {
|
| | | doorLock.IsDoorLockNormallyMode = w;
|
| | | ///留给徐梅用的
|
| | | UpdateNomallyOpenStatus();
|
| | | //返回按键清空当前逻辑定义的LogicAction |
| | | UserCenter.DoorLock.DoorLockCommonInfo.LogicAction = null; |
| | | }; |
| | | }; |
| | | HdlCheckLogic.Current.CheckSecondarySecurity(action); |
| | | #endregion |
| | | |
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 常开模式失效处理
|
| | | /// </summary>
|
| | | public void NomallyOpenModeInvalidDialog(bool IsFromReport = false) |
| | | private void NomallyOpenModeInvalidDialog(bool IsFromReport = false) |
| | | { |
| | | if (!canShowDialog) |
| | | { |
| | |
| | | { |
| | | //本地Socket |
| | | public static Socket busSocket; |
| | | /// <summary>
|
| | | /// 计时器
|
| | | /// </summary> |
| | | private static int timeCount = 0; |
| | | |
| | | /// <summary> |
| | | /// 启动Socket接收和发送功能 |
| | |
| | | private static void CheckConnectiton()
|
| | | {
|
| | | if (busSocket == null) { return; }
|
| | | timeCount++;
|
| | | if (timeCount < 20)
|
| | | {
|
| | | //每10秒检测一次
|
| | | return;
|
| | | }
|
| | | timeCount = 0;
|
| | |
|
| | | bool blockingState = busSocket.Blocking;
|
| | | try
|
| | |
| | | /// 温度测量功能的设备如:温度传感器。。。 |
| | | /// <para>1029:Relative Humidity Measurement,设备支持“湿度测量功能”</para> |
| | | /// 湿度测量功能的设备如:湿度传感器。。。 |
| | | /// <para>1066:Pm2.5 Measurement,设备支持“pm2.5测量功能”</para> |
| | | /// Pm2.5测量功能的设备如:Pm2.5传感器。。。 |
| | | /// </summary> |
| | | public int InCluster; |
| | | } |
| | |
| | | /// </summary> |
| | | RelativeHumidityMeasurement = 1029, |
| | | /// <summary> |
| | | ///PM2.5测量功能 |
| | | /// </summary> |
| | | PmTwoPointFiveMeasurement = 1066, |
| | | /// <summary> |
| | | /// 恒温器功能 |
| | | /// </summary> |
| | | Thermostat = 513, |
| | |
| | | #endregion |
| | | |
| | | #region 设备状态上报 |
| | | else if (topic == gatewayID + "/" + "DeviceStatusReport" + "/" + addr + "/" + epoint + "/" + cluID + "/" + attrId) |
| | | if (topic == gatewayID + "/" + "DeviceStatusReport" + "/" + addr + "/" + epoint + "/" + cluID + "/" + attrId) |
| | | { |
| | | var deviceID = jobject.Value<int>("Device_ID"); |
| | | var deviceAddr = jobject.Value<string>("DeviceAddr"); |
| | |
| | | /// 空气质量传感器 |
| | | /// </summary> |
| | | public const int AirQualitySensor = 316; |
| | | /// <summary> |
| | | /// 优 |
| | | /// </summary> |
| | | public const int ExcellentAirQuality = 317; |
| | | /// <summary> |
| | | /// 良 |
| | | /// </summary> |
| | | public const int GoodAirQuality = 318; |
| | | /// <summary> |
| | | /// 轻度污染 |
| | | /// </summary> |
| | | public const int LightPollution = 319; |
| | | /// <summary> |
| | | /// 中度污染 |
| | | /// </summary> |
| | | public const int Moderatelyolluted = 320; |
| | | /// <summary> |
| | | /// 重度污染 |
| | | /// </summary> |
| | | public const int HeavyPollution = 321; |
| | | /// <summary> |
| | | /// 严重污染 |
| | | /// </summary> |
| | | public const int SeriousPollution = 322; |
| | | |
| | | |
| | | public readonly static int cancel = 5097; |
| | | public readonly static int confrim = 5098; |
| | |
| | | public readonly static int addFailed = 5401; |
| | | public readonly static int timeSensitive = 5402; |
| | | public readonly static int executeSone = 5403; |
| | | public readonly static int hour1 = 5404; |
| | | |
| | | |
| | | |