From 0d9f64668fd7350d6a21fd157e32009a96d98134 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期三, 16 十二月 2020 13:09:08 +0800
Subject: [PATCH] 新云端代码Ver1.2

---
 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSettionWithSourceForm.cs |   80 ++++++++++++++++++++--------------------
 1 files changed, 40 insertions(+), 40 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSettionWithSourceForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSettionWithSourceForm.cs
index 1d44709..23a9f63 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSettionWithSourceForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelSettionWithSourceForm.cs
@@ -118,7 +118,7 @@
             btnPic.Gravity = Gravity.CenterHorizontal;
             listBackControl.frameTable.AddChidren(btnPic);
             //鑾峰彇璁惧绫诲瀷鐨�
-            var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { deviceObj });
+            var deviceEnumInfo = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { deviceObj });
             if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment)
             {
                 btnPic.UnSelectedImagePath = "DeviceItem/ButtonPanelFangyueEnvironmentBigPic.png";
@@ -194,14 +194,14 @@
                     });
 
                     //鑾峰彇璁惧绫诲瀷鐨�
-                    var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { deviceObj });
+                    var deviceEnumInfo = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { deviceObj });
                     bool result = false;
-                    if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
+                    if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                     {
                         result = await GetBindName(curControlDev);
                     }
-                    if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueEnvironment
-                        || deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleEnvironment)
+                    if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment
+                        || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment)
                     {
                         result = await GetEnvironmentBindName(curControlDev);
                     }
@@ -246,33 +246,33 @@
                 bindList = panelBindListRes.getAllBindResponseData.BindList;
                 foreach (var bDev in bindList)
                 {
-                    var device = Common.LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
+                    var device = HdlDeviceCommonLogic.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
                     if (device == null)
                     {
                         continue;
                     }
                     //鑾峰彇璁惧绫诲瀷鐨�
-                    var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
+                    var deviceEnumInfo = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
                     if (device.Type == DeviceType.Thermostat)
                     {
                         //闈㈡澘鐨勭┖璋冭澶囷紝鍒欎笉鏄剧ず
-                        if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir)
+                        if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                         {
                             continue;
                         }
-                        bindAcName = Common.LocalDevice.Current.GetDeviceEpointName(device);
+                        bindAcName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
                         bindAcDev = device;
                     }
                     else if (device.Type == DeviceType.FreshAir)
                     {
                         //闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず
-                        if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir
-                            || deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueEnvironment
-                            || deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleEnvironment)
+                        if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir
+                            || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment
+                            || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment)
                         {
                             continue;
                         }
-                        bindFreshAirName = Common.LocalDevice.Current.GetDeviceEpointName(device);
+                        bindFreshAirName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
                         bindFreshAirDev = device;
                     }
                     else if (device.Type == DeviceType.TemperatureSensor)
@@ -280,35 +280,35 @@
                         var bD = device as TemperatureSensor;
                         if (bD.SensorDiv == 1)
                         {
-                            bindTemperatureName = Common.LocalDevice.Current.GetDeviceEpointName(device);
+                            bindTemperatureName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
                             bindTemperatureDev = device;
                         }
                         if (bD.SensorDiv == 2)
                         {
-                            bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device);
+                            bindHumidityName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
                             bindHumidityDev = device;
                         }
                     }
                     else if (device.Type == DeviceType.FreshAirHumiditySensor)
                     {
-                        bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device);
+                        bindHumidityName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
                         bindHumidityDev = device;
                     }
                     else if (device.Type == DeviceType.PMSensor)
                     {
                         if (bDev.BindCluster == 1026)
                         {
-                            bindTemperatureName = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor);
+                            bindTemperatureName = HdlDeviceCommonLogic.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);
+                            bindHumidityName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor);
                             bindHumidityDev = device;
                         }
                         if (bDev.BindCluster == 1066)
                         {
-                            bindPmName = Common.LocalDevice.Current.GetDeviceEpointName(device);
+                            bindPmName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
                             bindPMDev = device;
                         }
                     }
