From f23ad1b3f9f6193f35f72104d690b21dc67d5c1f Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 06 七月 2020 12:35:25 +0800 Subject: [PATCH] 去掉了访问外网的异步 --- ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs | 65 ++++++++++++++++---------------- 1 files changed, 33 insertions(+), 32 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs index 2526f82..7bfb326 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/HideOption/HideOptionMainForm.cs @@ -126,36 +126,6 @@ form.AddForm(); }; -#if Android - row1 = new FrameRowControl(listView.rowSpace / 2); - row1.UseClickStatu = false; - listView.AddChidren(row1); - row1.AddLeftCaption("GBS瀹氫綅", 500); - row1.AddBottomLine(); - var btnGbsSwitch = row1.AddMostRightSwitchIcon(); - string checkFile = System.IO.Path.Combine(Shared.IO.FileUtils.RootPath, Shared.Phone.UserCenter.DirNameResourse.OpenGbsFile); - if (System.IO.File.Exists(checkFile) == true) - { - btnGbsSwitch.IsSelected = true; - } - btnGbsSwitch.ButtonClickEvent += (sender, e) => - { - this.ShowMassage(ShowMsgType.Confirm, "娉ㄦ剰:寮�鍚垨鑰呭叧闂鍔熻兘浼氶噸鍚疉pp", () => - { - btnGbsSwitch.IsSelected = !btnGbsSwitch.IsSelected; - if (btnGbsSwitch.IsSelected == true) - { - var file = System.IO.File.Create(checkFile); - file.Close(); - } - else - { - System.IO.File.Delete(checkFile); - } - HDLUtils.RestartApp(); - }); - }; -#endif row1 = new FrameRowControl(listView.rowSpace / 2); listView.AddChidren(row1); row1.AddLeftCaption("璁惧缂撳瓨鍙橀噺", 500); @@ -167,6 +137,35 @@ form.AddForm(); }; + row1 = new FrameRowControl(listView.rowSpace / 2); + listView.AddChidren(row1); + row1.AddLeftCaption("鏀堕泦鍙戦�佸拰鎺ユ敹鐨勬暟鎹�", 600); + row1.AddBottomLine(); + var btnSwitchLog = row1.AddMostRightSwitchIcon(); + btnSwitchLog.ButtonClickEvent += (sender, e) => + { + if (btnSwitchLog.IsSelected == false) + { + this.ShowMassage(ShowMsgType.Confirm, "鏄惁鎵撳紑璁板綍鍙戦�佸強鎺ユ敹鏁版嵁鐨勮褰�?", () => + { + btnSwitchLog.IsSelected = true; + HdlFileLogic.Current.DeleteFile(DirNameResourse.SendAndReceveDataLog); + UserCenterResourse.HideOption.WriteSendAndReceveDataToFile = 1; + }); + } + else + { + btnSwitchLog.IsSelected = false; + var txtvalue = HdlFileLogic.Current.ReadFileTextContent(DirNameResourse.SendAndReceveDataLog); + if (txtvalue != null) + { + var form = new HideOptionFileContentForm(); + form.AddForm(string.Empty); + + form.SetTextContent(txtvalue); + } + } + }; row1 = new FrameRowControl(listView.rowSpace / 2); listView.AddChidren(row1); @@ -176,9 +175,9 @@ { this.ShowMassage(ShowMsgType.Confirm, "鏄惁涓婁紶Log鏂囦欢", () => { - HdlThreadLogic.Current.RunThread(async () => + HdlThreadLogic.Current.RunThread(() => { - await HdlBackupLogic.Current.UpLoadLogBackup(); + HdlBackupLogic.Current.UpLoadLogBackup(); }); }); }; @@ -285,6 +284,8 @@ { Shared.Phone.UserCenter.UserCenterResourse.DicReceiveGatewayTest = null; UserCenterResourse.HideOption.CheckCanReceiveGateway = 0; + UserCenterResourse.HideOption.WriteSendAndReceveDataToFile = 1; + base.CloseFormBefore(); } -- Gitblit v1.8.0