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/PanelButtonSettionForm.cs |   38 +++++++++++++++++++-------------------
 1 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs
index f0a684e..5b13ff7 100755
--- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs
+++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelButtonSettionForm.cs
@@ -102,18 +102,18 @@
                 this.ShowProgressBar();
                 foreach (var epoint in dicDeviceSaveName.Keys)
                 {
-                    var device = Common.LocalDevice.Current.GetDevice(deviceObj.DeviceAddr, epoint);
+                    var device = HdlDeviceCommonLogic.Current.GetDevice(deviceObj.DeviceAddr, epoint);
                     if (device == null || dicDeviceSaveName[epoint] == string.Empty)
                     {
                         //涓嶈兘鍏佽绌虹櫧鍚嶅瓧
                         continue;
                     }
                     string newName = dicDeviceSaveName[epoint];
-                    string oldName = Common.LocalDevice.Current.GetDeviceEpointName(device);
+                    string oldName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(device);
                     if (oldName != newName)
                     {
                         //璁惧鍚嶇О淇敼
-                        var result = Common.LocalDevice.Current.ReName(device, newName);
+                        var result = HdlDeviceCommonLogic.Current.ReName(device, newName);
                         if (result == false)
                         {
                             //鍏抽棴
@@ -140,7 +140,7 @@
         {
             this.listview.RemoveAll();
 
-            string nameValue = Common.LocalDevice.Current.GetDeviceEpointName(nowSelectDevice);
+            string nameValue = HdlDeviceCommonLogic.Current.GetDeviceEpointName(nowSelectDevice);
             if (dicDeviceSaveName.ContainsKey(nowSelectDevice.DeviceEpoint) == true)
             {
                 nameValue = dicDeviceSaveName[nowSelectDevice.DeviceEpoint];
@@ -158,7 +158,7 @@
             {
                 btnDeviceName.txtInput.FinishInputEvent += () =>
                 {
-                    string oldName = Common.LocalDevice.Current.GetDeviceEpointName(nowSelectDevice);
+                    string oldName = HdlDeviceCommonLogic.Current.GetDeviceEpointName(nowSelectDevice);
                     if (btnDeviceName.Text.Trim() == string.Empty)
                     {
                         //灏嗗悕瀛楄繕鍘�
@@ -167,7 +167,7 @@
                     if (oldName != btnDeviceName.Text.Trim())
                     {
                         //璁惧鍚嶇О淇敼
-                        var result = Common.LocalDevice.Current.ReName(nowSelectDevice, btnDeviceName.Text.Trim());
+                        var result = HdlDeviceCommonLogic.Current.ReName(nowSelectDevice, btnDeviceName.Text.Trim());
                         if (result == false)
                         {
                             return;
@@ -212,7 +212,7 @@
         private void InitTopRightMenu()
         {
             //妫�娴嬫鍥炶矾鏄惁鎷ユ湁瀹氫綅鍔熻兘
-            if (Common.LocalDevice.Current.DeviceIsCanFixedPosition(nowSelectDevice) == false
+            if (HdlDeviceCommonLogic.Current.DeviceIsCanFixedPosition(nowSelectDevice) == false
                 || Common.Config.Instance.Home.IsShowTemplate == true)
             {
                 return;
@@ -236,7 +236,7 @@
             int menuCount = 1;
             string deviceMenu = string.Empty;
             //妫�娴嬫鍥炶矾鏄惁鎷ユ湁瀹氫綅鍔熻兘
-            bool canTest = Common.LocalDevice.Current.DeviceIsCanFixedPosition(nowSelectDevice);
+            bool canTest = HdlDeviceCommonLogic.Current.DeviceIsCanFixedPosition(nowSelectDevice);
             //if (canTest == true)
             //{
             //    menuCount = 2;
@@ -249,7 +249,7 @@
                 frame.AddRowMenu(deviceMenu, "Item/FixedPosition.png", "Item/FixedPositionSelected.png", () =>
                 {
                     //鍙戦�佸畾浣嶅姛鑳�
-                    Common.LocalDevice.Current.SetFixedPositionCommand(nowSelectDevice);
+                    HdlDeviceCommonLogic.Current.SetFixedPositionCommand(nowSelectDevice);
                 });
             }
 
@@ -300,7 +300,7 @@
         private void AddBackLightRow()
         {
             //娌充笢璁惧鎵嶄細寮�鍚閫夐」
-            if (Common.LocalDevice.Current.IsHdlDevice(nowSelectDevice) == true)
+            if (HdlDeviceCommonLogic.Current.IsHdlDevice(nowSelectDevice) == true)
             {
                 //鑳屽厜鐏�
                 string caption = Language.StringByID(R.MyInternationalizationString.uBackLight);
@@ -328,14 +328,14 @@
         /// </summary>
         private void AddVibrationFeedbackRow()
         {
-            var listDevice = Common.LocalDevice.Current.GetDevicesByMac(nowSelectDevice.DeviceAddr, false);
-            var myType = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice);
+            var listDevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(nowSelectDevice.DeviceAddr, false);
+            var myType = HdlDeviceCommonLogic.Current.GetMyDeviceEnumInfo(listDevice);
             //鍙湁绠�绾﹂潰鏉挎墠浼氭湁杩欎釜鑿滃崟
-            if (myType.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleTwo
-                || myType.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleThree
-                || myType.ConcreteType == Common.DeviceConcreteType.ButtonPanel_SimpleFour
-                || myType.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FourButtonScene
-                || myType.ConcreteType == Common.DeviceConcreteType.ButtonPanel_TwoButtonCurtain)
+            if (myType.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleTwo
+                || myType.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleThree
+                || myType.ConcreteType == DeviceConcreteType.ButtonPanel_SimpleFour
+                || myType.ConcreteType == DeviceConcreteType.ButtonPanel_FourButtonScene
+                || myType.ConcreteType == DeviceConcreteType.ButtonPanel_TwoButtonCurtain)
             {
                 //闇囧姩鍙嶉
                 var rowContr = new FrameRowControl(listview.rowSpace / 2);
@@ -421,7 +421,7 @@
         private void InitDeviceEpointIcon(VerticalFrameControl listBackControl)
         {
             bool hadDevice = false;
-            var listDevice = Common.LocalDevice.Current.GetDevicesByMac(deviceObj.DeviceAddr);
+            var listDevice = HdlDeviceCommonLogic.Current.GetDevicesByMac(deviceObj.DeviceAddr);
             var listOffSwitch = new List<CommonDevice>();
             foreach (var device in listDevice)
             {
@@ -666,7 +666,7 @@
             nowContr.BorderColor = 0xfffb744a;
 
             nowSelectControl = nowContr;
-            nowSelectDevice = Common.LocalDevice.Current.GetDevice(deviceObj.DeviceAddr, Convert.ToInt32(nowContr.Name.Replace("btn", string.Empty)));
+            nowSelectDevice = HdlDeviceCommonLogic.Current.GetDevice(deviceObj.DeviceAddr, Convert.ToInt32(nowContr.Name.Replace("btn", string.Empty)));
 
             //閲嶆柊鍒濆鍖栬彍鍗曡
             this.InitMenuRow();

--
Gitblit v1.8.0