@@ -343,35 +343,35 @@
                     bindList = panelBindListRes.getAllBindResponseData.BindList;
                     foreach (var bDev in bindList)
                     {
-                        var device = Common.LocalDevice.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
+                        var device = HdlDeviceCommonLogic.Current.GetDevice(bDev.BindMacAddr, bDev.BindEpoint);
                         if (device == null)
                         {
                             continue;
                         }
                         //鑾峰彇璁惧绫诲瀷鐨�
-                        var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
+                        var deviceEnumInfo = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { device });
                         if (device.Type == DeviceType.Thermostat)
                         {
                             //闈㈡澘鐨勭┖璋冭澶囷紝鍒欎笉鏄剧ず
-                            if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir
-                                || deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueEnvironment
-                                || deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleEnvironment)
+                            if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir
+                                || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment
+                                || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment)
                             {
                                 continue;
                             }
-                            bindAcName = Common.LocalDevice.Current.GetDeviceEpointName(device);
+                            bindAcName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
                             bindAcDev = device;
                         }
                         else if (device.Type == DeviceType.FreshAir)
                         {
                             //闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず
-                            if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir
-                                || deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueEnvironment
-                            || deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleEnvironment)
+                            if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir
+                                || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment
+                            || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment)
                             {
                                 continue;
                             }
-                            bindFreshAirName = Common.LocalDevice.Current.GetDeviceEpointName(device);
+                            bindFreshAirName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
                             bindFreshAirDev = device;
                         }
                         else if (device.Type == DeviceType.TemperatureSensor)
@@ -379,35 +379,35 @@
                             var bD = device as TemperatureSensor;
                             if (bD.SensorDiv == 1)
                             {
-                                bindTemperatureName = Common.LocalDevice.Current.GetDeviceEpointName(device);
+                                bindTemperatureName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
                                 bindTemperatureDev = device;
                             }
                             if (bD.SensorDiv == 2)
                             {
-                                bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device);
+                                bindHumidityName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
                                 bindHumidityDev = device;
                             }
                         }
                         else if (device.Type == DeviceType.FreshAirHumiditySensor)
                         {
-                            bindHumidityName = Common.LocalDevice.Current.GetDeviceEpointName(device);
+                            bindHumidityName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
                             bindHumidityDev = device;
                         }
                         else if (device.Type == DeviceType.Thermostat)
                         {
-                            bindAcName = Common.LocalDevice.Current.GetDeviceEpointName(device);
+                            bindAcName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
                             bindAcDev = device;
                         }
                         else if (device.Type == DeviceType.PMSensor)
                         {
                             if (bDev.BindCluster == 1026)
                             {
-                                bindTemperatureName = Common.LocalDevice.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.TemperatureSensor);
+                                bindTemperatureName = HdlDeviceCommonLogic.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);
+                                bindHumidityName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device) + "-" + Language.StringByID(R.MyInternationalizationString.HumiditySensor);
                                 bindHumidityDev = device;
                             }
                         }
@@ -431,7 +431,7 @@
         private void AddAcRow()
         {
             //鑾峰彇璁惧绫诲瀷鐨�
-            var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { deviceObj });
+            var deviceEnumInfo = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { deviceObj });
             if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
             {
                 return;
@@ -501,7 +501,7 @@
             rowNewWind.ButtonClickEvent += (sender, e) =>
             {
                 //鑾峰彇璁惧绫诲瀷鐨�
-                var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { deviceObj });
+                var deviceEnumInfo = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { deviceObj });
                 if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueFreshAir)
                 {
                     this.deviceObj.DeviceEpoint = 1;
@@ -540,7 +540,7 @@
         private void AddPMRow()
         {
             //鑾峰彇璁惧绫诲瀷鐨�
-            var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { deviceObj });
+            var deviceEnumInfo = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(new List<CommonDevice>() { deviceObj });
             if (deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_FangyueEnvironment || deviceEnumInfo.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleEnvironment)
             {
                 return;
@@ -725,7 +725,7 @@
         private void InitTopRightMenu()
         {
             //妫�娴嬫鍥炶矾鏄惁鎷ユ湁瀹氫綅鍔熻兘
-            if (Common.LocalDevice.Current.DeviceIsCanFixedPosition(deviceObj) == false)
+            if (HdlDeviceCommonLogic.Current.DeviceIsCanFixedPosition(deviceObj) == false)
             {
                 return;
             }
@@ -751,7 +751,7 @@
             frame.AddRowMenu(deviceMenu, "Item/FixedPosition.png", "Item/FixedPositionSelected.png", () =>
             {
                 //鍙戦�佸畾浣嶅姛鑳�
-                Common.LocalDevice.Current.SetFixedPositionCommand(deviceObj);
+                HdlDeviceCommonLogic.Current.SetFixedPositionCommand(deviceObj);
             });
         }
 

--
Gitblit v1.8.0