| | |
| | | 314=自动模式不支持操作 |
| | | 315=空气质量 |
| | | 316=空气质量传感器 |
| | | 317=优 |
| | | 318=良 |
| | | 319=轻度污染 |
| | | 320=中度污染 |
| | | 321=重度污染 |
| | | 322=严重污染 |
| | | |
| | | 5097=取消 |
| | | 5098=确定 |
| | |
| | | /// <returns></returns>
|
| | | public bool DeviceIsCanFixedPosition(CommonDevice device)
|
| | | {
|
| | | if (device.Type == DeviceType.DoorLock)
|
| | | if (device.Type == DeviceType.DoorLock || device.Type == DeviceType.PMSensor)
|
| | | {
|
| | | //门锁没有定位功能
|
| | | return false;
|
File was renamed from ZigbeeApp/Shared/Phone/Category/Controls/DeviceRow/Base/DevicePmSensorRowControl.cs |
| | |
| | | //检测能否发送获取状态命令 |
| | | //if (this.CheckCanSendStatuComand() == true) |
| | | //{ |
| | | HdlDeviceAttributeLogic.Current.SendFreshAirStatuComand(this.device);
|
| | | HdlDeviceAttributeLogic.Current.SendPmSensorComand(this.device);
|
| | | //}
|
| | | }
|
| | |
|
| | |
| | | { |
| | | action(Send.CurrentDoorLock.IsDoorLockNormallyMode); |
| | | } |
| | | //返回按键清空 |
| | | UserCenter.DoorLock.DoorLockCommonInfo.LogicAction = null; |
| | | }; |
| | | |
| | | var middle = new FrameLayout |
| | |
| | | }
|
| | |
|
| | | /// <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>
|
| | |
| | | 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 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 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 = "155"; |
| | | btnPmStatus.TextSize = 30; |
| | |
| | | this.listControl.Add(btnPmStatus); |
| | | |
| | | //PM2.5单位 |
| | | var btnPmUnit = new NormalViewControl(124 + 15, 43, true); |
| | | 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; |
| | |
| | | this.listControl[1].Text = pMSensor.currentHumidity.ToString(); |
| | | this.listControl[2].Text = pMSensor.currentPmData.ToString(); |
| | | //设置状态文字 |
| | | this.btnStatu.Text = Language.StringByID(R.MyInternationalizationString.AirQuality) + ""; |
| | | var curText = Language.StringByID(R.MyInternationalizationString.AirQuality) + QuailityType(); |
| | | this.SetStatuText(curText); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | if (pMSensor.currentPmData <= 35 && pMSensor.currentPmData >= 0) |
| | | { |
| | | |
| | | curQuality = Language.StringByID(R.MyInternationalizationString.ExcellentAirQuality); |
| | | } |
| | | this.listControl[2].Text = pMSensor.currentPmData.ToString(); |
| | | |
| | | 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 = ""; |
| | | } |
| | | //设置状态文字 |
| | | return curQuality; |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | |
| | | } |
| | | } |
old mode 100755
new mode 100644
| | |
| | | { "AttriButeId", (int)AttriButeId.FanMode}
|
| | | }
|
| | | };
|
| | | var data = new Newtonsoft.Json.Linq.JObject { { "AttriBute", attriBute } };
|
| | | jObject.Add("Data", data);
|
| | | device.Gateway?.Send("GetDeviceStatus", jObject.ToString());
|
| | | } |
| | | |
| | | #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());
|
old mode 100755
new mode 100644
| | |
| | | }
|
| | | 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)
|
| | | {
|
| | | //在网关没有回复之前,默认离线
|
old mode 100755
new mode 100644
| | |
| | | //温度
|
| | | if (attData.AttributeId == (int)AttriButeId.MeasuredValue)
|
| | | {
|
| | | if (attData.AttriButeData == 0)
|
| | | decimal temperatrue = 0;
|
| | | string receiptData = string.Empty;
|
| | | //两个两个位置替换
|
| | | for (int i = attData.AttriButeDataHex.Length - 1; i >= 0; i = i - 2)
|
| | | {
|
| | | ((TemperatureSensor)locadevice).Temperatrue = 0;
|
| | | receiptData += attData.AttriButeDataHex[i - 1].ToString() + attData.AttriButeDataHex[i].ToString();
|
| | | }
|
| | | else if (attData.AttriButeData > 32767)
|
| | | //有符号(会出现负数)
|
| | | if (attData.AttriButeDataType == 40 || attData.AttriButeDataType == 41)
|
| | | {
|
| | | //小数点需要一位
|
| | | string strValue = Convert.ToInt16(receiptData, 16).ToString();
|
| | | strValue = strValue.Substring(0, strValue.Length - 1);
|
| | | temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
|
| | | }
|
| | | //无符号(不会出现负数)
|
| | | else if (attData.AttriButeDataType == 32 || attData.AttriButeDataType == 33)
|
| | | {
|
| | | ushort shortData = Convert.ToUInt16(receiptData, 16);
|
| | | if (shortData > 32767)
|
| | | {
|
| | | //负数(特殊处理)
|
| | | string strValue = (attData.AttriButeData - 65536).ToString();
|
| | | string strValue = (shortData - 65536).ToString();
|
| | | //小数点需要一位
|
| | | strValue = strValue.Substring(0, strValue.Length - 1);
|
| | | ((TemperatureSensor)locadevice).Temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
|
| | | temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
|
| | | }
|
| | | else
|
| | | {
|
| | | //小数点需要一位
|
| | | string strValue = attData.AttriButeData.ToString();
|
| | | string strValue = shortData.ToString();
|
| | | strValue = strValue.Substring(0, strValue.Length - 1);
|
| | | ((TemperatureSensor)locadevice).Temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
|
| | | temperatrue = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
|
| | | }
|
| | | }
|
| | |
|
| | | //温度传感器
|
| | | if (locadevice is TemperatureSensor)
|
| | | {
|
| | | ((TemperatureSensor)locadevice).Temperatrue = temperatrue;
|
| | | }
|
| | | //PM2.5传感器
|
| | | else if (locadevice is PMSensor)
|
| | | {
|
| | | ((PMSensor)locadevice).currentTemperature = (int)temperatrue;
|
| | | }
|
| | | //已经接收到状态
|
| | | locadevice.HadReadDeviceStatu = true;
|
| | |
| | | //湿度
|
| | | if (attData.AttributeId == (int)AttriButeId.MeasuredValue)
|
| | | {
|
| | | if (attData.AttriButeData == 0)
|
| | | decimal humidity = 0;
|
| | | string receiptData = string.Empty;
|
| | | //两个两个位置替换
|
| | | for (int i = attData.AttriButeDataHex.Length - 1; i >= 0; i = i - 2)
|
| | | {
|
| | | ((TemperatureSensor)locadevice).Humidity = 0;
|
| | | receiptData += attData.AttriButeDataHex[i - 1].ToString() + attData.AttriButeDataHex[i].ToString();
|
| | | }
|
| | | else
|
| | | //有符号(会出现负数)
|
| | | if (attData.AttriButeDataType == 40 || attData.AttriButeDataType == 41)
|
| | | {
|
| | | //小数点需要一位(湿度没有负数)
|
| | | string strValue = attData.AttriButeData.ToString();
|
| | | //小数点需要一位
|
| | | string strValue = Convert.ToInt16(receiptData, 16).ToString();
|
| | | strValue = strValue.Substring(0, strValue.Length - 1);
|
| | | ((TemperatureSensor)locadevice).Humidity = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
|
| | | humidity = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
|
| | | }
|
| | | //无符号(不会出现负数)
|
| | | else if (attData.AttriButeDataType == 32 || attData.AttriButeDataType == 33)
|
| | | {
|
| | | //小数点需要一位 湿度不会出现负数
|
| | | string strValue = Convert.ToUInt16(receiptData, 16).ToString();
|
| | | strValue = strValue.Substring(0, strValue.Length - 1);
|
| | | humidity = Convert.ToDecimal(strValue.Insert(strValue.Length - 1, "."));
|
| | | }
|
| | | //温度传感器
|
| | | if (locadevice is TemperatureSensor)
|
| | | {
|
| | | ((TemperatureSensor)locadevice).Humidity = humidity;
|
| | | }
|
| | | //PM2.5传感器
|
| | | else if (locadevice is PMSensor)
|
| | | {
|
| | | ((PMSensor)locadevice).currentHumidity = (int)humidity;
|
| | | }
|
| | | }
|
| | | //已经接收到状态
|
| | |
| | | }
|
| | | }
|
| | | #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设备属性上报);
|
old mode 100755
new mode 100644
| | |
| | | btnHorizontalScrolViewLayout = new HorizontalScrolViewLayout |
| | | { |
| | | X = Application.GetRealWidth(58), |
| | | BackgroundColor = 0xff00ff00, |
| | | }; |
| | | btnMidTopLayout.AddChidren(btnHorizontalScrolViewLayout); |
| | | |
old mode 100755
new mode 100644
| | |
| | | if (typeModeList == null) |
| | | { |
| | | //再次动态获取按键支持的大类 |
| | | 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(); |
| | | }); |
| | | dialog.Close(); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | CommonPage.Loading.Hide(); |
| | | }); |
| | | } |
| | | } |
| | | |
old mode 100755
new mode 100644
| | |
| | |
|
| | | frameColor.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | 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);
|
| | | };
|
| | | }
|
| | |
|
| | | /// <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) =>
|
| | |
| | | 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 ■ 获取初始数据_______________________
|
old mode 100755
new mode 100644
| | |
| | | /// 被绑目标是PM2.5 |
| | | /// </summary> |
| | | private CommonDevice bindPMDev; |
| | | // <summary> |
| | | /// 按键中被绑定的目标列表 |
| | | /// </summary> |
| | | public List<BindObj.BindListResponseObj> bindList = new List<BindObj.BindListResponseObj>(); |
| | | |
| | | #endregion |
| | | |
| | |
| | | |
| | | rowNewWind.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindFreshAirDev, 1); |
| | | var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindFreshAirDev, bindList, 1); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | addDevicePage.Show(); |
| | |
| | | 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) |
| | |
| | | } |
| | | if (device.Type == DeviceType.PMSensor) |
| | | { |
| | | if (bDev.BindCluster == 1026) |
| | | { |
| | | bindTemperatureName = device.DeviceEpointName; |
| | | bindTemperatureDev = device; |
| | | } |
| | | if (bDev.BindCluster == 1029) |
| | | { |
| | | bindHumidityName = device.DeviceEpointName; |
| | | bindHumidityDev = device; |
| | | } |
| | | if (bDev.BindCluster == 1066) |
| | | { |
| | | bindPmName = device.DeviceEpointName; |
| | | bindPMDev = device; |
| | | } |
| | | } |
| | | } |
| | | result = true; |
| | |
| | | var btnPMStatu = rowPM.AddMostRightView(msg, 700); |
| | | rowPM.ButtonClickEvent += (sender, e) => |
| | | { |
| | | var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindPMDev, 4); |
| | | var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindPMDev, bindList, 4); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | addDevicePage.Show(); |
| | |
| | | var btnTemperatureStatu = rowTemPerature.AddMostRightView(msg, 700); |
| | | rowTemPerature.ButtonClickEvent += (sender, e) => |
| | | { |
| | | var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindTemperatureDev, 2); |
| | | var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindTemperatureDev, bindList, 2); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | addDevicePage.Show(); |
| | |
| | | var btnHumidityStatu = rowHumidity.AddMostRightView(msg, 700); |
| | | rowHumidity.ButtonClickEvent += (sender, e) => |
| | | { |
| | | var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindHumidityDev, 3); |
| | | var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, bindHumidityDev, bindList, 3); |
| | | Shared.Phone.UserView.HomePage.Instance.AddChidren(addDevicePage); |
| | | Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; |
| | | addDevicePage.Show(); |
| | |
| | | /// <param name="device"></param> |
| | | /// <param name="deviceBindType">1:新风;2:温度传感器;3:湿度传感器;4:PM2.5传感器</param> |
| | | /// <param name="bindDev">绑定目标 </param> |
| | | public PanelFangyueFreshAirTargetsForm(CommonDevice device, CommonDevice bindDev, int deviceBindType) |
| | | public PanelFangyueFreshAirTargetsForm(CommonDevice device, CommonDevice bindDev, List<BindListResponseObj> bindList, int deviceBindType) |
| | | { |
| | | this.curControlDev = device as FreshAir; |
| | | this.curBindDevice = bindDev; |
| | | this.curDeviceBindType = deviceBindType; |
| | | curControlDev.bindList = bindList; |
| | | if (bindList.Count == 0) |
| | | { |
| | | canReadBindList = true; |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | |
| | | /// <summary> |
| | | /// 是否能点击保存按钮 |
| | | /// </summary> |
| | | private bool canSave = true; |
| | | private bool canReadBindList = false; |
| | | #endregion |
| | | |
| | | #region UI设计 |
| | |
| | | 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(); |
| | | |
| | | //获取面板中存在的绑定目标 |
| | | if (canReadBindList) |
| | | { |
| | | 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; |
| | | } |
| | |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | this.RemoveFromParent(); |
| | | }); |
| | | var mainKey = delDevice.DeviceAddr + delDevice.Epoint; |
| | | var dev1 = curControlDev.bindList.Find(obj => (obj != null) && (obj.BindMacAddr + obj.BindEpoint == mainKey)); |
| | | if (dev1 != null) |
| | | { |
| | | curControlDev.bindList.Remove(dev1); |
| | | } |
| | | } |
| | | 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) |
| | |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | var mainKey = delDevice.DeviceAddr + delDevice.Epoint; |
| | | var dev2 = curControlDev.bindList.Find(obj => (obj != null) && (obj.BindMacAddr + obj.BindEpoint == mainKey)); |
| | | if (dev2 != null) |
| | | { |
| | | curControlDev.bindList.Remove(dev2); |
| | | } |
| | | } |
| | | } |
| | |
| | | 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) |
| | |
| | | }); |
| | | return; |
| | | } |
| | | } |
| | | var mainKey = delDevice.DeviceAddr + delDevice.Epoint; |
| | | var dev3 = curControlDev.bindList.Find(obj => (obj != null) && (obj.BindMacAddr + obj.BindEpoint == mainKey)); |
| | | if (dev3 != null) |
| | | { |
| | | curControlDev.bindList.Remove(dev3); |
| | | } |
| | | } |
| | | } |
| | |
| | | addBindInfo.BindMacAddr = de.DeviceAddr; |
| | | addBindInfo.BindEpoint = de.DeviceEpoint; |
| | | addBindeDev.BindList.Add(addBindInfo); |
| | | bindName = de.DeviceEpointName; |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | 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; |
| | | } |
| | |
| | | btnFinifh.BackgroundColor = Shared.Common.ZigbeeColor.Current.XMBlack; |
| | | this.RemoveFromParent(); |
| | | }); |
| | | |
| | | var mainKey = addBindeDev.DeviceAddr + addBindeDev.Epoint; |
| | | var dev4 = curControlDev.bindList.Find(obj => (obj != null) && (obj.BindMacAddr + obj.BindEpoint == mainKey)); |
| | | if (dev4 != null) |
| | | { |
| | | curControlDev.bindList.Add(dev4); |
| | | } |
| | | } |
| | | else if (dev.addedDeviceBindResponseData.Result == 1) |
| | | { |
| | |
| | | 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) |
| | | { |
| | | //电池设备不支持绑定 |
| | | if (device.ZigbeeType != 1) |
| | | { |
| | | continue; |
| | | } |
| | | if (device != null) |
| | | { |
| | | if (device.Type == DeviceType.TemperatureSensor) |
| | | { |
| | | var dev = device as TemperatureSensor; |
| | | if (dev.SensorDiv == 1) |
| | | { |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | foreach (var de in room.ListDevice) |
| | | { |
| | | var device = LocalDevice.Current.GetDevice(de); |
| | | if (device != null) |
| | | { |
| | | //电池设备不支持绑定 |
| | | if (device.ZigbeeType != 1) |
| | | { |
| | | continue; |
| | | } |
| | | if (device != null) |
| | | { |
| | | if (device.Type == DeviceType.TemperatureSensor) |
| | | { |
| | | var dev = device as TemperatureSensor; |
| | |
| | | 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); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return roomIncludeMatchHumpDevice; |
| | |
| | | {
|
| | | if (canOpenNormallyMode) |
| | | { |
| | | //Application.RunOnMainThread(() => |
| | | //{ |
| | | // NomallyOpenModeInvalidDialog(true); |
| | | //}); |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | Action<bool> action = (obj) => |
| | |
| | | {
|
| | | 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) |
| | | { |
| | |
| | | /// 温度测量功能的设备如:温度传感器。。。 |
| | | /// <para>1029:Relative Humidity Measurement,设备支持“湿度测量功能”</para> |
| | | /// 湿度测量功能的设备如:湿度传感器。。。 |
| | | /// <para>1066:Pm2.5 Measurement,设备支持“pm2.5测量功能”</para> |
| | | /// Pm2.5测量功能的设备如:Pm2.5传感器。。。 |
| | | /// </summary> |
| | | public int InCluster; |
| | | } |
old mode 100755
new mode 100644
| | |
| | | /// </summary> |
| | | RelativeHumidityMeasurement = 1029, |
| | | /// <summary> |
| | | ///PM2.5测量功能 |
| | | /// </summary> |
| | | PmTwoPointFiveMeasurement = 1066, |
| | | /// <summary> |
| | | /// 恒温器功能 |
| | | /// </summary> |
| | | Thermostat = 513, |
old mode 100755
new mode 100644
| | |
| | | jobject = Newtonsoft.Json.Linq.JObject.Parse(message); |
| | | }
|
| | |
|
| | | #region 设备状态上报【奇怪,为什么放在原来的位置会不执行这块代码》???】 |
| | | if (topic == gatewayID + "/" + "DeviceStatusReport" + "/" + addr + "/" + epoint + "/" + cluID + "/" + attrId) |
| | | { |
| | | var deviceID = jobject.Value<int>("Device_ID"); |
| | | var deviceAddr = jobject.Value<string>("DeviceAddr"); |
| | | var tempEpoint = jobject.Value<int>("Epoint"); |
| | | var dataId = jobject.Value<int>("Data_ID"); |
| | | |
| | | var tempDevice = new CommonDevice { DeviceID = deviceID, DeviceAddr = deviceAddr, DeviceEpoint = tempEpoint };
|
| | | tempDevice.DeviceStatusReport = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.DeviceStatusReportData>(jobject["Data"].ToString());
|
| | | UpdateDeviceInfo(tempDevice, "DeviceStatusReport"); |
| | | } |
| | | #endregion
|
| | |
|
| | | #region 远程,主网关上报通知 |
| | | if (IsRemote) |
| | | else if (IsRemote) |
| | | { |
| | | if (topic == gatewayID + "/" + "BeMainGw_Report") |
| | | { |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region 设备在线状态更新反馈 |
| | | |
| | | //2020.05.11 删除 |
| | | |
| | | #endregion |
| | | |
| | | #region 设备状态上报 |
| | | else if (topic == gatewayID + "/" + "DeviceStatusReport" + "/" + addr + "/" + epoint + "/" + cluID + "/" + attrId) |
| | | { |
| | | var deviceID = jobject.Value<int>("Device_ID"); |
| | | var deviceAddr = jobject.Value<string>("DeviceAddr"); |
| | | var tempEpoint = jobject.Value<int>("Epoint"); |
| | | var dataId = jobject.Value<int>("Data_ID"); |
| | | |
| | | var tempDevice = new CommonDevice { DeviceID = deviceID, DeviceAddr = deviceAddr, DeviceEpoint = tempEpoint };
|
| | | tempDevice.DeviceStatusReport = Newtonsoft.Json.JsonConvert.DeserializeObject<CommonDevice.DeviceStatusReportData>(jobject["Data"].ToString());
|
| | | UpdateDeviceInfo(tempDevice, "DeviceStatusReport"); |
| | | } |
| | | #endregion |
| | | #region 门锁操作事件通知 |
| | | else if (topic == gatewayID + "/" + "DoorLock/DoorLockOperatingEventNotificationCommand") |
| | |
| | | public static void DebugPrintLog(string msg, bool flage = true) |
| | | { |
| | | #if DEBUG |
| | | if (flage == true) |
| | | { |
| | | if (msg.Contains("DeviceStatusReport") == false) |
| | | { |
| | | //if (flage == true) |
| | | //{ |
| | | //if (msg.Contains("DeviceStatusReport") == false) |
| | | //{ |
| | | System.Console.WriteLine(msg + " " + System.DateTime.Now.ToLongTimeString() + " " + System.DateTime.Now.Millisecond); |
| | | } |
| | | } |
| | | // } |
| | | // } |
| | | #endif |
| | | } |
| | | |
| | |
| | | /// 空气质量传感器 |
| | | /// </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; |
| | |
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\ZigBee\Device\ZbGatewayData.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlSafeguardLogic.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlAlarmsLogic.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\Controls\DeviceRow\Base\DevicePmSensorRowControl.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\ControlForm\DevicePmSensorDetailCardForm.cs" />
|
| | | <Compile Include="$(MSBuildThisFileDirectory)Phone\Category\Controls\DeviceRow\DevicePmSensorRowControl.cs" />
|
| | | </ItemGroup>
|
| | | <ItemGroup>
|
| | | <Folder Include="$(MSBuildThisFileDirectory)Phone\CommonForm\" />
|