黄学彪
2020-12-17 9f326f4000847e6167d8166fa2f6a66f53cb3734
ZigbeeApp/Shared/Phone/Device/Logic/LogicDveiceStatus.cs
@@ -145,7 +145,7 @@
                        case 1:
                            {
                                var deviceinof = Method.GetCommonDevice(conditions["MacAddr"], conditions["Epoint"]);
                                name = LocalDevice.Current.GetDeviceEpointName(deviceinof);
                                name = HdlDeviceCommonLogic.Current.GetDeviceEpointName(deviceinof);
                                selecteddevice.regionNameBtn.Visible = true;
                                Method.RoomNmae(selecteddevice.regionNameBtn, deviceinof);
@@ -171,19 +171,23 @@
                                    case DeviceType.IASZone:
                                        {
                                            var iASZonedevice = deviceinof as IASZone;
                                            var intvalue = conditions["AttriButeData1"];
                                            //var intvalue = conditions["AttriButeData1"];
                                            string if_value = "5";
                                            var intvalue = conditions["Range"];
                                            icon = $"ZigeeLogic/sensor{iASZonedevice.IasDeviceType}.png";
                                            switch (iASZonedevice.IasDeviceType)
                                            {
                                                case 13:
                                                    {
                                                        if (conditions["Cluster_ID"] == "1024")
                                                        if (conditions["Cluster_ID"] == "1024")
                                                        {
                                                            state = Language.StringByID(MyInternationalizationString.ambientLight) + "<" + conditions["AttriButeData1"] + "lux" + Language.StringByID(MyInternationalizationString.hour1);
                                                        }
                                                        else
                                                        {
                                                            if (conditions.ContainsKey("IgnoreTime"))
                                                            if (conditions.ContainsKey("IgnoreTime")&& conditions["IgnoreTime"]!="0")
                                                            {
                                                                int minute = int.Parse(conditions["IgnoreTime"]) / 60;
                                                                int second = int.Parse(conditions["IgnoreTime"]) % 60;
@@ -217,9 +221,9 @@
                                                case 21:
                                                case 22:
                                                    {
                                                        if (conditions.ContainsKey("IgnoreTime"))
                                                        {
                                                        if (conditions.ContainsKey("IgnoreTime")&&conditions["IgnoreTime"] != "0")
                                                        {
                                                            int minute = int.Parse(conditions["IgnoreTime"]) / 60;
                                                            int second = int.Parse(conditions["IgnoreTime"]) % 60;
                                                            if (minute != 0 && second != 0)
@@ -245,7 +249,7 @@
                                                        }
                                                        else
                                                        {
                                                            if (intvalue == "1")
                                                            if (intvalue == if_value)
                                                            {
                                                                state = Language.StringByID(MyInternationalizationString.logicopen);
                                                            }
@@ -260,7 +264,7 @@
                                                    break;
                                                case 40:
                                                    {
                                                        if (intvalue == "1")
                                                        if (intvalue == if_value)
                                                        {
                                                            state =Language.StringByID(MyInternationalizationString.smokescreen);
                                                        }
@@ -269,7 +273,7 @@
                                                    break;
                                                case 42:
                                                    {
                                                        if (intvalue == "1")
                                                        if (intvalue == if_value)
                                                        {
                                                            state =Language.StringByID( MyInternationalizationString.waterleakage);
                                                        }
@@ -281,7 +285,7 @@
                                                    break;
                                                case 43:
                                                    {
                                                        if (intvalue == "1")
                                                        if (intvalue == if_value)
                                                        {
                                                            state =Language.StringByID( MyInternationalizationString.gas);
                                                        }
@@ -290,7 +294,7 @@
                                                    break;
                                                case 277:
                                                    {
                                                        if (intvalue == "1")
                                                        if (intvalue == if_value)
                                                        {
                                                            state =Language.StringByID( MyInternationalizationString.callthepolice);
                                                        }
@@ -299,7 +303,7 @@
                                                    break;
                                                default:
                                                    {
                                                        if (intvalue == "1")
                                                        if (intvalue == if_value)
                                                        {
                                                            state =Language.StringByID(MyInternationalizationString.callthepolice);
                                                        }
@@ -373,8 +377,8 @@
                                                        s = "≤";
                                                    }
                                                    break;
                                            }
                                            ///转换温度值/100
                                            }
                                            ///转换温度值/100
                                            string srtValue = (int.Parse(conditions["AttriButeData1"]) / 100).ToString();
                                            if (conditions["Cluster_ID"] == "1026")
                                            {
@@ -529,7 +533,7 @@
                    selecteddevice.del.MouseUpEventHandler += (sender, e) =>
                    {
                        var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Confirm,
                        var alert = new ShowMsgControl(ShowMsgType.Confirm,
                        Language.StringByID(MyInternationalizationString.doyouwanttodelete),
                        Language.StringByID(MyInternationalizationString.confrim));
                        alert.Show();
@@ -589,7 +593,7 @@
                            {
                                var deviceinof = Method.GetCommonDevice(actions["DeviceAddr"].ToString(), actions["Epoint"].ToString());
                                name = LocalDevice.Current.GetDeviceEpointName(deviceinof);
                                name = HdlDeviceCommonLogic.Current.GetDeviceEpointName(deviceinof);
                                actiondevice.regionNameBtn.Visible = true;
                                Method.RoomNmae(actiondevice.regionNameBtn, deviceinof);
                                switch (deviceinof.Type)
@@ -917,7 +921,7 @@
                                                        {
                                                            var intvalue = int.Parse(tasks["Data1"]);
                                                            var colorTemperatureValue = 1000000 / (intvalue * 100);
                                                            state += Language.StringByID(MyInternationalizationString.colorTemperature) + colorTemperatureValue.ToString() + "K";
                                                            state += Language.StringByID(MyInternationalizationString.colorTemperature) + colorTemperatureValue.ToString() + "00K";
                                                        }
                                                        break;
                                                }
@@ -933,7 +937,7 @@
                        case 2:
                            {
                                //在本地查找该场景;
                                var sceneinof = UserCenter.HdlSceneLogic.Current.GetSceneUIBySceneId(Convert.ToInt32(actions["DeviceAddr"].ToString()));
                                var sceneinof = HdlSceneLogic.Current.GetSceneUIBySceneId(Convert.ToInt32(actions["DeviceAddr"].ToString()));
                                //本地没有存在;
                                if (sceneinof == null)
                                {
@@ -962,7 +966,7 @@
                                actiondevice.regionNameBtn.Visible = true;
                                /////通过设备找到区域(房间)名称
                                Common.Room room = new Common.Room();
                                actiondevice.regionNameBtn.Text = UserCenter.HdlRoomLogic.Current.GetRoomNameBySceneId(sceneinof.Id);
                                actiondevice.regionNameBtn.Text = HdlRoomLogic.Current.GetRoomNameBySceneId(sceneinof.Id);
                            }
                            break;
@@ -1090,7 +1094,7 @@
                    actiondevice.del.MouseUpEventHandler += (sender, e) =>
                    {
                        var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Confirm,
                        var alert = new ShowMsgControl(ShowMsgType.Confirm,
                        Language.StringByID(MyInternationalizationString.doyouwanttodelete),
                        Language.StringByID(MyInternationalizationString.confrim));
                        alert.Show();