From fe3b2466c68b5db70d38e78039703add3b8b1dfe Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 31 十二月 2020 19:29:43 +0800 Subject: [PATCH] 合并了代码 --- ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs b/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs index cc76472..a994e30 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 = HdlControlResourse.XXLeft; + btnTitle.X = ControlCommonResourse.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 = HdlDeviceCommonLogic.Current.GetDevice(listAdjustTarget[i].DeviceAddr, listAdjustTarget[i].Epoint); + var device = Common.LocalDevice.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 = HdlDeviceCommonLogic.Current.GetDevice(data.DeviceAddr, data.Epoint); + var device = Common.LocalDevice.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) - HdlControlResourse.XXLeft; + rowDevice.frameTable.LeftOffset = Application.GetRealWidth(104) - ControlCommonResourse.XXLeft; rowDevice.InitControl(); rowDevice.frameTable.UseClickStatu = false; @@ -550,7 +550,7 @@ rowScene.MainKeys = index.ToString(); frameTargetTableControl.AddChidren(rowScene); //鎺т欢鍚戝彸鍋忕Щ - rowScene.frameTable.LeftOffset = Application.GetRealWidth(104) - HdlControlResourse.XXLeft; + rowScene.frameTable.LeftOffset = Application.GetRealWidth(104) - ControlCommonResourse.XXLeft; rowScene.InitControl(); if (addLine == true) { @@ -610,7 +610,7 @@ rowDelay.MainKeys = index.ToString(); frameTargetTableControl.AddChidren(rowDelay); //鎺т欢鍚戝彸鍋忕Щ - rowDelay.frameTable.LeftOffset = Application.GetRealWidth(104) - HdlControlResourse.XXLeft; + rowDelay.frameTable.LeftOffset = Application.GetRealWidth(104) - ControlCommonResourse.XXLeft; rowDelay.frameTable.UseClickStatu = false; //鍥炬爣 var btnIcon = rowDelay.frameTable.AddLeftIcon(); @@ -678,6 +678,10 @@ }; } } + + #endregion + + #region 鈻� 鑾峰彇鎵ц鐩爣_______________________ /// <summary> /// 浠庣綉鍏宠幏鍙栧満鏅殑鎵ц鐩爣 @@ -751,7 +755,7 @@ this.isAdjustTargetChanged = true; foreach (var mainKey in dicData.Keys) { - var device = HdlDeviceCommonLogic.Current.GetDevice(mainKey); + var device = LocalDevice.Current.GetDevice(mainKey); var data = new Scene.DeviceListData(); data.Type = 0; data.DeviceAddr = device.DeviceAddr; @@ -863,7 +867,7 @@ var fileName = $"SceneIcon_{tradeTime}.png"; //鐢熸垚鏂囦欢鍥剧墖 IO.FileUtils.WriteFileByBytes(System.IO.Path.Combine(Config.Instance.FullPath, fileName), this.btnScenePic.ImageBytes); - HdlBackupLogic.Current.AddOrEditorAutoBackFileStatu(fileName); + HdlAutoBackupLogic.AddOrEditorFile(fileName); this.cloneScene.IconPath = fileName; } //杞Щ灞炴�� @@ -933,7 +937,7 @@ { //鍒犻櫎鑷畾涔夊浘鐗� HdlFileLogic.Current.DeleteFile(System.IO.Path.Combine(Config.Instance.FullPath, this.editorScene.IconPath)); - HdlBackupLogic.Current.DeleteAutoBackFileStatu(this.editorScene.IconPath); + HdlAutoBackupLogic.DeleteFile(this.editorScene.IconPath); } if (this.cloneScene.IconPathType != 0) { @@ -942,7 +946,7 @@ var fileName = $"SceneIcon_{tradeTime}.png"; //鐢熸垚鏂囦欢鍥剧墖 IO.FileUtils.WriteFileByBytes(System.IO.Path.Combine(Config.Instance.FullPath, fileName), this.btnScenePic.ImageBytes); - HdlBackupLogic.Current.AddOrEditorAutoBackFileStatu(fileName); + HdlAutoBackupLogic.AddOrEditorFile(fileName); this.cloneScene.IconPath = fileName; } } -- Gitblit v1.8.0