From a45fe56aeeac8f28a9891b83362954067c8166dc Mon Sep 17 00:00:00 2001
From: xm <1271024303@qq.com>
Date: 星期五, 14 八月 2020 09:07:05 +0800
Subject: [PATCH] 请合并新代码,更改多功能面板绑定表重复问题
---
ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs | 23 ++++++++++++++---------
1 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs b/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
index 9655afe..3c1a90e 100755
--- a/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
+++ b/ZigbeeApp/Shared/Phone/Category/AddOrEditorSceneForm.cs
@@ -291,10 +291,10 @@
this.ShowAddTargetMenu();
};
- HdlThreadLogic.Current.RunThread(async () =>
+ HdlThreadLogic.Current.RunThread(() =>
{
//浠庣綉鍏宠幏鍙栧満鏅殑鎵ц鐩爣
- var result = await this.GetSceneTargetList();
+ var result = this.GetSceneTargetList();
if (result == true)
{
//娣诲姞銆愭墽琛岀洰鏍囪銆�
@@ -633,7 +633,7 @@
/// 浠庣綉鍏宠幏鍙栧満鏅殑鎵ц鐩爣
/// </summary>
/// <returns></returns>
- private async System.Threading.Tasks.Task<bool> GetSceneTargetList()
+ private bool GetSceneTargetList()
{
if (this.editorScene == null || this.listAdjustTarget != null)
{
@@ -643,7 +643,7 @@
//鎵撳紑杩涘害鏉�
this.ShowProgressBar();
//鑾峰彇鎵ц鐩爣鍒楄〃
- var listData = await HdlSceneLogic.Current.GetAdjustTargetList(this.editorScene);
+ var listData = HdlSceneLogic.Current.GetAdjustTargetList(this.editorScene);
if (listData == null)
{
this.CloseProgressBar(ShowReLoadMode.YES);
@@ -789,10 +789,10 @@
/// <summary>
/// 淇濆瓨鏂板缓鐨勫満鏅�
/// </summary>
- private async void SaveSceneDataByNewMode()
+ private void SaveSceneDataByNewMode()
{
//娣诲姞鍦烘櫙
- this.editorScene = await HdlSceneLogic.Current.AddNewSceneToGateway(this.cloneScene.Name, this.listAdjustTarget);
+ this.editorScene = HdlSceneLogic.Current.AddNewSceneToGateway(this.cloneScene.Name, this.listAdjustTarget);
//鍏抽棴杩涘害鏉�
this.CloseProgressBar();
@@ -844,6 +844,8 @@
var result = await HdlSceneLogic.Current.EditorSceneNameFromGateway(this.editorScene, this.cloneScene.Name);
if (result == false)
{
+ //鍏抽棴杩涘害鏉�
+ this.CloseProgressBar();
return;
}
}
@@ -851,10 +853,10 @@
{
//淇敼鍦烘櫙
var result = await HdlSceneLogic.Current.EditorSceneFromGateway(this.editorScene, this.listAdjustTarget);
- //鍏抽棴杩涘害鏉�
- this.CloseProgressBar();
if (result == false)
{
+ //鍏抽棴杩涘害鏉�
+ this.CloseProgressBar();
return;
}
}
@@ -880,7 +882,7 @@
if (this.editorScene.IconPathType != 0)
{
//鍒犻櫎鑷畾涔夊浘鐗�
- Shared.IO.FileUtils.DeleteFile(System.IO.Path.Combine(Config.Instance.FullPath, this.editorScene.IconPath));
+ HdlFileLogic.Current.DeleteFile(System.IO.Path.Combine(Config.Instance.FullPath, this.editorScene.IconPath));
HdlAutoBackupLogic.DeleteFile(this.editorScene.IconPath);
}
if (this.cloneScene.IconPathType != 0)
@@ -904,6 +906,9 @@
//缂栬緫鍦烘櫙,涓婚〉闇�瑕侀噸鏂板埛鏂�
UserView.UserPage.Instance.RefreshAllForm = true;
+ //鍏抽棴杩涘害鏉�
+ this.CloseProgressBar();
+
HdlThreadLogic.Current.RunMain(() =>
{
//璋冪敤鍥炶皟鍑芥暟
--
Gitblit v1.8.0