From 9c16d3614d9b88c637f967518a329f239fcd3aaf Mon Sep 17 00:00:00 2001 From: lss <316519258@qq.com> Date: 星期五, 12 六月 2020 09:22:04 +0800 Subject: [PATCH] 2020.06.12 --- ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundContentForDeviceChange.cs | 55 +++++++++++++++++++++++++++++-------------------------- 1 files changed, 29 insertions(+), 26 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundContentForDeviceChange.cs b/ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundContentForDeviceChange.cs old mode 100755 new mode 100644 index e9168d3..693e47c --- a/ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundContentForDeviceChange.cs +++ b/ZigbeeApp/Shared/Phone/SmartSound/Forms/SmartSoundContentForDeviceChange.cs @@ -285,9 +285,9 @@ //鐢熸垚涓�涓脊绐楃敾闈� var dialogForm = new DialogInputControl(); //缂栬緫浣忓畢 - dialogForm.SetTitleText("鑷畾涔夊敜閱掕瘝"); + dialogForm.SetTitleText("鑷畾涔夋樀绉�"); //璇疯緭鍏ヤ綇瀹呭悕绉� - dialogForm.SetTipText("璇疯緭鍏ュ敜閱掕瘝"); + dialogForm.SetTipText("璇疯緭鍏ユ樀绉�"); dialogForm.Text = scene.NicksName; //鎸変笅纭鎸夐挳 @@ -316,9 +316,9 @@ //鐢熸垚涓�涓脊绐楃敾闈� var dialogForm = new DialogInputControl(); //缂栬緫浣忓畢 - dialogForm.SetTitleText("鑷畾涔夊敜閱掕瘝"); + dialogForm.SetTitleText("鑷畾涔夋樀绉�"); //璇疯緭鍏ヤ綇瀹呭悕绉� - dialogForm.SetTipText("璇疯緭鍏ュ敜閱掕瘝"); + dialogForm.SetTipText("璇疯緭鍏ユ樀绉�"); dialogForm.Text = device.NicksName; //鎸変笅纭鎸夐挳 @@ -344,20 +344,22 @@ /// </summary> private void ShowSceneDelectDialog(SmartSound.Scene scene) { - this.ShowMassage(ShowMsgType.Confirm, "纭鍒犻櫎璇ユ帶鍒跺唴瀹癸紵", async () => - { - try + this.ShowMassage(ShowMsgType.Confirm, "纭鍒犻櫎璇ユ帶鍒跺唴瀹癸紵", () => + { + HdlThreadLogic.Current.RunThread(async () => { + this.ShowProgressBar(); CurrentRoom.SceneList.Remove(scene); - LoadSceneView(); string json = await postBatchEdit(); - } - catch (Exception e) - { - string sss = e.Message; - } - }, Language.StringByID(R.MyInternationalizationString.OkMsg)); + HdlThreadLogic.Current.RunMainInThread(() => + { + LoadSceneView(); + this.CloseProgressBar(); + }); + }); + + }, Language.StringByID(R.MyInternationalizationString.OkMsg)); } /// <summary> @@ -365,20 +367,21 @@ /// </summary> private void ShowDeviceDelectDialog(SmartSound.Device device) { - this.ShowMassage(ShowMsgType.Confirm, "纭鍒犻櫎璇ユ帶鍒跺唴瀹癸紵", async () => + this.ShowMassage(ShowMsgType.Confirm, "纭鍒犻櫎璇ユ帶鍒跺唴瀹癸紵", () => { - try - { - //DeviceListView.RemoveAt(index); - CurrentRoom.DeviceList.Remove(device); - RefreshFunctionListView(); - string json = await postBatchEdit(); - } - catch (Exception e) + HdlThreadLogic.Current.RunThread(async () => { - string sss = e.Message; - } + this.ShowProgressBar(); + CurrentRoom.DeviceList.Remove(device); + string json = await postBatchEdit(); + + HdlThreadLogic.Current.RunMainInThread(() => + { + RefreshFunctionListView(); + this.CloseProgressBar(); + }); + }); }, Language.StringByID(R.MyInternationalizationString.OkMsg)); } @@ -446,7 +449,7 @@ // 鎻愪氦鏁版嵁鑷虫湇鍔″櫒 string url = "https://developer.hdlcontrol.com/zigbeespeakerservice/BatchEdit"; string json = Newtonsoft.Json.JsonConvert.SerializeObject(SmartSound.getInstantiate()); - string response_str = await MyHttpWebResponse.PostWebRequest(url, json, Encoding.UTF8); + string response_str = MyHttpWebResponse.PostWebRequest(url, json, Encoding.UTF8); return response_str; } -- Gitblit v1.8.0