From 309f878169da2f0482dd40b81a84b606ed29cedf Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期四, 07 五月 2020 11:25:05 +0800 Subject: [PATCH] 上传 --- ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TipView.cs | 77 ++++++++++++ ZigbeeApp/Home.Ios/AppDelegate.cs | 1 ZigbeeApp/Shared/Common/CommonPage.cs | 2 ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs | 60 +++++---- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs | 6 + ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs | 3 ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs | 2 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs | 31 +++- ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs | 4 ZigbeeApp/Shared/Phone/Device/Logic/Method.cs | 121 ++++++++++++++----- ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs | 31 ++-- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs | 8 + 12 files changed, 256 insertions(+), 90 deletions(-) diff --git a/ZigbeeApp/Home.Ios/AppDelegate.cs b/ZigbeeApp/Home.Ios/AppDelegate.cs index 856f57d..219e0b2 100644 --- a/ZigbeeApp/Home.Ios/AppDelegate.cs +++ b/ZigbeeApp/Home.Ios/AppDelegate.cs @@ -25,6 +25,7 @@ public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { + Shared.Application.IsGpsEnable = false; Shared.Application.IsMusicEnable = false; base.FinishedLaunching(application, launchOptions); Shared.Application.FontSize = 12; diff --git a/ZigbeeApp/Shared/Common/CommonPage.cs b/ZigbeeApp/Shared/Common/CommonPage.cs index aa1c7ba..14d2409 100755 --- a/ZigbeeApp/Shared/Common/CommonPage.cs +++ b/ZigbeeApp/Shared/Common/CommonPage.cs @@ -57,7 +57,7 @@ /// <summary> /// 鐗堟湰鍙� /// </summary> - public static string CodeIDString = "1.0.20050601"; + public static string CodeIDString = "1.0.20050701"; /// <summary> /// 娉ㄥ唽鏉ユ簮(0:HDL On 1:Zigbee) /// </summary> diff --git a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs index d4b37b1..d5dbff1 100755 --- a/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs +++ b/ZigbeeApp/Shared/Phone/Category/CategoryMainForm.cs @@ -131,7 +131,7 @@ //搴旇鏄痓ody鍚� this.bodyFrameLayout = new FrameLayout(); bodyFrameLayout.Y = topFrameLayout.Bottom; - bodyFrameLayout.Height = Application.GetRealHeight(1549); + bodyFrameLayout.Height = this.Height - topFrameLayout.Bottom; bodyFrameLayout.BackgroundColor = ZigbeeColor.Current.GXCGrayBackgroundColor; this.AddChidren(bodyFrameLayout); diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TipView.cs b/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TipView.cs index 0a63986..ec84597 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TipView.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/LogicView/TipView.cs @@ -270,26 +270,27 @@ { if (string.IsNullOrEmpty(editTime.Text)) { - ShowTip(Language.StringByID(R.MyInternationalizationString.timeNull),true); + ShowErrorTip(Language.StringByID(R.MyInternationalizationString.timeNull),true); return; } if (int.Parse(editTime.Text) < 1 || int.Parse(editTime.Text) > 12) { ///闄愬埗杈撳叆鏁板瓧鑼冨洿; string str = Language.StringByID(R.MyInternationalizationString.less) + Language.StringByID(R.MyInternationalizationString.or) + Language.StringByID(R.MyInternationalizationString.more); - ShowTip(str, true); + ShowErrorTip(str, true); return; } dialog.Close(); action(editTime.Text); - }; + + }; } /// <summary> - /// 鎻愮ず妗� + /// 閿欒鎻愮ず妗� /// </summary> - public static void ShowTip(string tipText,bool _if ) + public static void ShowErrorTip(string tipText,bool _if ) { ///涓绘帶浠� Dialog dialog = new Dialog(); @@ -411,5 +412,71 @@ dialog.Close(); }; } + + /// <summary> + /// 闂敊鎻愮ず妗� + /// </summary> + public static void ShowFlashTip(string tipText,int timeValue=1) + { + ///涓绘帶浠� + Dialog dialog = new Dialog(); + dialog.Show(); + ///鑳屾櫙鐨勭埗鎺т欢 + FrameLayout fLayout = new FrameLayout { BackgroundColor = ZigbeeColor.Current.LogicTranslucentColor }; + dialog.AddChidren(fLayout); + fLayout.MouseUpEventHandler += (sender,e) => { + dialog.Close(); + + }; + ///寮规鐖舵帶浠� + FrameLayout tipFLayout = new FrameLayout + { + X = Application.GetRealWidth(230), + Y = Application.GetRealHeight(717), + Width = Application.GetRealWidth(622), + Height = Application.GetRealHeight(317), + BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor, + Radius = (uint)Application.GetRealHeight(17) + }; + fLayout.AddChidren(tipFLayout); + + ///鎻愮ず鎺т欢 + Button tipBtn = new Button + { + Y = Application.GetRealHeight(58), + X = Application.GetRealWidth(150), + Height = Application.GetRealHeight(63), + Width = Application.GetRealWidth(622 - 300), + TextID = R.MyInternationalizationString.tip, + TextAlignment = TextAlignment.Center, + TextColor = ZigbeeColor.Current.LogicTipColor, + TextSize = 16, + + }; + tipFLayout.AddChidren(tipBtn); + ///鏂囨湰鎺т欢 + Button Text1Btn = new Button + { + Y = Application.GetRealHeight(156), + X = Application.GetRealWidth(50), + Height = Application.GetRealHeight(58), + Width = Application.GetRealWidth(622 - 100), + Text = tipText, + TextAlignment = TextAlignment.Center, + TextColor = ZigbeeColor.Current.LogicBtnCancelColor, + TextSize = 14, + }; + tipFLayout.AddChidren(Text1Btn); + + new System.Threading.Thread(() => + { + System.Threading.Thread.Sleep(timeValue*1000); + Application.RunOnMainThread(() => + { + dialog.Close(); + }); + }) + { IsBackground = true }.Start(); + } } } diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs index 5df1e25..cb77e0c 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/Method.cs @@ -702,7 +702,11 @@ Common.Logic.CurrentLogic.LogicIsCustomPushText = 0; pushview.lineBtn.BackgroundColor = ZigbeeColor.Current.LogicBlankBackgroundColor; } - Send.Zj(LogicView.IfString.Tag, Common.Logic.CurrentLogic); + if (!Config.Instance.Home.IsVirtually) + { + Send.Zj(LogicView.IfString.Tag, Common.Logic.CurrentLogic); + + } }; if (Common.Logic.CurrentLogic.LogicIsCustomPushText == 0) @@ -759,43 +763,94 @@ bool succeed = false; //鍒ゆ柇鏄柊娣诲姞閫昏緫(榛樿0)杩樻槸淇敼閫昏緫 CommonPage.Loading.Start(); - if (CurrentLogic.LogicId == 0) - { - //鍙戦�佹坊鍔犻�昏緫鍛戒护 - var logicifon = await Send.AddModifyLogic(CurrentLogic); - if (logicifon != null && logicifon.LogicId != 0) - { - succeed = true; - CurrentLogic.LogicId = logicifon.LogicId; - if (LogicView.IfString._Logic == if_logic || LogicView.IfString._SoneLogic == if_logic) - { - //鑷姩鍖栭�昏緫鍒楄〃 - Common.Logic.LogicList.Add(CurrentLogic); - } - if (LogicView.IfString._LockLogic == if_logic) - { - //闂ㄩ攣鑱斿姩浜嬩欢閫昏緫鍒楄〃 - Common.Logic.LockLogicList.Add(CurrentLogic); - } - if (LogicView.IfString._SoneLogic == if_logic) - { - //Sone闂ㄩ攣鑱斿姩浜嬩欢閫昏緫鍒楄〃 - Common.Logic.SoneLogicList.Add(CurrentLogic); - } - if (tag) - { - Send.Zj(tag, CurrentLogic); - } + if (Config.Instance.Home.IsVirtually) + { + if (Common.Logic.LogicList.Count == 0) + { + CurrentLogic.LogicId = 1; + Common.Logic.LogicList.Add(CurrentLogic); } + + if (CurrentLogic.LogicId == 0) + { + bool d = false; + for (int i = 1; i < 50; i++) + { + + for (int j = 0; j < Common.Logic.LogicList.Count; j++) + { + if (i != Common.Logic.LogicList[j].LogicId) + { + CurrentLogic.LogicId = i; + Common.Logic.LogicList.Add(CurrentLogic); + d = true; + break; + } + } + if (d) + { + break; + } + } + + } + else + { + for (int j = 0; j < Common.Logic.LogicList.Count; j++) + { + if (CurrentLogic.LogicId == Common.Logic.LogicList[j].LogicId) + { + Common.Logic.LogicList.RemoveAt(j); + Common.Logic.LogicList.Insert(j,CurrentLogic); + break; + } + } + + } + + //鑷姩鍖栭�昏緫鍒楄〃 } else { - //鍙戦�佷慨鏀归�昏緫鍛戒护锛� - //淇敼鍛戒护涓嶉渶瑕佺瓑寰呭洖澶嶏紱 - Send.AddModifyLogic(CurrentLogic); - //缂栬緫榛樿鎴愬姛锛堜笉鑰冭檻缃戠粶鎯呭喌锛夛紱 - succeed = true; + if (CurrentLogic.LogicId == 0) + { + //鍙戦�佹坊鍔犻�昏緫鍛戒护 + var logicifon = await Send.AddModifyLogic(CurrentLogic); + if (logicifon != null && logicifon.LogicId != 0) + { + succeed = true; + CurrentLogic.LogicId = logicifon.LogicId; + if (LogicView.IfString._Logic == if_logic || LogicView.IfString._SoneLogic == if_logic) + { + //鑷姩鍖栭�昏緫鍒楄〃 + Common.Logic.LogicList.Add(CurrentLogic); + } + if (LogicView.IfString._LockLogic == if_logic) + { + //闂ㄩ攣鑱斿姩浜嬩欢閫昏緫鍒楄〃 + Common.Logic.LockLogicList.Add(CurrentLogic); + } + if (LogicView.IfString._SoneLogic == if_logic) + { + //Sone闂ㄩ攣鑱斿姩浜嬩欢閫昏緫鍒楄〃 + Common.Logic.SoneLogicList.Add(CurrentLogic); + + } + if (tag) + { + Send.Zj(tag, CurrentLogic); + } + } + } + else + { + //鍙戦�佷慨鏀归�昏緫鍛戒护锛� + //淇敼鍛戒护涓嶉渶瑕佺瓑寰呭洖澶嶏紱 + Send.AddModifyLogic(CurrentLogic); + //缂栬緫榛樿鎴愬姛锛堜笉鑰冭檻缃戠粶鎯呭喌锛夛紱 + succeed = true; + } } CommonPage.Loading.Hide(); diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs index 9f07ac1..374b643 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/SkipView.cs @@ -20,10 +20,8 @@ { case 0: { - - - ////new涓�涓柊閫昏緫瀵硅薄锛� - ////鏂板姝e父鑷姩鍖栧叆鍙� + //new涓�涓柊閫昏緫瀵硅薄锛� + //鏂板姝e父鑷姩鍖栧叆鍙� Common.Logic.CurrentLogic = new Common.Logic(); Common.Logic.CurrentLogic.IsEnable = 1;//榛樿涓哄紑 Common.Logic.CurrentLogic.LogicType = 0;//鏍囪閫昏緫绫诲瀷 @@ -66,8 +64,8 @@ } } - + #region 鈼� 鑷姩鍖朹_________________________ /// <summary> /// 鑷姩鍖栧姛鑳戒唬鐮佸叆鍙� @@ -263,34 +261,37 @@ CommonPage.Loading.Start(); try { - if (Common.Logic.LogicList.Count == 0) + if (!Config.Instance.Home.IsVirtually)//铏氭嫙鐨勪笉鑾峰彇缃戝叧閫昏緫鍒楄〃 { - var Idlist1 = await Send.GetLogicId(0);// - var Idlist2 = await Send.GetLogicId(2);//闂ㄩ攣甯稿紑妯″紡 - if (Idlist1.Count != 0) + if (Common.Logic.LogicList.Count == 0) { - var listlogic1 = await Send.ReadList(Idlist1.Count, 0); - for (int j = 0; j < listlogic1.Count; j++) + var Idlist1 = await Send.GetLogicId(0);// + var Idlist2 = await Send.GetLogicId(2);//闂ㄩ攣甯稿紑妯″紡 + if (Idlist1.Count != 0) { - var logic = listlogic1[j]; - if (logic.LogicType != 0) + var listlogic1 = await Send.ReadList(Idlist1.Count, 0); + for (int j = 0; j < listlogic1.Count; j++) { - continue; + var logic = listlogic1[j]; + if (logic.LogicType != 0) + { + continue; + } + Common.Logic.LogicList.Add(logic); } - Common.Logic.LogicList.Add(logic); } - } - if (Idlist2.Count != 0) - { - var listlogic2 = await Send.ReadList(Idlist2.Count, 2); - for (int j = 0; j < listlogic2.Count; j++) + if (Idlist2.Count != 0) { - var logic = listlogic2[j]; - if (logic.LogicType != 2) + var listlogic2 = await Send.ReadList(Idlist2.Count, 2); + for (int j = 0; j < listlogic2.Count; j++) { - continue; + var logic = listlogic2[j]; + if (logic.LogicType != 2) + { + continue; + } + Common.Logic.LogicList.Add(logic); } - Common.Logic.LogicList.Add(logic); } } } @@ -310,6 +311,7 @@ /// <param name="refresview">Refresview.</param> private static async void Automationview(VerticalRefreshLayout refresview, bool no) { + refresview.RemoveAll(); if (Common.Logic.LogicList.Count == 0 && no == false) { @@ -441,7 +443,10 @@ logic.IsEnable = 0; StatusColor(logic, logicRowlayout, 0); } - Send.LogicControlSwitch(logic); + if (!Config.Instance.Home.IsVirtually) + { + Send.LogicControlSwitch(logic); + } //Logic.Send.AddModifyLogic(logic); }; if (logic.IsEnable == 1) @@ -503,7 +508,10 @@ { Common.Logic.LogicList.Remove(logic); Automationview(refresview, no); - Send.DelLogic(logic.LogicId); + if (!Config.Instance.Home.IsVirtually) + { + Send.DelLogic(logic.LogicId); + } }; }; diff --git a/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs b/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs index 6da6680..d6bcbf8 100755 --- a/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs +++ b/ZigbeeApp/Shared/Phone/Device/Logic/SoneLogicList.cs @@ -120,7 +120,7 @@ } else { - ///鎻愮ず澶辫触 + LogicView.TipView.ShowFlashTip("鍏抽棴澶辫触"); } }; @@ -195,7 +195,7 @@ Height = Application.GetMinRealAverage(104), X = Application.GetRealWidth(861), Y = Application.GetRealHeight(17), - UnSelectedImagePath = "ZigeeLogic/next.png", + UnSelectedImagePath = "ZigeeLogic/nextIconSone.png", }; modeFl.AddChidren(nextIconBtn); @@ -203,7 +203,9 @@ nextIconBtn.MouseUpEventHandler += (sender, e) => { + LogicView.TipView.ShowConfrimTip(() => + {///鍐嶆纭 LogicView.TipView.ShowInputTip(true, async (str) => {///纭鍙戦�佸懡浠� @@ -213,10 +215,7 @@ var result = await UserCenter.DoorLock.DoorLockCommonInfo.SetNormallyOpenModeFuncAsync(Send.CurrentDoorLock); if (!result) { - Application.RunOnMainThread(() => - { - ///鎻愮ず澶辫触 - }); + LogicView.TipView.ShowFlashTip("寮�鍚け璐�"); return; } else @@ -226,8 +225,9 @@ var addResult = await SkipView.LockAddModifyLogic(int.Parse(str), Send.CurrentDoorLock);//娣诲姞涓�鏉″け鏁堥�昏緫 if (!addResult) { - ///鎻愮ず澶辫触 - return; + ///鎻愮ず澶辫触 + LogicView.TipView.ShowFlashTip("娣诲姞澶辫触"); + return; } Send.CurrentDoorLock.IsDoorLockNormallyMode = true; this.RemoveFromParent(); @@ -397,10 +397,11 @@ /// 鍔犺浇鑷姩鍖栧垪琛� /// </summary> /// <param name="verticalRefresh"></param> + RowLayout selectedRow = new RowLayout() { Tag = "0" };//璁板綍宸︽粦鐘舵�� + int i = 1; private void RefreshView(VerticalRefreshLayout verticalRefresh) { verticalRefresh.RemoveAll(); - foreach (var logic in Common.Logic.SoneLogicList) { #region 鑷姩鍖栧竷灞�View @@ -417,17 +418,19 @@ LineColor = ZigbeeColor.Current.LogicBackgroundColor, BackgroundColor = ZigbeeColor.Current.LogicBackgroundColor, SubViewWidth = Application.GetRealWidth(184),//鏀瑰彉缂栬緫鎺т欢瀹藉害澶氬皯锛� + Tag = i.ToString(), }; fLayout.AddChidren(logicRow); //宸︽粦鑿滃崟浜嬩欢 logicRow.OpenMenuAction += () => { - //if (selectedRow.Tag.ToString() != logicRowlayout.Tag.ToString()) - //{ //淇濈暀宸︽粦鍙湁涓�涓�; - // selectedRow.HideMenu();// - //} - //selectedRow = logicRowlayout; + if (selectedRow.Tag.ToString() != logicRow.Tag.ToString()) + { //淇濈暀宸︽粦鍙湁涓�涓�; + selectedRow.HideMenu();// + } + selectedRow = logicRow; }; + i++; ///鏄剧ず閫昏緫鍚嶇О鐨勬帶浠� var nameBtn = new Button { diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs index 6a0fd93..198308a 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlExperienceAccountLogic.cs @@ -561,6 +561,7 @@ //1涓紶鎰熷櫒 var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 }; device.IasDeviceType = 13; + device.DeviceID = 1026; //璁剧疆璁惧鐨勫熀鏈俊鎭� this.SetBaseDataToDevice(device, 1200, 1200, "MSPIR01-ZB.10", i_RoomId); @@ -581,6 +582,7 @@ { var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 }; device.IasDeviceType = 43; + device.DeviceID = 1026; //璁剧疆璁惧鐨勫熀鏈俊鎭� this.SetBaseDataToDevice(device, 1300, 1300, "MSG01/M-ZB.10", i_RoomId); @@ -594,6 +596,7 @@ { var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 }; device.IasDeviceType = 43; + device.DeviceID = 1026; //璁剧疆璁惧鐨勫熀鏈俊鎭� this.SetBaseDataToDevice(device, 1300, 1300, "MGCD01/ZB.10", i_RoomId); @@ -607,6 +610,7 @@ { var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 }; device.IasDeviceType = 21; + device.DeviceID = 1026; //璁剧疆璁惧鐨勫熀鏈俊鎭� this.SetBaseDataToDevice(device, 1301, 1301, "MSDC01/M-ZB.10", i_RoomId); @@ -620,6 +624,7 @@ { var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 }; device.IasDeviceType = 40; + device.DeviceID = 1026; //璁剧疆璁惧鐨勫熀鏈俊鎭� this.SetBaseDataToDevice(device, 1301, 1301, "MSS01/M-ZB.10", i_RoomId); @@ -633,6 +638,7 @@ { var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 }; device.IasDeviceType = 13; + device.DeviceID = 1026; //璁剧疆璁惧鐨勫熀鏈俊鎭� this.SetBaseDataToDevice(device, 1303, 1303, "MSPIR01/M-ZB.10", i_RoomId); @@ -646,6 +652,7 @@ { var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 }; device.IasDeviceType = 42; + device.DeviceID = 1026; //璁剧疆璁惧鐨勫熀鏈俊鎭� this.SetBaseDataToDevice(device, 1304, 1304, "MSW01/M-ZB.10", i_RoomId); @@ -659,6 +666,7 @@ { var device = new IASZone() { DeviceAddr = "DeviceAddr" + this.DeviceNumber, DeviceEpoint = 1 }; device.IasDeviceType = 44; + device.DeviceID = 1026; //璁剧疆璁惧鐨勫熀鏈俊鎭� this.SetBaseDataToDevice(device, 1305, 1305, "MBU01/M-ZB.10", i_RoomId); diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs index e5d5c93..5c90b24 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs @@ -940,6 +940,7 @@ /// </summary> private static void InitUserCenterMenmoryByVirtualHome() { + UserCenterResourse.AccountOption.OldHomeStringId = Common.Config.Instance.Home.Id; //娓呯┖鎵�鏈夋垚鍛樼紦瀛� ClearAllMemberMemory(); //棰勫垱寤轰釜浜轰腑蹇冨叏閮ㄧ殑鏂囦欢澶� @@ -975,6 +976,11 @@ UserCenterResourse.ResidenceOption.HomeMainPageSwitchIndex = 1; //褰撳墠鍒嗙被,鍦烘櫙鍜屽姛鑳芥墍閫夋嫨鐨勫垎鏀� 0:鍦烘櫙 1:鍔熻兘 2:鑷姩鍖� UserCenterResourse.ResidenceOption.CategoryPageSwitchIndex = 0; + + //鍒囨崲浣忓畢娓呴櫎涔嬪墠閫昏緫缂撳瓨鏁版嵁; + Common.Logic.LogicList.Clear(); + Common.Logic.LockLogicList.Clear(); + Common.Logic.SoneLogicList.Clear(); } #endregion diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs index 3d6b287..7cf4f1f 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs @@ -660,6 +660,10 @@ { continue; } + if (data.CloudAccountId == null) + { + data.CloudAccountId = string.Empty; + } listLog.Add(data); } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs index 5673d8f..93c7a9f 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs @@ -1040,14 +1040,29 @@ action = () => { //绯荤粺瀵嗙爜鏀寔鎿嶄綔闂ㄩ攣鍚庯紝璋冪敤娓╁眳鍩庣殑鐣岄潰銆愬父寮�鑷姩鍖栥�� - var functionSetting = new Shared.Phone.UserCenter.DoorLock.FunctionSetting(currentRoom, doorLock); - Shared.Phone.UserView.HomePage.Instance.AddChidren(functionSetting); - Shared.Phone.UserView.HomePage.Instance.PageIndex += 1; - functionSetting.Show(); - // functionSetting.aaaAction = () => - //{ - // UpdateNomallyOpenStatus(); - //}; + if (doorLock == null) + { + ///闃叉鎶涘紓甯� + return; + } + ///澶囨敞锛歐JC鐨� + Shared.Phone.Device.Logic.Send.CurrentDoorLock = doorLock; + ///杩涙潵鍒锋柊涓�娆¤澶囧垪琛紱 + Common.Logic.LogicDviceList.Clear(); + if (Common.Logic.LogicDviceList.Count == 0) + { + Common.Logic.LogicDviceList.AddRange(LocalDevice.Current.listAllDevice.ToArray()); + } + var addLogicPage = new Shared.Phone.Device.Logic.SoneLogicList(); + UserView.HomePage.Instance.AddChidren(addLogicPage); + UserView.HomePage.Instance.PageIndex += 1; + addLogicPage.Show(); + addLogicPage.action += (w) => + { + doorLock.IsDoorLockNormallyMode = w; + ///鐣欑粰寰愭鐢ㄧ殑 + UpdateNomallyOpenStatus(); + }; }; HdlCheckLogic.Current.CheckSecondarySecurity(action); #endregion diff --git a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs index ee92d35..0f13170 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/UserMain/UserMainForm.cs @@ -59,8 +59,7 @@ //body鍗犲畬鏁翠釜灞忓箷,闄や簡搴曢儴鑿滃崟 bodyFrameLayout.Y = 0; - bodyFrameLayout.Height = ControlCommonResourse.TopMenuFrameHeight + ControlCommonResourse.TopFrameHeight - + ControlCommonResourse.BodyFrameHeight - ControlCommonResourse.BottomFrameHeight; + bodyFrameLayout.Height = this.Height; bodyFrameLayout.BackgroundColor = UserCenterColor.Current.BlackBackGround; //鍒濆鍖栦腑閮ㄦ帶浠� -- Gitblit v1.8.0