From 78c5b5715518c0017d9f629ce16ee9c173a48690 Mon Sep 17 00:00:00 2001 From: 陈嘉乐 <cjl@hdlchina.com.cn> Date: 星期五, 28 八月 2020 09:59:18 +0800 Subject: [PATCH] 2020-08-28-1 --- ZigbeeApp/Shared/Common/CommonPage.cs | 4 -- ZigbeeApp/Shared/Phone/Device/Logic/Send.cs | 4 +- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs | 7 ++- ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml | 20 ++++----- ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide | 0 ZigbeeApp/Shared/Phone/Device/Logic/Method.cs | 50 ++++++++++++++++++++----- 6 files changed, 56 insertions(+), 29 deletions(-) diff --git a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml index d998a23..f559f63 100644 --- a/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml +++ b/ZigbeeApp/.vs/GateWay/xs/UserPrefs.xml @@ -1,11 +1,12 @@ 锘�<Properties StartupConfiguration="{28EDE1FF-20EF-476B-8AF8-24A3EEB69F45}|Default"> <MonoDevelop.Ide.ItemProperties.GateWay.Droid AndroidDesignerPreferredTheme="MyTheme1" AndroidDesignerPreferredDevice="Nexus 4" PreferredExecutionTarget="Android.5c86e4357d63" /> <MonoDevelop.Ide.ItemProperties.ShardLib PreferredExecutionTarget="Android.Android_Accelerated_Oreo" /> - <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/Logic/SkipView.cs"> + <MonoDevelop.Ide.Workbench ActiveDocument="Shared/Phone/Device/Logic/LogicCommunalPage.cs"> <Files> - <File FileName="Shared/Phone/Device/Logic/Send.cs" Line="1" Column="1" /> - <File FileName="Shared/Phone/Device/Logic/SkipView.cs" Line="462" Column="1" /> - <File FileName="Shared/Phone/ZigBee/Common/Application.cs" Line="302" Column="1" /> + <File FileName="Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs" Line="963" Column="48" /> + <File FileName="Shared/Phone/Device/Logic/Send.cs" Line="1326" Column="38" /> + <File FileName="Shared/Phone/Device/Logic/Method.cs" Line="843" Column="22" /> + <File FileName="Shared/Phone/Device/Logic/LogicCommunalPage.cs" Line="1" Column="1" /> </Files> <Pads> <Pad Id="ProjectPad"> @@ -16,12 +17,11 @@ <Node name="Phone" expanded="True"> <Node name="Device" expanded="True"> <Node name="Logic" expanded="True"> - <Node name="DoorLockLogic" expanded="True" /> - <Node name="SkipView.cs" selected="True" /> + <Node name="LogicCommunalPage.cs" selected="True" /> </Node> </Node> - <Node name="ZigBee" expanded="True"> - <Node name="Common" expanded="True" /> + <Node name="UserCenter" expanded="True"> + <Node name="CommonBase" expanded="True" /> </Node> </Node> </Node> @@ -34,9 +34,7 @@ <MonoDevelop.Ide.DebuggingService.PinnedWatches /> <MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|iPhone" /> <MonoDevelop.Ide.DebuggingService.Breakpoints> - <BreakpointStore> - <Breakpoint file="/Users/hdl/Desktop/wjc/HomeApp/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs" relfile="Shared/Phone/Device/Logic/SkipView.cs" line="462" column="1" /> - </BreakpointStore> + <BreakpointStore /> </MonoDevelop.Ide.DebuggingService.Breakpoints> <MultiItemStartupConfigurations /> </Properties> \ No newline at end of file diff --git a/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide b/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide index 9bd259c..4b0861b 100644 --- a/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide +++ b/ZigbeeApp/.vs/GateWay/xs/sqlite3/storage.ide Binary files differ diff --git a/ZigbeeApp/Shared/Common/CommonPage.cs b/ZigbeeApp/Shared/Common/CommonPage.cs index 0fa6d4d..61625ef 100644 --- a/ZigbeeApp/Shared/Common/CommonPage.cs +++ b/ZigbeeApp/Shared/Common/CommonPage.cs @@ -45,10 +45,6 @@ //} Phone.UserView.HomePage.Instance.InitPage(); - if (Shared.Phone.Device.Logic.Send.It_Exist == "1") - {//浠ユ湰鍦扮姸鎬佷负涓绘墦寮�GPS鏈嶅姟 - Application.StartGPSLocationService(); - } } //public static string RequestHttpsHost = "https://global.hdlcontrol.com/HangZhouHdlCloudApi"; diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs index 560bd30..62ce91a 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs @@ -901,28 +901,58 @@ UserView.HomePage.Instance.RemoveViewByTag("Logic");//绉婚櫎鎵�鏈夋爣璁癓ogic鐣岄潰 if (LogicView.IfString._Logic == if_logic) { - //鏌ヨ閫昏緫鏄惁娣诲姞鍦扮悊浣嶇疆浣滀负鏉′欢 + + //鏌ヨ-褰撳墠閫昏緫-鏄惁娣诲姞鍦扮悊浣嶇疆浣滀负鏉′欢 var exist = Common.Logic.CurrentLogic.Conditions.Find((obj) => obj["Type"] == "7"); if (exist==null) { - //濡傛灉鎵句笉鍒板湴鐞嗕綅缃綔涓烘潯浠剁殑璇�,鍏抽棴GPS鏈嶅姟(鍑忓皯鑰楃數) - if (Send.It_Exist == "1") + bool if_type = false; + //鏌ヨ-閫昏緫鍒楄〃-鏄惁娣诲姞杩囧湴鐞嗕綅缃綔涓烘潯浠� + for (int a = 0; a < Common.Logic.LogicList.Count; a++) { - //鍏抽棴GPS鏈嶅姟 - Application.StopGPSLocationService(); - //淇濆瓨GPS鏈嶅姟鍏抽棴鐘舵�� - Send.SaveLocalFile("GPS_File", "0"); + var logic = Common.Logic.LogicList[a]; + var exist_logic = logic.Conditions.Find((obj) => obj["Type"] == "7"); + if (exist_logic != null) + { + //鏄惁瀛樺湪鍦扮悊浣嶇疆鏉′欢 + if_type = true; + //閫�鍑篺or寰幆 + break; + } + } + if (if_type) + { + //鏌ヨ涔嬪墠鐘舵�佹槸鍚﹀凡缁忓紑鍚疓PS鏈嶅姟(浠ユ湰鍦板瓨鍌ㄧ姸鎬佷负涓� 0:娌″紑鍚�; 1锛氬紑鍚�) + if (Send.If_Exist == "0") + { + //寮�鍚疓PS鏈嶅姟 + Application.StartGPSLocationService(); + //淇濆瓨GPS鏈嶅姟寮�鍚姸鎬� + Send.SaveLocalFile(Config.Instance.HomeId + "_GPS_File", "1"); + } + + } + else + { + //濡傛灉鎵句笉鍒板湴鐞嗕綅缃綔涓烘潯浠剁殑璇�,鍏抽棴GPS鏈嶅姟(鍑忓皯鑰楃數) + if (Send.If_Exist == "1") + { + //鍏抽棴GPS鏈嶅姟 + Application.StopGPSLocationService(); + //淇濆瓨GPS鏈嶅姟鍏抽棴鐘舵�� + Send.SaveLocalFile(Config.Instance.HomeId + "_GPS_File", "0"); + } } } else { - if (Send.It_Exist == "0") + //鏌ヨ涔嬪墠鐘舵�佹槸鍚﹀凡缁忓紑鍚疓PS鏈嶅姟(浠ユ湰鍦板瓨鍌ㄧ姸鎬佷负涓� 0:娌″紑鍚�; 1锛氬紑鍚�) + if (Send.If_Exist == "0") { - //寮�鍚疓PS鏈嶅姟 Application.StartGPSLocationService(); //淇濆瓨GPS鏈嶅姟寮�鍚姸鎬� - Send.SaveLocalFile("GPS_File", "1"); + Send.SaveLocalFile(Config.Instance.HomeId + "_GPS_File", "1"); } } //鍙埛鏂板垎绫�-鑷姩鍖栦笂涓嬫粦鍔╲iew锛� diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs index 14495cf..dd59da9 100644 --- a/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/Send.cs @@ -1323,11 +1323,11 @@ /// <summary> /// 鍒ゆ柇鏄惁寮�鍚疓PS鏈嶅姟 /// </summary> - public static string It_Exist + public static string If_Exist { get { - string value = ReadLocalFile("GPS_File"); + string value = ReadLocalFile(Config.Instance.HomeId+"_GPS_File"); //璇诲彇鏈湴GPS鏈嶅姟鐘舵�� if (value == "0"||string.IsNullOrEmpty(value)) { diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs old mode 100755 new mode 100644 index a5f4373..8768fa6 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs @@ -959,8 +959,11 @@ ShowGuideForm(result); } //APP缂撳瓨鍔犺浇瀹屾垚 - UserCenterResourse.AccountOption.AppCanSignout = true; - + UserCenterResourse.AccountOption.AppCanSignout = true; + if (Shared.Phone.Device.Logic.Send.If_Exist == "1") + {//浠ユ湰鍦扮姸鎬佷负涓绘墦寮�GPS鏈嶅姟 + Application.StartGPSLocationService(); + } return true; } -- Gitblit v1.8.0