From 83d3a5b39efa7bea47ed418cab8ebc2f9fec8b14 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期三, 23 十二月 2020 12:44:24 +0800 Subject: [PATCH] 20201223-4 --- HDL_ON/Common/ApiUtlis.cs | 41 ++++++++++---------- .vs/HDL_APP_Project/xs/UserPrefs.xml | 22 ++++++---- HDL_ON/DAL/DriverLayer/Control.cs | 6 ++ HDL_ON/UI/MainPage.cs | 2 4 files changed, 40 insertions(+), 31 deletions(-) diff --git a/.vs/HDL_APP_Project/xs/UserPrefs.xml b/.vs/HDL_APP_Project/xs/UserPrefs.xml index 9ebb756..e7870b3 100644 --- a/.vs/HDL_APP_Project/xs/UserPrefs.xml +++ b/.vs/HDL_APP_Project/xs/UserPrefs.xml @@ -1,12 +1,16 @@ 锘�<Properties StartupConfiguration="{D998E133-F0DD-4760-BE3C-461632F54DA4}|Default"> - <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneDeviceTarget.00008020-000404163432002E" /> - <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs"> + <MonoDevelop.Ide.ItemProperties.HDL-ON__iOS PreferredExecutionTarget="MonoDevelop.IPhone.IPhoneSimulatorTarget.94B44E9C-E1BC-4BF7-812E-FC71E9B623B2" /> + <MonoDevelop.Ide.Workbench ActiveDocument="HDL_ON/DAL/DriverLayer/Control.cs"> <Files> <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionControlZone.cs" Line="273" Column="88" /> <File FileName="HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs" Line="147" Column="24" /> - <File FileName="HDL_ON/Common/ApiUtlis.cs" Line="275" Column="64" /> - <File FileName="HDL_ON/Entity/Room.cs" Line="442" Column="34" /> + <File FileName="HDL_ON/Common/ApiUtlis.cs" Line="270" Column="22" /> + <File FileName="HDL_ON/Entity/Room.cs" Line="449" Column="47" /> <File FileName="HDL_ON/UI/UI2/FuntionControlView/ChooseRoomPageBLL.cs" Line="62" Column="51" /> + <File FileName="HDL_ON/UI/MainPage.cs" Line="212" Column="42" /> + <File FileName="HDL_ON/UI/UI2/UserPage.cs" Line="129" Column="50" /> + <File FileName="HDL_ON/UI/UI2/1-HomePage/HomePage.cs" Line="354" Column="62" /> + <File FileName="HDL_ON/DAL/DriverLayer/Control.cs" Line="1" Column="1" /> </Files> <Pads> <Pad Id="ProjectPad"> @@ -15,7 +19,9 @@ <Node name="HDL_ON" expanded="True"> <Node name="Common" expanded="True" /> <Node name="DAL" expanded="True"> - <Node name="DriverLayer" expanded="True" /> + <Node name="DriverLayer" expanded="True"> + <Node name="Control.cs" selected="True" /> + </Node> <Node name="Mqtt" expanded="True" /> <Node name="Server" expanded="True" /> </Node> @@ -31,9 +37,7 @@ <Node name="Scene" expanded="True" /> </Node> <Node name="4-PersonalCenter" expanded="True" /> - <Node name="FuntionControlView" expanded="True"> - <Node name="ChooseRoomPageBLL.cs" selected="True" /> - </Node> + <Node name="FuntionControlView" expanded="True" /> </Node> </Node> </Node> @@ -56,7 +60,7 @@ <String>Shared.Droid.TouchID/Shared.Droid.TouchID.csproj</String> <String>Shared.IOS/Shared.IOS.csproj</String> </DisabledProjects> - <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" /> + <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug" /> <MonoDevelop.Ide.ItemProperties.HDL-ON__Android PreferredExecutionTarget="Android.SelectDevice" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> <BreakpointStore> diff --git a/HDL_ON/Common/ApiUtlis.cs b/HDL_ON/Common/ApiUtlis.cs index 069acdc..d1aace8 100644 --- a/HDL_ON/Common/ApiUtlis.cs +++ b/HDL_ON/Common/ApiUtlis.cs @@ -55,7 +55,7 @@ return result; } - public bool DownloadDataComplete = false; + public bool DownloadDataComplete = true; /// <summary> /// 涓嬭浇鏁版嵁 /// </summary> @@ -64,7 +64,7 @@ if (MainPage.InternetStatus == 0) return; //绾跨▼寮�濮嬫椂闂� - var beginTime = DateTime.MinValue; + var beginTime = DateTime.Now.AddSeconds(6); DownloadDataComplete = false; @@ -194,7 +194,7 @@ var pack = Ins.HttpRequest.GetSceneList(); if (pack.Code == StateCode.SUCCESS) { - MainPage.Log($"璇诲彇鍦烘櫙鏁版嵁鎴愬姛");//:\r\n{pack.Data.ToString()}"); + MainPage.Log($"璇诲彇鍦烘櫙鏁版嵁鎴愬姛"); var sceneList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<Scene>>(pack.Data.ToString()); if (sceneList != null) { @@ -249,7 +249,7 @@ { Application.RunOnMainThread(() => { - beginTime = DateTime.Now; + beginTime = DateTime.MinValue; DownloadDataComplete = true; waitPage.Hide(); waitPage.RemoveFromParent(); @@ -260,31 +260,32 @@ downloadDataThread.Start(); //缃戠粶鍗¢】锛岀粓姝笅杞界嚎绋� - new System.Threading.Thread(() => { - while (beginTime.AddSeconds(6) > DateTime.Now) + new System.Threading.Thread(() => + { + while (beginTime < DateTime.Now) { - if(DownloadDataComplete) + if (DownloadDataComplete) { break; } System.Threading.Thread.Sleep(100); } - if (DownloadDataComplete) - { - //涓嬭浇瀹屾垚鍒濆鍖栨暟鎹� - SpatialInfo.CurrentSpatial.Clear(); - - - } - else + if (!DownloadDataComplete) { downloadDataThread.Abort(); - Application.RunOnMainThread(() => { - waitPage.Hide(); - waitPage.RemoveFromParent(); - }); } - }) { IsBackground = true }.Start(); + DownloadDataComplete = true; + Application.RunOnMainThread(() => + { + waitPage.Hide(); + waitPage.RemoveFromParent(); + }); + //鍒濆鍖栨暟鎹� + //SpatialInfo.CurrentSpatial.Clear(); + + + }) + { IsBackground = true }.Start(); } } } diff --git a/HDL_ON/DAL/DriverLayer/Control.cs b/HDL_ON/DAL/DriverLayer/Control.cs index d6da0f6..8546d1d 100644 --- a/HDL_ON/DAL/DriverLayer/Control.cs +++ b/HDL_ON/DAL/DriverLayer/Control.cs @@ -241,7 +241,11 @@ { if (Ins.IsRemote || DB_ResidenceData.Instance.GatewayType == 1) { - ControlAProtocolScene(scene); + new System.Threading.Thread(() => + { + ControlAProtocolScene(scene); + }) + { IsBackground = true }.Start(); } else { diff --git a/HDL_ON/UI/MainPage.cs b/HDL_ON/UI/MainPage.cs index 14fe9bd..324c146 100644 --- a/HDL_ON/UI/MainPage.cs +++ b/HDL_ON/UI/MainPage.cs @@ -158,7 +158,7 @@ //鍔犺浇Loading鏁堟灉 var waitPage = new Loading(); BaseView.AddChidren(waitPage); - waitPage.Start(Language.StringByID(StringId.PleaseWait)); + waitPage.Start("sdfghjkl");// (Language.StringByID(StringId.PleaseWait)); //褰撴病鏈変綇瀹呮椂,涓嶈兘璁╁畠寰�涓嬭蛋 if (UserInfo.Current.regionList.Count == 0) -- Gitblit v1.8.0