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/Category/AddOrEditorSceneForm.cs |   24 ++++++++++--------------
 1 files changed, 10 insertions(+), 14 deletions(-)

diff --git a/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs b/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
index a994e30..cc76472 100755
--- a/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
@@ -233,7 +233,7 @@
 
             //淇℃伅缂栬緫
             var btnTitle = new NormalViewControl(300, 60, true);
-            btnTitle.X = ControlCommonResourse.XXLeft;
+            btnTitle.X = HdlControlResourse.XXLeft;
             btnTitle.Y = Application.GetRealHeight(46);
             btnTitle.TextSize = 15;
             btnTitle.TextID = R.MyInternationalizationString.uInfoEditor;
@@ -353,7 +353,7 @@
                 if (listAdjustTarget[i].Type == 0)
                 {
                     //璁惧
-                    var device = Common.LocalDevice.Current.GetDevice(listAdjustTarget[i].DeviceAddr, listAdjustTarget[i].Epoint);
+                    var device = HdlDeviceCommonLogic.Current.GetDevice(listAdjustTarget[i].DeviceAddr, listAdjustTarget[i].Epoint);
                     if (device == null)
                     {
                         //涓嶆樉绀鸿繖涓笉瀛樺湪鏈湴鐨勮澶�
@@ -414,12 +414,12 @@
         private void AddDeviceTargetRow(Scene.DeviceListData data, int index, bool addLine)
         {
             //璁惧
-            var device = Common.LocalDevice.Current.GetDevice(data.DeviceAddr, data.Epoint);
+            var device = HdlDeviceCommonLogic.Current.GetDevice(data.DeviceAddr, data.Epoint);
             var rowDevice = new DeviceRoomControl(device, frameTargetTableControl.rowSpace / 2);
             rowDevice.MainKeys = index.ToString();
             this.frameTargetTableControl.AddChidren(rowDevice);
             //鎺т欢鍚戝彸鍋忕Щ
-            rowDevice.frameTable.LeftOffset = Application.GetRealWidth(104) - ControlCommonResourse.XXLeft;
+            rowDevice.frameTable.LeftOffset = Application.GetRealWidth(104) - HdlControlResourse.XXLeft;
             rowDevice.InitControl();
             rowDevice.frameTable.UseClickStatu = false;
 
@@ -550,7 +550,7 @@
             rowScene.MainKeys = index.ToString();
             frameTargetTableControl.AddChidren(rowScene);
             //鎺т欢鍚戝彸鍋忕Щ
-            rowScene.frameTable.LeftOffset = Application.GetRealWidth(104) - ControlCommonResourse.XXLeft;
+            rowScene.frameTable.LeftOffset = Application.GetRealWidth(104) - HdlControlResourse.XXLeft;
             rowScene.InitControl();
             if (addLine == true)
             {
@@ -610,7 +610,7 @@
             rowDelay.MainKeys = index.ToString();
             frameTargetTableControl.AddChidren(rowDelay);
             //鎺т欢鍚戝彸鍋忕Щ
-            rowDelay.frameTable.LeftOffset = Application.GetRealWidth(104) - ControlCommonResourse.XXLeft;
+            rowDelay.frameTable.LeftOffset = Application.GetRealWidth(104) - HdlControlResourse.XXLeft;
             rowDelay.frameTable.UseClickStatu = false;
             //鍥炬爣
             var btnIcon = rowDelay.frameTable.AddLeftIcon();
@@ -678,10 +678,6 @@
                 };
             }
         }
-
-        #endregion
-
-        #region 鈻� 鑾峰彇鎵ц鐩爣_______________________
 
         /// <summary>
         /// 浠庣綉鍏宠幏鍙栧満鏅殑鎵ц鐩爣
@@ -755,7 +751,7 @@
                     this.isAdjustTargetChanged = true;
                     foreach (var mainKey in dicData.Keys)
                     {
-                        var device = LocalDevice.Current.GetDevice(mainKey);
+                        var device = HdlDeviceCommonLogic.Current.GetDevice(mainKey);
                         var data = new Scene.DeviceListData();
                         data.Type = 0;
                         data.DeviceAddr = device.DeviceAddr;
@@ -867,7 +863,7 @@
                 var fileName = $"SceneIcon_{tradeTime}.png";
                 //鐢熸垚鏂囦欢鍥剧墖
                 IO.FileUtils.WriteFileByBytes(System.IO.Path.Combine(Config.Instance.FullPath, fileName), this.btnScenePic.ImageBytes);
-                HdlAutoBackupLogic.AddOrEditorFile(fileName);
+                HdlBackupLogic.Current.AddOrEditorAutoBackFileStatu(fileName);
                 this.cloneScene.IconPath = fileName;
             }
             //杞Щ灞炴��
@@ -937,7 +933,7 @@
                 {
                     //鍒犻櫎鑷畾涔夊浘鐗�
                     HdlFileLogic.Current.DeleteFile(System.IO.Path.Combine(Config.Instance.FullPath, this.editorScene.IconPath));
-                    HdlAutoBackupLogic.DeleteFile(this.editorScene.IconPath);
+                    HdlBackupLogic.Current.DeleteAutoBackFileStatu(this.editorScene.IconPath);
                 }
                 if (this.cloneScene.IconPathType != 0)
                 {
@@ -946,7 +942,7 @@
                     var fileName = $"SceneIcon_{tradeTime}.png";
                     //鐢熸垚鏂囦欢鍥剧墖
                     IO.FileUtils.WriteFileByBytes(System.IO.Path.Combine(Config.Instance.FullPath, fileName), this.btnScenePic.ImageBytes);
-                    HdlAutoBackupLogic.AddOrEditorFile(fileName);
+                    HdlBackupLogic.Current.AddOrEditorAutoBackFileStatu(fileName);
                     this.cloneScene.IconPath = fileName;
                 }
             }

--
Gitblit v1.8.0