From 2eacb04ca1ec0ad20fda4186b59a9bce67004cb4 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期四, 30 四月 2020 17:45:33 +0800 Subject: [PATCH] 请合并小模块 --- ZigbeeApp/GateWay.Droid/Assets/Language.ini | 2 ZigbeeApp/Home.Ios/Resources/Language.ini | 10 ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceFreshAirCardControl.cs | 116 ++++ ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs | 25 ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs | 2 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs | 4 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs | 39 + ZigbeeApp/Shared/R.cs | 9 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs | 10 ZigbeeApp/Shared/Common/CommonPage.cs | 4 ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirModulDirectionForm.cs | 2 ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs | 22 ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs | 10 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs | 9 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceDoorLockLogic.cs | 2 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs | 2 ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs | 4 ZigbeeApp/Shared/Common/Device.cs | 25 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs | 76 -- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs | 17 ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs | 5 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs | 4 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs | 0 ZigbeeApp/Shared/Phone/Login/Logic/AccountLogic.cs | 4 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs | 20 ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs | 54 - ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs | 7 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs | 134 +--- ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs | 4 ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceFreshAirDetailCardForm.cs | 8 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs | 2 ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs | 7 ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs | 151 ----- ZigbeeApp/Shared/Shared.projitems | 17 ZigbeeApp/Shared/Phone/Login/AccountResetPWDSuccess.cs | 2 ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs | 128 ++- /dev/null | 323 ----------- ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFunctionSettionForm.cs | 134 ---- ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs | 2 ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs | 138 ---- ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs | 134 ---- ZigbeeApp/Shared/Phone/UserView/HomePage.cs | 2 ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs | 0 43 files changed, 500 insertions(+), 1,170 deletions(-) diff --git a/ZigbeeApp/GateWay.Droid/Assets/Language.ini b/ZigbeeApp/GateWay.Droid/Assets/Language.ini index de4baf5..926188e 100755 --- a/ZigbeeApp/GateWay.Droid/Assets/Language.ini +++ b/ZigbeeApp/GateWay.Droid/Assets/Language.ini @@ -1827,6 +1827,7 @@ 16112=铏氭嫙璐﹀彿 16113=鐏叏寮� 16114=鐏叏鍏� +16115=甯稿紑鑷姩鍖栨墜鍔ㄥ彇娑� ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽� 18004=鎸囧畾缃戝叧宸茬粡琚粦瀹� @@ -1972,6 +1973,7 @@ 40015=鎻掑骇 40016=鐏厜 40017=骞叉帴鐐� +40018=鏂伴 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄ā鍧桰D鐨勮澶囬粯璁ゅ娉ㄥ悕瀛�,浠�50000寮�濮�.娉�:瀹冨苟涓嶉渶瑕佸啀R.cs鏂囦欢涓畾涔夆槄鈽呪槄鈽� 50000=绱ф�ユ寜閽� diff --git a/ZigbeeApp/Home.Ios/Resources/Language.ini b/ZigbeeApp/Home.Ios/Resources/Language.ini index 25227ce..0a84035 100755 --- a/ZigbeeApp/Home.Ios/Resources/Language.ini +++ b/ZigbeeApp/Home.Ios/Resources/Language.ini @@ -237,13 +237,11 @@ 231=鎺ヨ繎鎰熷簲 232=鎺ヨ繎鎰熷簲鍔熻兘璁剧疆缃け璐� 233=鑾峰彇鎺ヨ繎鎰熷簲鍔熻兘澶辫触 -235=鎸変綇闈㈡澘妯″紡锛圡ode)鍜岄閫燂紙Fan)鎸夐敭{0}缁胯壊鎸囩ず鐏寒璧枫�傚垯閰嶇綉鎴愬姛 -;涓夋寜閿潰鏉垮叆缃戞搷浣滄寚绀� +235=鎸変綇闈㈡澘妯″紡锛圡ode)鍜岄閫燂紙Fan)鎸夐敭{0}缁胯壊鎸囩ず鐏寒璧枫�傚垯閰嶇綉鎴愬姛 236=缁胯壊鎸囩ず鐏棯鐑� 237=鎸囩ず鐏� 238=闀挎寜5绉掞紙鎸夐敭锛� -239=闀挎寜鍥剧ず鎸夐敭5绉掍互涓婏紝鎸囩ず鐏彉缁裤�侀棯鐑亄0}杩涘叆閰嶇綉鐘舵�併�傜豢鐏唲鐏垯閰嶇綉鎴愬姛 -;涓夋寜閿潰鏉垮叆缃戞搷浣滄寚绀� +239=闀挎寜鍥剧ず鎸夐敭5绉掍互涓婏紝鎸囩ず鐏彉缁裤�侀棯鐑亄0}杩涘叆閰嶇綉鐘舵�併�傜豢鐏唲鐏垯閰嶇綉鎴愬姛 241=璁剧疆甯稿紑妯″紡鍚庯紝鎮ㄧ殑闂ㄩ攣灏嗗缁坽0}澶勪簬鎵撳紑鐘舵�侊紝纭寮�鍚紵 242=鐢甸噺 243=甯稿紑妯″紡宸插紑鍚� @@ -314,7 +312,7 @@ 309=鏃舵晥鎬у父寮�鍒犻櫎澶辫触锛岀户缁�滃父寮�妯″紡鈥濊鍓嶅線闂ㄩ攣鐢ㄦ埛鐣岄潰璁剧疆; 310=璇疯緭鍏ュ悎娉曠殑鏁板瓧 311=鎵嬪姩 -312=鑳屽厜鐏鑹� +312= 鑳屽厜鐏鑹� 5097=鍙栨秷 5098=纭畾 @@ -1828,6 +1826,7 @@ 16112=铏氭嫙璐﹀彿 16113=鐏叏寮� 16114=鐏叏鍏� +16115=甯稿紑鑷姩鍖栨墜鍔ㄥ彇娑� ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽� 18004=鎸囧畾缃戝叧宸茬粡琚粦瀹� @@ -1973,6 +1972,7 @@ 40015=鎻掑骇 40016=鐏厜 40017=骞叉帴鐐� +40018=鏂伴 ;鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄ā鍧桰D鐨勮澶囬粯璁ゅ娉ㄥ悕瀛�,浠�50000寮�濮�.娉�:瀹冨苟涓嶉渶瑕佸啀R.cs鏂囦欢涓畾涔夆槄鈽呪槄鈽� 50000=绱ф�ユ寜閽� diff --git a/ZigbeeApp/Shared/Common/CommonPage.cs b/ZigbeeApp/Shared/Common/CommonPage.cs index febcb6a..cbcbd24 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.20042701"; + public static string CodeIDString = "1.0.20042801"; /// <summary> /// 娉ㄥ唽鏉ユ簮(0:HDL On 1:Zigbee) /// </summary> @@ -390,7 +390,7 @@ Config.Instance.Save(); CommonPage.Instance.RemoveAll(); CommonPage.Instance.Show(); - var login = new Phone.Login.AccountLogin(); + var login = new Phone.Login.AccountLoginForm(); CommonPage.Instance.AddChidren(login); login.ShowForm(); }); diff --git a/ZigbeeApp/Shared/Common/Device.cs b/ZigbeeApp/Shared/Common/Device.cs old mode 100755 new mode 100644 index d9cddaa..8d35da8 --- a/ZigbeeApp/Shared/Common/Device.cs +++ b/ZigbeeApp/Shared/Common/Device.cs @@ -115,7 +115,7 @@ { CommonDevice device = null; //鍙嶅簭鍒楀寲涓烘寚瀹氱殑绫伙紝涓嶇劧鏁版嵁浼氫涪澶辫�屽鑷存棤娉曞己杞� - try + try { device = CommonDevice.CommonDeviceByFilePath(file); } @@ -2060,6 +2060,7 @@ list.Add(DeviceBeloneType.A鎻掑骇); list.Add(DeviceBeloneType.A璋冨厜鍣�); list.Add(DeviceBeloneType.A绐楀笜); + list.Add(DeviceBeloneType.A鏂伴); list.Add(DeviceBeloneType.A绌鸿皟); list.Add(DeviceBeloneType.A缁х數鍣�); list.Add(DeviceBeloneType.A骞叉帴鐐�); @@ -2068,8 +2069,8 @@ list.Add(DeviceBeloneType.A浼犳劅鍣�); //鍏朵粬鐨勭湅鐫�鍔炲憲,閮芥槸鎺掑湪鍚庨潰鐨�,閮藉綊涓鸿繖涓睘鎬� - list.Add(DeviceBeloneType.A鏈煡璁惧); - + list.Add(DeviceBeloneType.A鏈煡璁惧); + return list; } @@ -2648,7 +2649,9 @@ this.dicDeviceModelIdEnum["MSS01/M-ZB.10"] = "1302-1300-60000";//鐑熼浘浼犳劅鍣� this.dicDeviceModelIdEnum["MSPIR01/M-ZB.10"] = "1303-1300-60000";//绾㈠浼犳劅鍣� this.dicDeviceModelIdEnum["MSW01/M-ZB.10"] = "1304-1300-60000";//姘存蹈浼犳劅鍣� - this.dicDeviceModelIdEnum["MBU01/M-ZB.10"] = "1305-1300-60000";//绱ф�ユ寜閿� + this.dicDeviceModelIdEnum["MBU01/M-ZB.10"] = "1305-1300-60000";//绱ф�ユ寜閿瓺Z_PM100-V1.6 + + this.dicDeviceModelIdEnum["MSW01/M-ZB.10"] = "1306-1300-60000";//姘存蹈浼犳劅鍣� //=========鈽呪槄缁х數鍣ㄧ被(2300-2499)鈽呪槄========= this.dicDeviceModelIdEnum["MPR0310-ZB.10"] = "2300-2300-60001";//3璺户鐢靛櫒灏忔ā鍧� @@ -2870,9 +2873,9 @@ /// <summary> /// 鏂规偊鏂伴灏忔ā鍧� 闀滃儚id锛�2310 /// </summary> - Relay_FangyueFreshAirModul = 2310, - - //=========鈽呪槄璋冨厜鍣ㄧ被(2500-2799)鈽呪槄========= + Relay_FangyueFreshAirModul = 2310, + + //=========鈽呪槄璋冨厜鍣ㄧ被(2500-2799)鈽呪槄========= /// <summary> /// 璋冨厜鍣� /// </summary> @@ -2992,6 +2995,10 @@ /// </summary> A缁х數鍣� = 2300, /// <summary> + /// 鏂伴 + /// </summary> + A鏂伴 = 2310, + /// <summary> /// 璋冨厜鍣�(2500-2799) /// </summary> A璋冨厜鍣� = 2500, @@ -3047,10 +3054,6 @@ /// 骞叉帴鐐� /// </summary> A骞叉帴鐐� = 16, - /// <summary> - /// 鏂伴 - /// </summary> - A鏂伴 = 17 } #endregion diff --git a/ZigbeeApp/Shared/Phone/Login/AccountLogin.cs b/ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs similarity index 99% rename from ZigbeeApp/Shared/Phone/Login/AccountLogin.cs rename to ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs index 8bafd8e..1def82e 100755 --- a/ZigbeeApp/Shared/Phone/Login/AccountLogin.cs +++ b/ZigbeeApp/Shared/Phone/Login/AccountLoginForm.cs @@ -9,7 +9,7 @@ /// <summary> /// 鐧诲綍鐣岄潰 /// </summary> - public class AccountLogin : FrameLayoutBase + public class AccountLoginForm : FrameLayoutBase { #region 鈻� 鍙橀噺澹版槑___________________________ diff --git a/ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs b/ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs index 20faead..63eaddc 100755 --- a/ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs +++ b/ZigbeeApp/Shared/Phone/Login/AccountRegisterSuccess.cs @@ -135,7 +135,7 @@ //鏈櫥褰曟垚鍔熷脊鍑虹櫥褰曠晫闈� 鍚屾椂闇�瑕佹爣璁颁负鏈櫥褰曠姸鎬� Config.Instance.LoginDateTime = new DateTime(1970, 1, 1); Config.Instance.Save(); - var login = new AccountLogin(); + var login = new AccountLoginForm(); CommonPage.Instance.AddChidren(login); login.ShowForm(account); }); diff --git a/ZigbeeApp/Shared/Phone/Login/AccountResetPWDSuccess.cs b/ZigbeeApp/Shared/Phone/Login/AccountResetPWDSuccess.cs index 6c3db57..eea97f8 100755 --- a/ZigbeeApp/Shared/Phone/Login/AccountResetPWDSuccess.cs +++ b/ZigbeeApp/Shared/Phone/Login/AccountResetPWDSuccess.cs @@ -95,7 +95,7 @@ } finally { - var login = new AccountLogin(); + var login = new AccountLoginForm(); CommonPage.Instance.AddChidren(login); login.ShowForm(); } diff --git a/ZigbeeApp/Shared/Phone/Login/AccountLogic.cs b/ZigbeeApp/Shared/Phone/Login/Logic/AccountLogic.cs similarity index 96% rename from ZigbeeApp/Shared/Phone/Login/AccountLogic.cs rename to ZigbeeApp/Shared/Phone/Login/Logic/AccountLogic.cs index 2cc5055..c3889ad 100755 --- a/ZigbeeApp/Shared/Phone/Login/AccountLogic.cs +++ b/ZigbeeApp/Shared/Phone/Login/Logic/AccountLogic.cs @@ -116,10 +116,6 @@ }; var requestJson = Newtonsoft.Json.JsonConvert.SerializeObject(requestObj); var revertObj = await RequestHttpsZigbeeAsync("ProcessRange/ReceiveAppLatAndLon", System.Text.Encoding.UTF8.GetBytes(requestJson)); - //if (revertObj.StateCode.ToUpper() == "SUCCESS") - //{ - // System.Console.WriteLine("涓婁紶浣嶇疆鎴愬姛" + lat + lon); - //} } catch { } } diff --git a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceFreshAirDetailCardForm.cs b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceFreshAirDetailCardForm.cs old mode 100755 new mode 100644 index 32925fc..a1a20dd --- a/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceFreshAirDetailCardForm.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/ControlForm/DeviceFreshAirDetailCardForm.cs @@ -106,7 +106,7 @@ { if (!btnManual.IsSelected) { - this.SetFanComand(7); + this.SetFanComand(15); } }; @@ -217,7 +217,7 @@ ///3:High ///4:On ///5:Auto - /// 7:Manual + /// 15:Manual /// </summary> private void SetFanComand(int command) { @@ -247,7 +247,7 @@ case 5: FreshAirDev.SetAuto(); break; - case 7: + case 15: FreshAirDev.SetManual(); break; } @@ -295,7 +295,7 @@ this.listControl[2].IsBold = false; this.listControl[3].Visible = false; } - else if (FreshAirDev.currentFanMode == 7) + else if (FreshAirDev.currentFanMode == 15) { this.listControl[0].TextColor = ZigbeeColor.Current.XMGray3; this.listControl[0].IsBold = false; diff --git a/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceFreshAirCardControl.cs b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceFreshAirCardControl.cs new file mode 100644 index 0000000..9fc1779 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/MainPage/Controls/DeviceCard/DeviceFreshAirCardControl.cs @@ -0,0 +1,116 @@ +锘縰sing System; +using Shared.Phone.UserCenter; +using ZigBee.Device; +namespace Shared.Phone.MainPage.Controls +{ + /// <summary> + /// 鏂伴鍗$墖鐨勬帶浠� + /// </summary> + public class DeviceFreshAirCardControl : DeviceCardCommon + { + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鍒濆鍖栨帶浠� + /// </summary> + /// <param name="i_device"></param> + public override void InitControl(CommonDevice i_device) + { + base.InitControl(i_device); + + //娣诲姞璺宠浆娣卞害鍗$墖淇℃伅浜嬩欢 + this.AddDetailInfoEvent(i_device); + + //娣诲姞寮�鍏虫帶浠� + var btnSwitch = this.AddSwitchControl(); + btnSwitch.ButtonClickEvent += (sender, e) => + { + //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹� + if (Common.Config.Instance.Home.IsVirtually == true) + { + //鐩存帴鍙樻洿缂撳瓨 + ((FreshAir)i_device).currentFanStatus = btnSwitch.IsSelected == true ? 4 : 0; + this.RefreshControlInfo(this.device); + return; + } + + bool setStatu = !btnSwitch.IsSelected; + //鍙樻洿鍗$墖鐘舵�� + this.SetCardOpenStatu(setStatu); + //妫�娴嬫槸鍚﹁幏鍙栫綉鍏冲弽棣堢殑缁撴灉,濡傛灉缃戝叧娌℃湁鍥炲,鍒欎細寮瑰嚭娑堟伅 + this.StartCheckResponeResult(!setStatu); + + if (setStatu == true) + { + //鎵撳紑 + this.SetDeviceStatuText(Language.StringByID(R.MyInternationalizationString.uOpen1)); + (i_device as FreshAir).Open(); + } + else + { + //鍏抽棴 + this.SetDeviceStatuText(Language.StringByID(R.MyInternationalizationString.Close)); + (i_device as FreshAir).Close(); + } + }; + } + + #endregion + + #region 鈻� 娣卞害鍗$墖淇℃伅_______________________ + + /// <summary> + /// 娣诲姞璺宠浆娣卞害鍗$墖淇℃伅浜嬩欢 + /// </summary> + private void AddDetailInfoEvent(CommonDevice i_device) + { + //娣卞害鍗$墖淇℃伅 + this.ButtonClickEvent += (sender, e) => + { + Common.CommonPage.Instance.IsDrawerLockMode = true; + + //鏂伴绫诲瀷鐨勬繁搴﹀崱鐗囩晫闈� + var form = new MainPage.ControlForm.DeviceFreshAirDetailCardForm(); + form.AddForm(i_device, HdlRoomLogic.Current.CurrentRoom, 965, 1374); + form.FormCloseEvent += this.CardDetailInfoBackEvent; + }; + } + + #endregion + + #region 鈻� 妫�娴嬭澶囨墦寮�鐘舵�乢__________________ + + /// <summary> + /// 妫�娴嬭澶囨墦寮�鐘舵�� + /// </summary> + /// <param name="i_device"></param> + /// <returns></returns> + public override bool CheckIsOpenStatu(CommonDevice i_device) + { + return ((FreshAir)i_device).currentFanStatus != 0; + } + + #endregion + + #region 鈻� 鍙戦�佽幏鍙栫姸鎬佸懡浠__________________ + + /// <summary> + /// 鍙戦�佽幏鍙栫姸鎬佸懡浠� + /// </summary> + public override void SendStatuComand() + { + if (Common.Config.Instance.Home.IsVirtually == true) + { + //濡傛灉浣忓畢涓鸿櫄鎷熶綇瀹�,鍒欐鍔熻兘鏃犳晥 + return; + } + //妫�娴嬭兘鍚﹀彂閫佽幏鍙栫姸鎬佸懡浠� + if (this.CheckCanSendStatuComand() == true) + { + HdlDeviceAttributeLogic.Current.SendACStatuComand(this.device); + } + } + + #endregion + } +} diff --git a/ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs b/ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs index 3e38a1c..8bec1a6 100755 --- a/ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/DeviceDetailInfoForm.cs @@ -272,105 +272,19 @@ /// </summary> private void AddFunctionTypeRowByAdmin(NormalViewControl btnBelongType) { - //濡傛灉鏄户鐢靛櫒,绌烘皵寮�鍏�,璋冨厜鍣ㄧ殑璇� - if (device.Type == DeviceType.OnOffOutput || device.Type == DeviceType.DimmableLight - || device.Type == DeviceType.ColorDimmableLight || device.Type == DeviceType.AirSwitch) + //鑷畾涔夊姛鑳界被鍨嬫帶浠� + var rowFunction = new DeviceFunctionTypeRowControl(device, listview.rowSpace / 2); + if (rowFunction.CanShowRow == true) { - //鍔熻兘绫诲瀷鐨勭炕璇戝悕瀛� - int nowSelectNo = 1; - string strType = string.Empty; - if (this.device.DfunctionType == DeviceFunctionType.A鐏厜) - { - strType = Language.StringByID(R.MyInternationalizationString.uLight); - nowSelectNo = 1; - } - else if (this.device.DfunctionType == DeviceFunctionType.A寮�鍏�) - { - strType = Language.StringByID(R.MyInternationalizationString.uSwitch); - nowSelectNo = 0; - } - else if (this.device.DfunctionType == DeviceFunctionType.A鎻掑骇) - { - strType = Language.StringByID(R.MyInternationalizationString.uSocket1); - nowSelectNo = 2; - } - //鍔熻兘绫诲瀷 - var btnFunction = new FrameCaptionViewControl(Language.StringByID(R.MyInternationalizationString.uFunctionType), strType, listview.rowSpace / 2); - btnFunction.UseClickStatu = false; - listview.AddChidren(btnFunction); - btnFunction.InitControl(); + listview.AddChidren(rowFunction); + rowFunction.InitControl(); //搴曠嚎 - btnFunction.AddBottomLine(); - //濡傛灉鏄┖姘斿紑鍏冲拰缁х數鍣�,鎵嶈兘淇敼 - if (device.Type == DeviceType.OnOffOutput || device.Type == DeviceType.AirSwitch) + rowFunction.AddBottomLine(); + rowFunction.FinishSelectEvent += (index) => { - //鍙崇澶� - btnFunction.AddRightArrow(); - btnFunction.ButtonClickEvent += (sender, e) => - { - //鏄剧ず鍒楄〃 - var listText = new List<string>(); - listText.Add(Language.StringByID(R.MyInternationalizationString.uSwitch));//寮�鍏� - listText.Add(Language.StringByID(R.MyInternationalizationString.uLight));//鐏厜 - listText.Add(Language.StringByID(R.MyInternationalizationString.uSocket1));//鎻掑骇 - //鏍囬:閫夋嫨鍔熻兘绫诲瀷 - var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType); - - var form = new BottomItemSelectForm(); - form.SelectRowCanCancel = false;//閫夋嫨鐨勪笉鑳藉彇娑� - form.AddForm(title, listText, nowSelectNo); - form.FinishSelectEvent += (selectNo) => - { - btnFunction.Text = listText[selectNo]; - //褰撶被鍨嬪彉鏇存椂,澶翠笂鐨勭被鍨嬩篃涓�璧峰彉鏇� - btnBelongType.Text = listText[selectNo]; - nowSelectNo = selectNo; - //璁板綍璧峰綋鍓嶉�夋嫨鐨勫姛鑳界被鍨� - if (selectNo == 0) - { - this.device.DfunctionType = DeviceFunctionType.A寮�鍏�; - if (this.device.IsCustomizeImage == false) - { - //閲嶆柊璁剧疆鍥剧墖 - this.device.IconPath = "Device/Switch.png"; - } - } - else if (selectNo == 1) - { - this.device.DfunctionType = DeviceFunctionType.A鐏厜; - if (this.device.IsCustomizeImage == false) - { - //閲嶆柊璁剧疆鍥剧墖 - this.device.IconPath = "Device/Light.png"; - } - } - else - { - this.device.DfunctionType = DeviceFunctionType.A鎻掑骇; - if (this.device.IsCustomizeImage == false) - { - //閲嶆柊璁剧疆鍥剧墖 - this.device.IconPath = "Device/Socket1.png"; - } - } - this.device.ReSave(); - }; - }; - } - } - - //濡傛灉鏄柊椋� - if (device.Type == DeviceType.FreshAir) - { - //鍔熻兘绫诲瀷 - string caption = Language.StringByID(R.MyInternationalizationString.uFunctionType); - string strType = Language.StringByID(R.MyInternationalizationString.FreshAir); - var btnFunction = new FrameCaptionViewControl(caption, strType, listview.rowSpace / 2); - btnFunction.UseClickStatu = false; - listview.AddChidren(btnFunction); - btnFunction.InitControl(); - //搴曠嚎 - btnFunction.AddBottomLine(); + //褰撶被鍨嬪彉鏇存椂,澶翠笂鐨勭被鍨嬩篃涓�璧峰彉鏇� + btnBelongType.Text = rowFunction.Text; + }; } } @@ -379,32 +293,16 @@ /// </summary> private void AddFunctionTypeRowByMember() { - //濡傛灉鏄户鐢靛櫒,绌烘皵寮�鍏�,璋冨厜鍣ㄧ殑璇� - if (device.Type == DeviceType.OnOffOutput || device.Type == DeviceType.DimmableLight - || device.Type == DeviceType.ColorDimmableLight || device.Type == DeviceType.AirSwitch) + //鑷畾涔夊姛鑳界被鍨嬫帶浠� + var rowFunction = new DeviceFunctionTypeRowControl(device, listview.rowSpace / 2); + if (rowFunction.CanShowRow == true) { - //鍔熻兘绫诲瀷鐨勭炕璇戝悕瀛� - string strType = string.Empty; - if (this.device.DfunctionType == DeviceFunctionType.A鐏厜) - { - strType = Language.StringByID(R.MyInternationalizationString.uLight); - } - else if (this.device.DfunctionType == DeviceFunctionType.A寮�鍏�) - { - strType = Language.StringByID(R.MyInternationalizationString.uSwitch); - } - else if (this.device.DfunctionType == DeviceFunctionType.A鎻掑骇) - { - strType = Language.StringByID(R.MyInternationalizationString.uSocket1); - } - - //鍔熻兘绫诲瀷 - var btnFunction = new FrameCaptionViewControl(Language.StringByID(R.MyInternationalizationString.uFunctionType), strType, listview.rowSpace / 2); - btnFunction.UseClickStatu = false; - listview.AddChidren(btnFunction); - btnFunction.InitControl(); + //寮哄埗骞叉秹涓嶈兘閫夋嫨 + rowFunction.SetCanSelect = false; + listview.AddChidren(rowFunction); + rowFunction.InitControl(); //搴曠嚎 - btnFunction.AddBottomLine(); + rowFunction.AddBottomLine(); } } diff --git a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs old mode 100755 new mode 100644 index fb67b15..c091f84 --- a/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs +++ b/ZigbeeApp/Shared/Phone/MainPage/HomeMainPageForm.cs @@ -607,6 +607,11 @@ { cardContr = new Controls.DeviceAcCardControl(); } + //鏂伴 + else if (device.Type == DeviceType.FreshAir) + { + cardContr = new Controls.DeviceFreshAirCardControl(); + } //褰╃伅(璋冨厜鍣�) else if (device.Type == DeviceType.DimmableLight) { @@ -1138,6 +1143,11 @@ { //绌鸿皟鏄壒娈婄殑,瀹冪殑寮�鍏虫槸灞炴�т笂鎶ユ潵鐫�.宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉 this.dicDeviceCardControl[mainKeys].SetHadGetResponeResultStatu(); + } + if (report.DeviceStatusReport.CluterID == 514 && report.DeviceStatusReport.AttriBute[0].AttributeId == 0) + { + //鏂伴鏄壒娈婄殑,瀹冪殑寮�鍏虫槸灞炴�т笂鎶ユ潵鐫�.宸茬粡鎺ユ敹鍒扮綉鍏崇殑鍙嶉 + this.dicDeviceCardControl[mainKeys].SetHadGetResponeResultStatu(); } this.dicDeviceCardControl[mainKeys].RefreshControlInfo(locadevice); } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs index 000d878..098ffaa 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/BaseCommonControl/Base/ButtonBase.cs @@ -58,6 +58,23 @@ #endregion + #region 鈻� 閲嶅啓褰摜鐨勫睘鎬____________________ + + /// <summary> + /// 閲嶅啓Text灞炴�� + /// </summary> + public new string Text + { + //鍏堣繖涔堝紕鍏堝惂 + get { return base.Text == null ? string.Empty : base.Text; } + set + { + base.Text = value == null ? string.Empty : value; + } + } + + #endregion + #region 鈻� 鍒濆鍖朹____________________________ /// <summary> diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs index f5da451..c1b169c 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameLayoutStatuControl.cs @@ -196,6 +196,15 @@ this.BindChidrenEvent(view, chidrenBindMode); } + /// <summary> + /// 娣诲姞瀛愭帶浠� + /// </summary> + /// <param name="view"></param> + public override void AddChidren(View view) + { + this.AddChidren(view, ChidrenBindMode.NotBind); + } + #endregion #region 鈻� 鎺т欢浜嬩欢___________________________ diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs index cc83e75..ed13ec9 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/FrameLayoutControls/FrameListControl.cs @@ -7,7 +7,7 @@ /// <summary> /// 鍋氭垚涓�涓垪琛ㄥ瀷鐨凢rameLayout(瀹冧笌VerticalListControl鍚屼竴鎬ц川,浣嗘槸瀹冩槸FrameLayout,瀹冧細鏀瑰彉楂樺害) /// </summary> - public class FrameListControl : FrameLayout + public class FrameListControl : FrameLayoutBase { /// <summary> /// 琛屼箣闂寸殑闂磋窛 diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs old mode 100755 new mode 100644 index d907473..20ed70e --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Controls/RowLayoutControls/DeviceFunctionTypeRowControl.cs @@ -13,11 +13,27 @@ #region 鈻� 鍙橀噺澹版槑___________________________ /// <summary> - /// 鍒ゆ柇璇ユ帶浠惰兘鍚︽樉绀�(鏈�濂界‘淇濊澶囧璞′笉涓簄ull) + /// 缁撴潫閫夋嫨鐨勪簨浠� value:绱㈠紩(浠�0寮�濮�) 鏂囨湰淇℃伅璇风敤Text鑾峰彇 + /// </summary> + public Action<int> FinishSelectEvent = null; + /// <summary> + /// 鍒ゆ柇璇ユ帶浠惰兘鍚︽樉绀� /// </summary> public bool CanShowRow { get { return this.CheckCanShowRow(); } + } + + private bool m_SetCanSelect = true; + /// <summary> + /// 寮哄埗璁剧疆鑳藉惁杩涜閫夋嫨(鍙缁х數鍣ㄥ拰绌烘皵寮�鍏虫湁鏁�,涓埆鐣岄潰闇�瑕佽繖绉嶆搷浣�) + /// </summary> + public bool SetCanSelect + { + set + { + m_SetCanSelect = value; + } } /// <summary> /// 璁惧瀵硅薄 @@ -33,7 +49,7 @@ #region 鈻� 鍒濆鍖朹____________________________ /// <summary> - /// 璁惧鍔熻兘绫诲瀷鐨勮嚜瀹氫箟琛屾帶浠�(姝ゆ柟娉曢�夋嫨涔嬪悗,鏃犳潯浠剁洿鎺ュ彉鏇寸被鍨�) + /// 璁惧鍔熻兘绫诲瀷鐨勮嚜瀹氫箟琛屾帶浠�(閫夋嫨鍔熻兘涔嬪悗,鏃犳潯浠剁洿鎺ュ彉鏇寸被鍨�) /// </summary> /// <param name="i_device">璁惧鐨勫璞�</param> /// <param name="i_ChidrenYaxis">瀛愭帶浠禮杞村亸绉婚噺(鐪熷疄鍊�,鏈変簺鐣岄潰闇�瑕佽繖绉嶇壒娈婃搷浣�)</param> @@ -53,25 +69,23 @@ //鍒濆鍖栧簳灞傛暟鎹� base.InitControl(); - if (this.device == null) - { - //姝ゆ帶浠堕噰鐢ㄧ殑鏄彟澶栦竴绉嶅垵濮嬪寲鏂瑰紡 - return; - } - //绌烘皵寮�鍏冲拰缁х數鍣ㄥ彲浠ラ�夋嫨鍔熻兘绫诲瀷 if (this.device.Type == DeviceType.AirSwitch || this.device.Type == DeviceType.OnOffOutput) { - this.UseClickStatu = true; - //鍙崇澶� - this.AddRightArrow(); - - this.ButtonClickEvent += (sender, e) => + //娌¤寮哄埗骞叉秹鐨勮瘽 + if (m_SetCanSelect == true) { - //鏄剧ず閫夋嫨璁惧鍔熻兘绫诲瀷鐨勭晫闈� - this.ShowSelectDeviceFunctionListForm(); - }; + this.UseClickStatu = true; + //鍙崇澶� + this.AddRightArrow(); + + this.ButtonClickEvent += (sender, e) => + { + //鏄剧ず閫夋嫨璁惧鍔熻兘绫诲瀷鐨勭晫闈� + this.ShowSelectDeviceFunctionListForm(); + }; + } } } @@ -103,6 +117,9 @@ //璁板綍璧峰綋鍓嶉�夋嫨鐨勫姛鑳界被鍨� this.RefreshDfunctionType(); + + //璋冪敤鍥炶皟鍑芥暟 + this.FinishSelectEvent?.Invoke(nowSelectNo); }; } #endregion @@ -117,12 +134,7 @@ //鏍囬锛氬姛鑳界被鍨� this.btnCaption.Text = Language.StringByID(R.MyInternationalizationString.uFunctionType); - var myFunType = DeviceFunctionType.A鏈畾涔�; - if (this.device != null) - { - myFunType = this.device.DfunctionType; - } - + var myFunType = this.device.DfunctionType; //鍔熻兘绫诲瀷鐨勭炕璇戝悕瀛� string strType = string.Empty; if (myFunType == DeviceFunctionType.A鐏厜) @@ -141,35 +153,38 @@ nowSelectNo = 2; } - //濡傛灉璁惧涓嶄负null - if (this.device != null) + if (this.device.Type == DeviceType.ColorDimmableLight + || this.device.Type == DeviceType.DimmableLight) { - if (this.device.Type == DeviceType.ColorDimmableLight - || this.device.Type == DeviceType.DimmableLight) - { - //鐏厜绫诲浐瀹氫负 鐏厜 - strType = Language.StringByID(R.MyInternationalizationString.uLight); - nowSelectNo = 1; - } - else if (this.device.Type == DeviceType.WindowCoveringDevice) - { - //绐楀笜鍥哄畾涓� 閬槼 - strType = Language.StringByID(R.MyInternationalizationString.uDeviceBelongId100); - nowSelectNo = -1; - } - else if (this.device.Type == DeviceType.Thermostat) - { - //绌鸿皟鍥哄畾涓� 绌鸿皟 - strType = Language.StringByID(R.MyInternationalizationString.uDeviceBelongId3600); - nowSelectNo = -1; - } - else if (this.device.Type == DeviceType.DoorLock) - { - //闂ㄩ攣鍥哄畾涓� 闂ㄩ攣 - strType = Language.StringByID(R.MyInternationalizationString.uDeviceBelongId2800); - nowSelectNo = -1; - } + //鐏厜绫诲浐瀹氫负 鐏厜 + strType = Language.StringByID(R.MyInternationalizationString.uLight); + nowSelectNo = 1; } + else if (this.device.Type == DeviceType.WindowCoveringDevice) + { + //绐楀笜鍥哄畾涓� 閬槼 + strType = Language.StringByID(R.MyInternationalizationString.uDeviceBelongId100); + nowSelectNo = -1; + } + else if (this.device.Type == DeviceType.Thermostat) + { + //绌鸿皟鍥哄畾涓� 绌鸿皟 + strType = Language.StringByID(R.MyInternationalizationString.uDeviceBelongId3600); + nowSelectNo = -1; + } + else if (this.device.Type == DeviceType.DoorLock) + { + //闂ㄩ攣鍥哄畾涓� 闂ㄩ攣 + strType = Language.StringByID(R.MyInternationalizationString.uDeviceBelongId2800); + nowSelectNo = -1; + } + else if (this.device.Type == DeviceType.FreshAir) + { + //鏂伴鍥哄畾涓� 鏂伴 + strType = Language.StringByID(R.MyInternationalizationString.FreshAir); + nowSelectNo = -1; + } + //鏄剧ず鏂囨湰 this.txtView.Text = strType; } @@ -192,6 +207,7 @@ || this.device.Type == DeviceType.DoorLock//闂ㄩ攣 || this.device.Type == DeviceType.OnOffOutput//缁х數鍣� || this.device.Type == DeviceType.Thermostat//绌鸿皟 + || this.device.Type == DeviceType.FreshAir//鏂伴 || this.device.Type == DeviceType.WindowCoveringDevice)//绐楀笜 { return true; @@ -201,6 +217,20 @@ #endregion + #region 鈻� 鎺т欢鎽ф瘉___________________________ + + /// <summary> + /// 鎺т欢鎽ф瘉 + /// </summary> + public override void RemoveFromParent() + { + this.FinishSelectEvent = null; + + base.RemoveFromParent(); + } + + #endregion + #region 鈻� 涓�鑸柟娉昣__________________________ /// <summary> diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceDoorLockLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceDoorLockLogic.cs index 99c9608..56207a7 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceDoorLockLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDeviceDoorLockLogic.cs @@ -38,7 +38,7 @@ /// 娣诲姞鍘嗗彶璁板綍 /// </summary> /// <param name="i_doorLock">闂ㄩ攣瀵硅薄</param> - /// <param name="OtherOpenLockMode">鍏朵粬寮�閿佹柟寮� 9001:甯稿紑鎵撳紑 9002:甯稿紑鍙栨秷 9003:甯稿紑鎸佺画</param> + /// <param name="OtherOpenLockMode">鍏朵粬寮�閿佹柟寮� 9001:甯稿紑鎵撳紑 9002:甯稿紑鍙栨秷 9003:甯稿紑鎸佺画 9004:甯稿紑鑷姩鍖栨墜鍔ㄥ彇娑�</param> /// <param name="NormallyOpenContinuedTime">甯稿紑鎸佺画鏃堕棿(1~72灏忔椂 OtherOpenLockMode=9003鐨勬椂鍊欐湁鏁�)</param> public void AddDoorHistoryLog(ZigBee.Device.DoorLock i_doorLock, int OtherOpenLockMode, string NormallyOpenContinuedTime) { diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs old mode 100755 new mode 100644 index 90a72cc..1d6dd1b --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlDevicePanelLogic.cs @@ -90,7 +90,7 @@ public async Task<bool> SetPanelEpointColorInfo(Panel panel, Panel.KeyColorData colorData) { var keyNum = new Panel.KeyNumStatus(); - Type type = keyNum.GetType(); + Type type = keyNum.GetType(); type.InvokeMember("Key" + panel.DeviceEpoint, System.Reflection.BindingFlags.SetField, null, keyNum, new object[] { true }); var result = await panel.SetPanelColorInfoAsync(colorData, keyNum); @@ -111,10 +111,41 @@ //澶囦唤璁惧 await HdlGatewayLogic.Current.UpLoadDeviceBackupDataToGateway(panel, GatewayBackupEnum.A骞叉帴鐐归鑹茶皟鑺�, colorData); return true; - } - + } + + /// <summary> + /// 璁剧疆闈㈡澘棰滆壊 + /// </summary> + /// <param name="panel">鎸夐敭闈㈡澘鐨�</param> + /// <param name="colorData">鍙缃紑鐨勯鑹�</param> + /// <returns></returns> + public async Task<bool> SetPanelColorInfo(Panel panel, Panel.KeyColorData colorData) + { + var keyNum = new Panel.KeyNumStatus(); + //榛樿绗竴涓敤闈㈡澘绗竴涓寜閿鑹蹭綔涓烘暣涓潰鏉跨殑棰滆壊 + keyNum.Key1 = true; + var result = await panel.SetPanelColorInfoAsync(colorData, keyNum); + if (result == null || result.responseData == null) + { + //璁剧疆鎸夐敭闈㈡澘鎸囩ず鐏鑹插け璐� + string msg = Language.StringByID(R.MyInternationalizationString.uSetPanelPilolightSettionFail); + this.ShowErrorMsg(msg); + return false; + } + if (result.responseData.status != 0) + { + //璁剧疆鎸夐敭闈㈡澘鎸囩ず鐏鑹插け璐� + string msg = Language.StringByID(R.MyInternationalizationString.uSetPanelPilolightSettionFail); + this.ShowErrorMsg(msg); + return false; + } + //澶囦唤璁惧 + await HdlGatewayLogic.Current.UpLoadDeviceBackupDataToGateway(panel, GatewayBackupEnum.A骞叉帴鐐归鑹茶皟鑺�, colorData); + return true; + } + #endregion - + #region 鈻� 浜害璋冭妭___________________________ /// <summary> /// 鑾峰彇璁惧浜害閰嶇疆锛坲i鍙寒搴﹁皟鑺�,浣跨敤杩斿洖鍊肩殑panelDirectionsLevel锛� diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs old mode 100755 new mode 100644 index 31b6add..67a7a09 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlGatewayReceiveLogic.cs @@ -362,7 +362,7 @@ ((FreshAir)locadevice).currentFanSpeed = attData.AttriButeData; break; case 5: - case 7: + case 15: ((FreshAir)locadevice).currentFanMode = attData.AttriButeData; break; } @@ -569,7 +569,7 @@ /// 璁惧鍦ㄧ嚎鐘舵�佹洿鏂板弽棣� /// </summary> /// <param name="receiveData"></param> - private void DeviceOnlineChangePush (JObject receiveData) + private void DeviceOnlineChangePush(JObject receiveData) { if (this.dicDeviceEvent.Count == 0) { diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs index 421cd93..e5d5c93 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/UserCenterLogic.cs @@ -642,7 +642,7 @@ CloseAllOpenForm(); //鏄剧ず鐧婚檰鐢婚潰 - var formLogin = new Login.AccountLogin(); + var formLogin = new Login.AccountLoginForm(); Shared.Common.CommonPage.Instance.AddChidren(formLogin); formLogin.ShowForm(account); }); @@ -683,7 +683,7 @@ CloseAllOpenForm(); //鏄剧ず鐧婚檰鐢婚潰 - var formLogin = new Login.AccountLogin(); + var formLogin = new Login.AccountLoginForm(); Shared.Common.CommonPage.Instance.AddChidren(formLogin); formLogin.ShowForm(account); }); diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs old mode 100755 new mode 100644 index 4bc702c..720426a --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindInfo.cs @@ -170,6 +170,26 @@ } /// <summary> + /// 鑾峰彇褰撳墠妤煎眰鍚嶇О + /// fllodID:妤煎眰ID + /// </summary> + /// <returns></returns> + public static string GetBindTargetsFloorIdName(string curFllodID) + { + var dicFloor = HdlRoomLogic.Current.GetFloorSortList(); + foreach (var floorId in dicFloor.Keys) + { + //褰撳墠妤煎眰 + if (curFllodID == floorId) + { + return dicFloor[floorId]; + break; + } + } + return null; + } + + /// <summary> /// 妫�娴嬫帶鍒堕潰鏉�(鎸夐敭绫�)鎵�鎷ユ湁鐨勫姛鑳�,鐜版敮鎸佺殑鏈変互涓嬪嚑绉�(蹇呭畾瀛樺湪閿��,鍑洪敊浼氳繑鍥瀗ull) /// </summary> /// <returns>The panel key function level2.</returns> diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs old mode 100755 new mode 100644 index 14d3e84..5180833 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Bind/BindTargetsPage.cs @@ -88,11 +88,8 @@ { localDeviceList.Clear(); scList.Clear(); - //鑾峰彇鏈湴璁惧鍒楄〃 - foreach (var dev in Shared.Common.LocalDevice.Current.listAllDevice) - { - localDeviceList.Add(dev); - } + //鑾峰彇鏈湴璁惧鍒楄〃 + localDeviceList = Shared.Common.LocalDevice.Current.listAllDevice; //鑾峰彇鏈湴鍦烘櫙鍒楄〃 scList = HdlSceneLogic.Current.GetAllRoomSceneList(); //鑾峰彇缃戝叧鍦烘櫙琛� diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs index bf36e95..6b79eb0 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceFunctionSettionForm.cs @@ -41,10 +41,6 @@ /// </summary> private Dictionary<int, string> dicDeviceSaveName = new Dictionary<int, string>(); /// <summary> - /// 璁惧闇�瑕佷繚瀛樼殑璁惧鍔熻兘 - /// </summary> - private Dictionary<int, DeviceFunctionType> dicDeviceFuncType = new Dictionary<int, DeviceFunctionType>(); - /// <summary> /// 淇℃伅缂栬緫鎺т欢 /// </summary> private InformationEditorControl tableContr = null; @@ -108,8 +104,6 @@ { //璁板綍璧峰綋鍓嶆鍦ㄦ搷浣滅殑鍥炶矾鍚嶅瓧 dicDeviceSaveName[nowSelectDevice.DeviceEpoint] = btnDeviceName.Text.Trim(); - //寮�鍚繘搴︽潯 - this.ShowProgressBar(); foreach (var epoint in dicDeviceSaveName.Keys) { var device = Common.LocalDevice.Current.GetDevice(deviceObj.DeviceAddr, epoint); @@ -126,45 +120,10 @@ var result = await Common.LocalDevice.Current.ReName(device, newName); if (result == false) { - //鍏抽棴 - this.CloseProgressBar(); return; } } } - foreach (var epoint in dicDeviceFuncType.Keys) - { - var device = Common.LocalDevice.Current.GetDevice(deviceObj.DeviceAddr, epoint); - if (device == null) - { - continue; - } - //璁剧疆鍔熻兘绫诲瀷 - device.DfunctionType = dicDeviceFuncType[epoint]; - if (device.IsCustomizeImage == true) - { - continue; - } - //閲嶆柊璁剧疆鍥剧墖 - if (device.DfunctionType == DeviceFunctionType.A寮�鍏�) - { - device.IconPath = "Device/Switch.png"; - } - else if (device.DfunctionType == DeviceFunctionType.A鎻掑骇) - { - device.IconPath = "Device/Socket1.png"; - } - else if (device.DfunctionType == DeviceFunctionType.A鐏厜) - { - device.IconPath = "Device/Light.png"; - } - else - { - device.IconPath = "Device/RelayEpoint.png"; - } - device.ReSave(); - } - this.CloseProgressBar(); //鍏抽棴鑷韩 this.CloseForm(); }; @@ -295,110 +254,16 @@ /// </summary> private void AddFunctionTypeRow() { - //濡傛灉鏄户鐢靛櫒鍜岃皟鍏夊櫒鐨勮瘽 - if (nowSelectDevice.Type == DeviceType.OnOffOutput || nowSelectDevice.Type == DeviceType.DimmableLight - || nowSelectDevice.Type == DeviceType.ColorDimmableLight) + //鑷畾涔夊姛鑳界被鍨嬫帶浠� + var rowFunction = new DeviceFunctionTypeRowControl(nowSelectDevice, listview.rowSpace / 2); + if (rowFunction.CanShowRow == false) { - //鍔熻兘绫诲瀷 - string caption = Language.StringByID(R.MyInternationalizationString.uFunctionType); - var DfunctionType = nowSelectDevice.DfunctionType; - if (this.dicDeviceFuncType.ContainsKey(nowSelectDevice.DeviceEpoint) == true) - { - DfunctionType = this.dicDeviceFuncType[nowSelectDevice.DeviceEpoint]; - } - - //鍔熻兘绫诲瀷鐨勭炕璇戝悕瀛� - int nowSelectNo = 1; - string strType = string.Empty; - if (DfunctionType == DeviceFunctionType.A鐏厜) - { - strType = Language.StringByID(R.MyInternationalizationString.uLight); - nowSelectNo = 1; - } - else if (DfunctionType == DeviceFunctionType.A寮�鍏�) - { - strType = Language.StringByID(R.MyInternationalizationString.uSwitch); - nowSelectNo = 0; - } - else if (DfunctionType == DeviceFunctionType.A鎻掑骇) - { - strType = Language.StringByID(R.MyInternationalizationString.uSocket1); - nowSelectNo = 2; - } - - var btnFunction = new FrameCaptionViewControl(caption, strType, listview.rowSpace / 2); - btnFunction.UseClickStatu = false; - listview.AddChidren(btnFunction); - btnFunction.InitControl(); - //搴曠嚎 - btnFunction.AddBottomLine(); - - //濡傛灉鏄户鐢靛櫒鎵嶈兘澶熸洿鏀硅繖涓姛鑳界被鍨� - if (nowSelectDevice.Type == DeviceType.OnOffOutput) - { - btnFunction.UseClickStatu = true; - //鍙崇澶� - btnFunction.AddRightArrow(); - btnFunction.ButtonClickEvent += (sender, e) => - { - //鏄剧ず鍒楄〃 - var listText = new List<string>(); - listText.Add(Language.StringByID(R.MyInternationalizationString.uSwitch));//寮�鍏� - listText.Add(Language.StringByID(R.MyInternationalizationString.uLight));//鐏厜 - listText.Add(Language.StringByID(R.MyInternationalizationString.uSocket1));//鎻掑骇 - //鏍囬:閫夋嫨鍔熻兘绫诲瀷 - var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType); - - var form = new BottomItemSelectForm(); - form.CancelCallEvent = true;//鍏佽鍙栨秷 - form.AddForm(title, listText, nowSelectNo); - form.FinishSelectEvent += (selectNo) => - { - if (selectNo == -1) - { - //鍙栨秷閫夋嫨 - btnFunction.Text = string.Empty; - } - else - { - btnFunction.Text = listText[selectNo]; - } - nowSelectNo = selectNo; - //璁板綍璧峰綋鍓嶉�夋嫨鐨勫姛鑳界被鍨� - if (selectNo == 0) - { - dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A寮�鍏�; - } - else if (selectNo == 1) - { - dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A鐏厜; - } - else if (selectNo == 2) - { - dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A鎻掑骇; - } - else - { - dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A鏈畾涔�; - } - }; - }; - } + return; } - - //濡傛灉鏄柊椋� - if (nowSelectDevice.Type == DeviceType.FreshAir) - { - //鍔熻兘绫诲瀷 - string caption = Language.StringByID(R.MyInternationalizationString.uFunctionType); - string strType = Language.StringByID(R.MyInternationalizationString.FreshAir); - var btnFunction = new FrameCaptionViewControl(caption, strType, listview.rowSpace / 2); - btnFunction.UseClickStatu = false; - listview.AddChidren(btnFunction); - btnFunction.InitControl(); - //搴曠嚎 - btnFunction.AddBottomLine(); - } + listview.AddChidren(rowFunction); + rowFunction.InitControl(); + //搴曠嚎 + rowFunction.AddBottomLine(); } #endregion diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs index e7b18cf..bab6b42 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DeviceMacInfoEditorForm.cs @@ -901,9 +901,15 @@ /// </summary> private void AddAirSwitchFunctionTypeRow() { - if (this.deviceEnumInfo.BeloneType != DeviceBeloneType.A鏅鸿兘绌哄紑) + //2020.04.28鍙樻洿:鏈変釜鍒澶囧畠闄や簡缁х數鍣ㄥ洖璺紝浠�涔堥兘娌℃湁浜�, + //杩欎釜鏃跺�欎篃瑕佺幇瀹炲嚭鏉� + if (this.listNewDevice.Count != 1) { - //涓嶆槸绌烘皵寮�鍏� + return; + } + if (this.listNewDevice[0].Type != DeviceType.OnOffOutput + && this.listNewDevice[0].Type != DeviceType.AirSwitch) + { return; } //鑷畾涔夊姛鑳界被鍨嬫帶浠� diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirModulDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirModulDirectionForm.cs old mode 100755 new mode 100644 index 1fb635c..1b86ca9 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirModulDirectionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Direction/PanelFangyueFreshAirModulDirectionForm.cs @@ -70,7 +70,7 @@ //闀挎寜鍥剧ず鎸夐敭5绉掍互涓婏紝鎸囩ず鐏彉缁裤�侀棯鐑� //杩涘叆閰嶇綉鐘舵�併�傜豢鐏揩闂�3绉掑垯閰嶇綉鎴愬姛 - string[] msgArry = Language.StringByID(R.MyInternationalizationString.uAddTwoButtonPanelMsg).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); + string[] msgArry = Language.StringByID(R.MyInternationalizationString.AddFreshAirModulPanelMsg).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); var msg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false); msg1.Y = Application.GetRealHeight(1037); diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs index 3879f6e..3d6b287 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/DoorLock/DoorLockHistoryLogForm.cs @@ -395,6 +395,11 @@ //甯稿紑妯″紡鍚敤{0}灏忔椂 btnMsg.Text = Language.StringByID(R.MyInternationalizationString.uNormallyOpenModeOpenSomeTime).Replace("{0}", historyInfo.NormallyOpenContinuedTime); } + else if (historyInfo.OtherOpenLockMode == 9004) + { + //甯稿紑鑷姩鍖栨墜鍔ㄥ彇娑� + btnMsg.Text = Language.StringByID(R.MyInternationalizationString.uNormallyOpenLogicManualClose); + } else { //涓婇潰鏄疉pp鎵嬪姩鎺ㄩ��,杩欓噷鏄綉鍏虫垨鑰呴棬閿佽嚜宸辨帹閫� @@ -1104,7 +1109,7 @@ /// </summary> public string CloudAccountId = string.Empty; /// <summary> - /// 鍏朵粬寮�閿佹柟寮�(OpenLockMode=9000鏃舵湁鏁�) 9001:甯稿紑鎵撳紑 9002:甯稿紑鍙栨秷 9003:甯稿紑鎸佺画 + /// 鍏朵粬寮�閿佹柟寮�(OpenLockMode=9000鏃舵湁鏁�) 9001:甯稿紑鎵撳紑 9002:甯稿紑鍙栨秷 9003:甯稿紑鎸佺画 9004:甯稿紑鑷姩鍖栨墜鍔ㄥ彇娑� /// </summary> public int? OtherOpenLockMode = -1; /// <summary> diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelBackLighWithSensorForm.cs old mode 100755 new mode 100644 diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs index a05ec13..10ad86e 100644 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirBackLightSettionForm.cs @@ -260,7 +260,7 @@ #region 鈻� 鑳屽厜棰滆壊_________________________ /// <summary> - /// 娣诲姞鑳屽厜鐏寒搴︽帶浠� + /// 娣诲姞鑳屽厜棰滆壊鎺т欢 /// </summary> private void AddBackLightControl() { @@ -271,7 +271,7 @@ //鑳屾櫙 var frameBack = new FrameLayout(); frameBack.Y = Application.GetRealHeight(490); - frameBack.Height = Application.GetRealHeight(429); + frameBack.Height = Application.GetRealHeight(170); frameBack.BackgroundColor = UserCenterColor.Current.White; listview.AddChidren(frameBack); @@ -279,92 +279,49 @@ var btnLevelView = new NormalViewControl(400, 60, true); btnLevelView.X = ControlCommonResourse.XXLeft; btnLevelView.Y = Application.GetRealHeight(54); + btnLevelView.Gravity = Gravity.CenterVertical; btnLevelView.TextID = R.MyInternationalizationString.BackgroundLightColor; - frameBack.AddChidren(btnLevelView); - - //褰撳墠浜害 - var btnProgressView1 = new NormalViewControl(200, 50, true); - btnProgressView1.X = ControlCommonResourse.XXLeft; - btnProgressView1.Y = Application.GetRealHeight(157); - btnProgressView1.TextSize = 12; - btnProgressView1.TextColor = UserCenterColor.Current.TextGrayColor1; - btnProgressView1.TextID = R.MyInternationalizationString.uNowLuminance; - frameBack.AddChidren(btnProgressView1); - var btnProgress1 = new NormalViewControl(200, 50, true); - btnProgress1.X = Application.GetRealWidth(222); - btnProgress1.Y = Application.GetRealHeight(157); - btnProgress1.TextSize = 12; - btnProgress1.TextColor = UserCenterColor.Current.TextGrayColor1; - btnProgress1.Text = "70%"; - frameBack.AddChidren(btnProgress1); - - //杩涘害鏉� - var seekBar1 = new SeekBarControl(); - seekBar1.Y = Application.GetRealHeight(253); - frameBack.AddChidren(seekBar1); - seekBar1.ProgressChangedEvent += (div, value) => - { - btnProgress1.Text = value + "%"; - }; - //seekBar1.Progress = linghtLevelInfo.panelBacklightLevel; - - var btnTemp1 = new NormalViewControl(200, 50, true); - btnTemp1.X = ControlCommonResourse.XXLeft; - btnTemp1.Y = Application.GetRealHeight(322); - btnTemp1.TextSize = 12; - btnTemp1.TextColor = UserCenterColor.Current.TextGrayColor3; - btnTemp1.Text = "0%"; - frameBack.AddChidren(btnTemp1); - - var btnTemp2 = new NormalViewControl(200, 50, true); - btnTemp2.X = frameBack.Width - ControlCommonResourse.XXLeft - Application.GetRealWidth(200); - btnTemp2.Y = Application.GetRealHeight(322); - btnTemp2.TextAlignment = TextAlignment.CenterRight; - btnTemp2.TextSize = 12; - btnTemp2.TextColor = UserCenterColor.Current.TextGrayColor3; - btnTemp2.Text = "100%"; - frameBack.AddChidren(btnTemp2); - + frameBack.AddChidren(btnLevelView); + var frameColor = new FrameLayoutStatuControl(); frameColor.UseClickStatu = false; frameColor.Width = Application.GetRealHeight(262); frameColor.Height = this.GetPictrueRealSize(79); - frameColor.Y = Application.GetRealHeight(26); + frameColor.Gravity = Gravity.CenterVertical; frameColor.X = frameBack.Width - ControlCommonResourse.XXLeft - Application.GetRealHeight(262); - frameBack.AddChidren(frameColor); - //棰滆壊 - var btnColorView = new NormalViewControl(Application.GetRealHeight(110), this.GetPictrueRealSize(50), false); + frameBack.AddChidren(frameColor); + + //棰滆壊 + var btnColorView = new NormalViewControl(Application.GetRealHeight(110), this.GetPictrueRealSize(49), false); btnColorView.Gravity = Gravity.CenterVertical; btnColorView.TextAlignment = TextAlignment.CenterRight; btnColorView.TextSize = 12; btnColorView.Y = Application.GetRealHeight(5); btnColorView.TextColor = UserCenterColor.Current.TextGrayColor1; btnColorView.TextID = R.MyInternationalizationString.uColor; - frameColor.AddChidren(btnColorView, ChidrenBindMode.BindEventOnly); - - int R1 = Convert.ToInt32("d8", 16); - int G1 = Convert.ToInt32("95", 16); - int B1 = Convert.ToInt32("e3", 16); + frameColor.AddChidren(btnColorView, ChidrenBindMode.BindEventOnly); + + int R1 = Convert.ToInt32(this.keyColorData.OpenColorR, 16); + int G1 = Convert.ToInt32(this.keyColorData.OpenColorG, 16); + int B1 = Convert.ToInt32(this.keyColorData.OpenColorB, 16); uint backColor = this.GetColorByRGB((byte)R1, (byte)G1, (byte)B1); - //棰滆壊澶栨 - var btnColorLine = new NormalViewControl(this.GetPictrueRealSize(79), this.GetPictrueRealSize(79), false); + //棰滆壊澶栨 + var btnColorLine = new FrameLayoutStatuControl(); + btnColorLine.Width = Application.GetRealHeight(79); + btnColorLine.Height = this.GetPictrueRealSize(79); btnColorLine.X = btnColorView.Right + Application.GetRealHeight(18); btnColorLine.Radius = (uint)this.GetPictrueRealSize(79) / 2; btnColorLine.BorderWidth = 1; - btnColorLine.BorderColor = 0xff666666; - frameColor.AddChidren(btnColorLine, ChidrenBindMode.BindEventOnly); - + btnColorLine.BorderColor = 0xffcccccc; + frameColor.AddChidren(btnColorLine, ChidrenBindMode.BindEventOnly); + var btnColor = new NormalViewControl(this.GetPictrueRealSize(69), this.GetPictrueRealSize(69), false); - btnColor.Y = Application.GetRealHeight(5); - btnColor.X = btnColorView.Right + Application.GetRealHeight(23); + btnColor.Gravity = Gravity.Center; btnColor.Radius = (uint)this.GetPictrueRealSize(69) / 2; - btnColor.BackgroundColor = UserCenterColor.Current.ErrorColor; - frameColor.AddChidren(btnColor, ChidrenBindMode.BindEventOnly); - - //鍙樻洿婊戝姩鏉$殑棰滆壊 - seekBar1.ProgressBarColor = backColor; - + btnColor.BackgroundColor = backColor; + btnColorLine.AddChidren(btnColor, ChidrenBindMode.BindEventOnly); + var btnRight = new NormalViewControl(this.GetPictrueRealSize(58), this.GetPictrueRealSize(58), false); btnRight.UnSelectedImagePath = "Item/RightNext.png"; btnRight.Y = Application.GetRealHeight(5); @@ -373,7 +330,7 @@ btnRight.Y += this.GetPictrueRealSize(8); frameColor.ButtonClickEvent += (sender, e) => - { + { var form = new PanelColorSelectForm(); form.AddForm(R1, G1, B1); form.FinishSelectColorEvent += (Rcolor, Gcolor, Bcolor) => @@ -382,13 +339,11 @@ G1 = Gcolor; B1 = Bcolor; - //this.keyColorData.CloseColorR = Convert.ToString(Rcolor, 16); - //this.keyColorData.CloseColorG = Convert.ToString(Gcolor, 16); - //this.keyColorData.CloseColorB = Convert.ToString(Bcolor, 16); + this.keyColorData.OpenColorR = Convert.ToString(Rcolor, 16); + this.keyColorData.OpenColorG = Convert.ToString(Gcolor, 16); + this.keyColorData.OpenColorB = Convert.ToString(Bcolor, 16); btnColor.BackgroundColor = this.GetColorByRGB((byte)Rcolor, (byte)Gcolor, (byte)Bcolor); - //鍙樻洿婊戝姩鏉$殑棰滆壊 - seekBar1.ProgressBarColor = btnColor.BackgroundColor; }; }; } @@ -558,18 +513,18 @@ //鍏抽棴杩涘害鏉� this.CloseProgressBar(ShowReLoadMode.YES); return false; - } + } keyColorData = await HdlDevicePanelLogic.Current.GetPanelEpointColorInfo(panelDevice); if (this.keyColorData == null) { //鍏抽棴杩涘害鏉� this.CloseProgressBar(ShowReLoadMode.YES); return false; - } - //鍏抽棴杩涘害鏉� + } + //鍏抽棴杩涘害鏉� this.CloseProgressBar(); - return true; + return true; } #endregion @@ -606,21 +561,20 @@ { this.CloseProgressBar(); return; + } + + //璁剧疆鎸夐敭闈㈡澘棰滆壊鐨勪俊鎭� + result = await HdlDevicePanelLogic.Current.SetPanelColorInfo(panelDevice, this.keyColorData); + this.CloseProgressBar(); + if (result == false) + { + return; } - - //璁剧疆鎸夐敭闈㈡澘鎸囧畾绔偣鐨勩�愭寚绀虹伅寮�鍏抽鑹层�戠殑淇℃伅 - //result = await HdlDevicePanelLogic.Current.SetPanelEpointColorInfo(panelDevice, this.keyColorData); - //this.CloseProgressBar(); - //if (result == false) - //{ - // return; - //} //鍏抽棴鑷韩 this.CloseForm(); - } - + } #endregion - + #region 鈻� 琛ュ厖瀹瑰櫒___________________________ /// <summary> /// 琛屾暟瓒呰繃瀹瑰櫒鏃讹紝琛ヤ竴涓┖鐧紽rameLayout锛屼娇涔嬭兘婊戝姩 diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs old mode 100755 new mode 100644 index 51837e9..68aa327 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirButtonSettionForm.cs @@ -1,5 +1,6 @@ 锘縰sing System; using System.Collections.Generic; +using Org.BouncyCastle.Bcpg.OpenPgp; using Shared.Common; using ZigBee.Common; using ZigBee.Device; @@ -39,7 +40,7 @@ private string bindPmName = string.Empty; #endregion - + #region 鈻� 鍒濆鍖朹____________________________ /// <summary> @@ -49,8 +50,8 @@ public void ShowForm(CommonDevice i_device) { this.deviceObj = i_device; - //鑾峰彇鏁版嵁 - ReadDoorLockUserInfo(deviceObj); + //鑾峰彇鏁版嵁 + ReadDoorLockUserInfo(deviceObj); //璁剧疆澶撮儴淇℃伅 base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uPanelSettion)); @@ -86,9 +87,9 @@ this.listview = tableContr.InitControl(listBackControl.frameTable, Language.StringByID(R.MyInternationalizationString.uDeviceEditor), 1028); //鍒濆鍖栬彍鍗曡 - this.InitMenuRow(); - - //鍒濆鍖栨甯冨畬鎴� + this.InitMenuRow(); + + //鍒濆鍖栨甯冨畬鎴� tableContr.FinishInitControl(); tableContr = null; @@ -100,14 +101,14 @@ { //鍏抽棴鑷韩 this.CloseForm(); - }; + }; } /// <summary> /// 鍒濆鍖栬彍鍗曡 /// </summary> private void InitMenuRow() - { + { this.listview.RemoveAll(); //娣诲姞鏂伴鐩爣 this.AddFreshAirRow(); @@ -163,7 +164,7 @@ }); } #endregion - + #region 鈻� 鏂伴鐩爣_________________________ /// <summary> /// 鏂伴鐩爣琛� @@ -177,15 +178,15 @@ //搴曠嚎 rowNewWind.AddBottomLine(); //鍙崇澶� - rowNewWind.AddRightArrow(); + rowNewWind.AddRightArrow(); - var msg = Language.StringByID(R.MyInternationalizationString.nothing); + var msg = Language.StringByID(R.MyInternationalizationString.nothing); if (!string.IsNullOrEmpty(bindFreshAirName)) { msg = bindFreshAirName; } var btnNewWindStatu = rowNewWind.AddMostRightView(msg, 700); - + rowNewWind.ButtonClickEvent += (sender, e) => { var addDevicePage = new Shared.Phone.UserCenter.DeviceBind.PanelFangyueFreshAirTargetsForm(this.deviceObj, 1); diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs deleted file mode 100755 index 4a06c6c..0000000 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetForm.cs +++ /dev/null @@ -1,323 +0,0 @@ -锘縰sing System; -using System.Collections.Generic; -using System.Text; -using ZigBee.Device; -namespace Shared.Phone.UserCenter.DevicePanel -{ - public class PanelFangyueFreshAirTargetForm : EditorCommonForm - { - #region 鈻� 鍙橀噺澹版槑___________________________ - /// <summary> - /// 鍒楄〃鎺т欢 - /// </summary> - private VerticalListControl listView = null; - /// <summary> - /// 鐩爣璁惧 - /// </summary> - private CommonDevice deviceTarget = null; - /// <summary> - /// 缁戝畾鐨勭洰鏍囩殑涓婚敭(鍙兘缁戝畾涓�涓�) - /// </summary> - private string bindTargetKey = null; - /// <summary> - /// 褰撳墠閫夋嫨鐨勬ゼ灞侷D - /// </summary> - private string nowSelectFloorId = string.Empty; - /// <summary> - /// 1锛氱┖璋冪洰鏍� 2锛氬湴鏆栫洰鏍� 3锛氭柊椋庣洰鏍� - /// </summary> - private int deviceDiv = -1; - /// <summary> - /// 鍙互鏄剧ず鐨勮澶囧璞� (Keys:鎴块棿ID) - /// </summary> - private Dictionary<string, List<CommonDevice>> dicShowDevice = new Dictionary<string, List<CommonDevice>>(); - - #endregion - - #region 鈻� 鍒濆鍖朹____________________________ - /// <summary> - /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) - /// </summary> - /// <param name="i_deviceTarget">鐩爣璁惧</param> - /// <param name="i_bindTargetKey">缁戝畾鐨勭洰鏍囩殑涓婚敭(鍙兘缁戝畾涓�涓�)</param> - /// <param name="i_div">1锛歅M2.5浼犳劅鍣� 2锛氭柊椋庣洰鏍�</param> - public void ShowForm(CommonDevice i_deviceTarget, string i_bindTargetKey, int i_div) - { - this.deviceTarget = i_deviceTarget; - this.bindTargetKey = i_bindTargetKey; - this.deviceDiv = i_div; - - //璁剧疆澶撮儴淇℃伅 - base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uNewWindTarget)); - - //鍒濆鍖栧彸涓婅鐨勬帶浠� - this.InitTopRightMenuControl(); - - //鍒濆鍖栦腑閮ㄤ俊鎭� - this.InitMiddleFrame(); - } - - /// <summary> - /// 鍒濆鍖栦腑閮ㄤ俊鎭� - /// </summary> - private void InitMiddleFrame() - { - //娓呯┖bodyFrame - this.ClearBodyFrame(); - - HdlThreadLogic.Current.RunThread(() => - { - var listRoom = HdlRoomLogic.Current.GetFloorSortRoom(this.nowSelectFloorId, false); - var listDataRoom = new List<Common.Room>(); - for (int i = 0; i < listRoom.Count; i++) - { - //妫�娴嬭兘鍚︽樉绀鸿鎴块棿 - if (this.CheckCanShowRoom(listRoom[i]) == true) - { - listDataRoom.Add(listRoom[i]); - } - } - - HdlThreadLogic.Current.RunMain(() => - { - if (listDataRoom.Count > 0) - { - //鍒濆鍖栨埧闂村拰璁惧鍒楄〃 - this.InitRoomAndDeviceRow(listDataRoom); - } - else - { - //濡傛灉娌℃湁鍙互娣诲姞鐨勭洰鏍� - bodyFrameLayout.RemoveAll(); - this.ShowNotDataImage(bodyFrameLayout, Language.StringByID(R.MyInternationalizationString.uNotHadAddTarget), "Item/NotShardPic.png", 383, 279); - } - }); - }); - } - - /// <summary> - /// 鍒濆鍖栧彸涓婅鐨勬帶浠� - /// </summary> - private void InitTopRightMenuControl() - { - //鑾峰彇妤煎眰 - var dicFloor = HdlRoomLogic.Current.GetFloorSortList(); - if (dicFloor.Count == 0) - { - return; - } - var btnIconContr = new MostRightIconControl(69, 69); - btnIconContr.UnSelectedImagePath = "Item/Drop_Down.png"; - topFrameLayout.AddChidren(btnIconContr); - btnIconContr.InitControl(); - - var btnFloor = new NormalViewControl(300, 69, true); - btnFloor.Gravity = Gravity.CenterVertical; - btnFloor.X = btnIconContr.X + btnIconContr.btnIcon.X - Application.GetRealWidth(300); - btnFloor.TextAlignment = TextAlignment.CenterRight; - topFrameLayout.AddChidren(btnFloor); - - foreach (var floorId in dicFloor.Keys) - { - //绗竴涓ゼ灞� - this.nowSelectFloorId = floorId; - btnFloor.Text = dicFloor[floorId]; - break; - } - - btnIconContr.ButtonClickEvent += (sender, e) => - { - //妤煎眰鑿滃崟 - var contr = new TopRightMenuControl(dicFloor.Count, 2, Language.StringByID(R.MyInternationalizationString.SelectFloor)); - foreach (var floorId in dicFloor.Keys) - { - contr.AddRowMenu(dicFloor[floorId], "Floor/Floor.png", "Floor/FloorSelected.png", () => - { - //璁板綍璧烽�夋嫨鐨処D - this.nowSelectFloorId = floorId; - this.bindTargetKey = string.Empty; - - btnFloor.Text = dicFloor[this.nowSelectFloorId]; - //鍒濆鍖栦腑閮ㄤ俊鎭� - this.InitMiddleFrame(); - }); - } - }; - } - - #endregion - - #region 鈻� 鎴块棿鍜岃澶囧垪琛╛____________________ - - /// <summary> - /// 鍒濆鍖栨埧闂村拰璁惧鍒楄〃 - /// </summary> - /// <param name="listRoom">鍙互鏄剧ず鐨勬埧闂村璞�</param> - private void InitRoomAndDeviceRow(List<Common.Room> listRoom) - { - //鎴块棿鍒楄〃鎺т欢 - var roomContr = new RoomDeviceGroupMenuControl(listRoom); - bodyFrameLayout.AddChidren(roomContr); - - //鍒楄〃鎺т欢 - this.listView = new VerticalListControl(23); - listView.BackgroundColor = UserCenterColor.Current.White; - listView.Height = bodyFrameLayout.Height - roomContr.Height; - listView.Y = roomContr.Bottom; - bodyFrameLayout.AddChidren(listView); - - //淇濆瓨 - var btnSave = new BottomClickButton(); - btnSave.TextID = R.MyInternationalizationString.uSave; - bodyFrameLayout.AddChidren(btnSave); - btnSave.ButtonClickEvent += (sender, e) => - { - //淇濆瓨鐩爣璁惧 - this.SaveTargetDevice(); - }; - - roomContr.SelectRoomEvent += (selectRoom) => - { - HdlThreadLogic.Current.RunMainInThread(() => - { - //娣诲姞璁惧琛� - this.AddDeviceRow(selectRoom.Id); - }); - }; - //鎵ц鍒濆鍖栨埧闂存帶浠� - roomContr.InitControl(); - } - - /// <summary> - /// 娣诲姞璁惧琛� - /// </summary> - /// <param name="roomId"></param> - private void AddDeviceRow(string roomId) - { - //鍏堟竻绌� - this.listView.RemoveAll(); - listView.RecoverHeight(); - - DeviceSimpleSelectControl oldSelectContr = null; - var listDevice = this.dicShowDevice[roomId]; - //鑾峰彇璁惧绫诲瀷鐨� - var deviceEnumInfo = Common.LocalDevice.Current.GetMyDeviceEnumInfo(listDevice); - //妫�鏌ョ鍚堢殑璁惧 - List<CommonDevice> listSupportDevice = new List<CommonDevice> { }; - foreach (var dev in listDevice) - { - //鏂伴闈㈡澘鐨勬柊椋庤澶囷紝鍒欎笉鏄剧ず - if (deviceEnumInfo.ConcreteType == Common.DeviceConcreteType.ButtonPanel_FangyueFreshAir) - { - continue; - } - if (dev.Type == DeviceType.FreshAir) - { - listSupportDevice.Add(dev); - } - } - - DeviceSimpleSelectControl oldDeviceSimpleSelectControl = null; - int curIndex = 0; - for (int i = 0; i < listSupportDevice.Count; i++) - { - string mainKey = Common.LocalDevice.Current.GetDeviceMainKeys(listSupportDevice[i]); - var contr = new DeviceSimpleSelectControl(listSupportDevice[i], false, this.listView.rowSpace / 2); - listView.AddChidren(contr); - contr.InitControl(); - if (i != listSupportDevice.Count - 1) - { - //搴曠嚎 - contr.AddBottomLine(); - } - - contr.ButtonClickEvent += (sender, e) => - { - if (contr.IsSelected) - { - return; - } - contr.IsSelected = true; - oldSelectContr = contr; - this.bindTargetKey = mainKey; - //contr.IsSelected = !contr.IsSelected; - ////閫夋嫨浜嗗埆鐨勮澶� - //if (contr.IsSelected == true) - //{ - // if (oldSelectContr != null) - // { - // oldSelectContr.IsSelected = false; - // } - // oldSelectContr = contr; - // this.bindTargetKey = mainKey; - //} - ////鍙栨秷閫夋嫨 - //else - //{ - // oldSelectContr = null; - // this.bindTargetKey = string.Empty; - //} - }; - if (this.bindTargetKey == mainKey) - { - //杩欎釜鏄畠涔嬪墠缁戝畾鐨勮澶� - contr.ButtonClickEvent(null, null); - } - } - //璋冩暣鐪熷疄楂樺害 - listView.AdjustRealHeightByBottomButton(Application.GetRealHeight(23)); - } - - #endregion - - #region 鈻� 淇濆瓨鏁版嵁___________________________ - - /// <summary> - /// 淇濆瓨鐩爣璁惧 - /// </summary> - private void SaveTargetDevice() - { - this.CloseForm(); - } - - #endregion - - #region 鈻� 涓�鑸柟娉昣__________________________ - - /// <summary> - /// 妫�娴嬭鎴块棿鑳藉惁鏄剧ず - /// </summary> - /// <param name="room"></param> - /// <param name="i_div"></param> - /// <returns></returns> - private bool CheckCanShowRoom(Common.Room room) - { - bool canShow = false; - //鍏堟竻绌� - this.dicShowDevice[room.Id] = new List<CommonDevice>(); - - foreach (var deviceKeys in room.ListDevice) - { - var device = Common.LocalDevice.Current.GetDevice(deviceKeys); - if (device != null) - { - if (device.Type == DeviceType.FreshAir) - { - //canShow = true;//聽聽杩欎釜鐣岄潰涓嶆樉绀烘埧闂� - //鏀堕泦鍙互鏄剧ず鐨勮澶� - this.dicShowDevice[room.Id].Add(device); - } - } - } - return canShow; - } - - private bool CheckdCanShowDevice(CommonDevice device) - { - bool canShow = false; - - return canShow; - } - #endregion - } -} diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFreshAirTargetsForm.cs old mode 100755 new mode 100644 diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFunctionSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFunctionSettionForm.cs index 82f7f96..cdd9f59 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFunctionSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFangyueFunctionSettionForm.cs @@ -37,10 +37,6 @@ /// </summary> private Dictionary<int, string> dicDeviceSaveName = new Dictionary<int, string>(); /// <summary> - /// 璁惧闇�瑕佷繚瀛樼殑璁惧鍔熻兘 - /// </summary> - private Dictionary<int, DeviceFunctionType> dicDeviceFuncType = new Dictionary<int, DeviceFunctionType>(); - /// <summary> /// 淇℃伅缂栬緫鎺т欢 /// </summary> private InformationEditorControl tableContr = null; @@ -94,8 +90,6 @@ { //璁板綍璧峰綋鍓嶆鍦ㄦ搷浣滅殑鍥炶矾鍚嶅瓧 dicDeviceSaveName[nowSelectDevice.DeviceEpoint] = btnDeviceName.Text.Trim(); - //寮�鍚繘搴︽潯 - this.ShowProgressBar(); foreach (var epoint in dicDeviceSaveName.Keys) { var device = Common.LocalDevice.Current.GetDevice(deviceObj.DeviceAddr, epoint); @@ -112,45 +106,10 @@ var result = await Common.LocalDevice.Current.ReName(device, newName); if (result == false) { - //鍏抽棴 - this.CloseProgressBar(); return; } } } - foreach (var epoint in dicDeviceFuncType.Keys) - { - var device = Common.LocalDevice.Current.GetDevice(deviceObj.DeviceAddr, epoint); - if (device == null) - { - continue; - } - //璁剧疆鍔熻兘绫诲瀷 - device.DfunctionType = dicDeviceFuncType[epoint]; - if (device.IsCustomizeImage == true) - { - continue; - } - //閲嶆柊璁剧疆鍥剧墖 - if (device.DfunctionType == DeviceFunctionType.A寮�鍏�) - { - device.IconPath = "Device/Switch.png"; - } - else if (device.DfunctionType == DeviceFunctionType.A鎻掑骇) - { - device.IconPath = "Device/Socket1.png"; - } - else if (device.DfunctionType == DeviceFunctionType.A鐏厜) - { - device.IconPath = "Device/Light.png"; - } - else - { - device.IconPath = "Device/RelayEpoint.png"; - } - device.ReSave(); - } - this.CloseProgressBar(); //鍏抽棴鑷韩 this.CloseForm(); }; @@ -281,95 +240,14 @@ /// </summary> private void AddFunctionTypeRow() { - //濡傛灉鏄户鐢靛櫒鍜岃皟鍏夊櫒鐨勮瘽 - if (nowSelectDevice.Type == DeviceType.OnOffOutput || nowSelectDevice.Type == DeviceType.DimmableLight - || nowSelectDevice.Type == DeviceType.ColorDimmableLight) + //鑷畾涔夊姛鑳界被鍨嬫帶浠� + var rowFunction = new DeviceFunctionTypeRowControl(nowSelectDevice, listview.rowSpace / 2); + if (rowFunction.CanShowRow == true) { - //鍔熻兘绫诲瀷 - string caption = Language.StringByID(R.MyInternationalizationString.uFunctionType); - var DfunctionType = nowSelectDevice.DfunctionType; - if (this.dicDeviceFuncType.ContainsKey(nowSelectDevice.DeviceEpoint) == true) - { - DfunctionType = this.dicDeviceFuncType[nowSelectDevice.DeviceEpoint]; - } - - //鍔熻兘绫诲瀷鐨勭炕璇戝悕瀛� - int nowSelectNo = 1; - string strType = string.Empty; - if (DfunctionType == DeviceFunctionType.A鐏厜) - { - strType = Language.StringByID(R.MyInternationalizationString.uLight); - nowSelectNo = 1; - } - else if (DfunctionType == DeviceFunctionType.A寮�鍏�) - { - strType = Language.StringByID(R.MyInternationalizationString.uSwitch); - nowSelectNo = 0; - } - else if (DfunctionType == DeviceFunctionType.A鎻掑骇) - { - strType = Language.StringByID(R.MyInternationalizationString.uSocket1); - nowSelectNo = 2; - } - - var btnFunction = new FrameCaptionViewControl(caption, strType, listview.rowSpace / 2); - btnFunction.UseClickStatu = false; - listview.AddChidren(btnFunction); - btnFunction.InitControl(); + listview.AddChidren(rowFunction); + rowFunction.InitControl(); //搴曠嚎 - btnFunction.AddBottomLine(); - - //濡傛灉鏄户鐢靛櫒鎵嶈兘澶熸洿鏀硅繖涓姛鑳界被鍨� - if (nowSelectDevice.Type == DeviceType.OnOffOutput) - { - btnFunction.UseClickStatu = true; - //鍙崇澶� - btnFunction.AddRightArrow(); - btnFunction.ButtonClickEvent += (sender, e) => - { - //鏄剧ず鍒楄〃 - var listText = new List<string>(); - listText.Add(Language.StringByID(R.MyInternationalizationString.uSwitch));//寮�鍏� - listText.Add(Language.StringByID(R.MyInternationalizationString.uLight));//鐏厜 - listText.Add(Language.StringByID(R.MyInternationalizationString.uSocket1));//鎻掑骇 - //鏍囬:閫夋嫨鍔熻兘绫诲瀷 - var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType); - - var form = new BottomItemSelectForm(); - form.CancelCallEvent = true;//鍏佽鍙栨秷 - form.AddForm(title, listText, nowSelectNo); - form.FinishSelectEvent += (selectNo) => - { - if (selectNo == -1) - { - //閫夋嫨鍙栨秷 - btnFunction.Text = string.Empty; - } - else - { - btnFunction.Text = listText[selectNo]; - } - nowSelectNo = selectNo; - //璁板綍璧峰綋鍓嶉�夋嫨鐨勫姛鑳界被鍨� - if (selectNo == 0) - { - dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A寮�鍏�; - } - else if (selectNo == 1) - { - dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A鐏厜; - } - else if (selectNo == 2) - { - dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A鎻掑骇; - } - else - { - dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A鏈畾涔�; - } - }; - }; - } + rowFunction.AddBottomLine(); } } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs index 3a46d58..7f44d16 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Device/Panel/PanelFunctionSettionForm.cs @@ -37,10 +37,6 @@ /// </summary> private Dictionary<int, string> dicDeviceSaveName = new Dictionary<int, string>(); /// <summary> - /// 璁惧闇�瑕佷繚瀛樼殑璁惧鍔熻兘 - /// </summary> - private Dictionary<int, DeviceFunctionType> dicDeviceFuncType = new Dictionary<int, DeviceFunctionType>(); - /// <summary> /// 淇℃伅缂栬緫鎺т欢 /// </summary> private InformationEditorControl tableContr = null; @@ -94,8 +90,6 @@ { //璁板綍璧峰綋鍓嶆鍦ㄦ搷浣滅殑鍥炶矾鍚嶅瓧 dicDeviceSaveName[nowSelectDevice.DeviceEpoint] = btnDeviceName.Text.Trim(); - //寮�鍚繘搴︽潯 - this.ShowProgressBar(); foreach (var epoint in dicDeviceSaveName.Keys) { var device = Common.LocalDevice.Current.GetDevice(deviceObj.DeviceAddr, epoint); @@ -112,45 +106,10 @@ var result = await Common.LocalDevice.Current.ReName(device, newName); if (result == false) { - //鍏抽棴 - this.CloseProgressBar(); return; } } } - foreach (var epoint in dicDeviceFuncType.Keys) - { - var device = Common.LocalDevice.Current.GetDevice(deviceObj.DeviceAddr, epoint); - if (device == null) - { - continue; - } - //璁剧疆鍔熻兘绫诲瀷 - device.DfunctionType = dicDeviceFuncType[epoint]; - if (device.IsCustomizeImage == true) - { - continue; - } - //閲嶆柊璁剧疆鍥剧墖 - if (device.DfunctionType == DeviceFunctionType.A寮�鍏�) - { - device.IconPath = "Device/Switch.png"; - } - else if (device.DfunctionType == DeviceFunctionType.A鎻掑骇) - { - device.IconPath = "Device/Socket1.png"; - } - else if (device.DfunctionType == DeviceFunctionType.A鐏厜) - { - device.IconPath = "Device/Light.png"; - } - else - { - device.IconPath = "Device/RelayEpoint.png"; - } - device.ReSave(); - } - this.CloseProgressBar(); //鍏抽棴鑷韩 this.CloseForm(); }; @@ -281,95 +240,14 @@ /// </summary> private void AddFunctionTypeRow() { - //濡傛灉鏄户鐢靛櫒鍜岃皟鍏夊櫒鐨勮瘽 - if (nowSelectDevice.Type == DeviceType.OnOffOutput || nowSelectDevice.Type == DeviceType.DimmableLight - || nowSelectDevice.Type == DeviceType.ColorDimmableLight) + //鑷畾涔夊姛鑳界被鍨嬫帶浠� + var rowFunction = new DeviceFunctionTypeRowControl(nowSelectDevice, listview.rowSpace / 2); + if (rowFunction.CanShowRow == true) { - //鍔熻兘绫诲瀷 - string caption = Language.StringByID(R.MyInternationalizationString.uFunctionType); - var DfunctionType = nowSelectDevice.DfunctionType; - if (this.dicDeviceFuncType.ContainsKey(nowSelectDevice.DeviceEpoint) == true) - { - DfunctionType = this.dicDeviceFuncType[nowSelectDevice.DeviceEpoint]; - } - - //鍔熻兘绫诲瀷鐨勭炕璇戝悕瀛� - int nowSelectNo = 1; - string strType = string.Empty; - if (DfunctionType == DeviceFunctionType.A鐏厜) - { - strType = Language.StringByID(R.MyInternationalizationString.uLight); - nowSelectNo = 1; - } - else if (DfunctionType == DeviceFunctionType.A寮�鍏�) - { - strType = Language.StringByID(R.MyInternationalizationString.uSwitch); - nowSelectNo = 0; - } - else if (DfunctionType == DeviceFunctionType.A鎻掑骇) - { - strType = Language.StringByID(R.MyInternationalizationString.uSocket1); - nowSelectNo = 2; - } - - var btnFunction = new FrameCaptionViewControl(caption, strType, listview.rowSpace / 2); - btnFunction.UseClickStatu = false; - listview.AddChidren(btnFunction); - btnFunction.InitControl(); + listview.AddChidren(rowFunction); + rowFunction.InitControl(); //搴曠嚎 - btnFunction.AddBottomLine(); - - //濡傛灉鏄户鐢靛櫒鎵嶈兘澶熸洿鏀硅繖涓姛鑳界被鍨� - if (nowSelectDevice.Type == DeviceType.OnOffOutput) - { - btnFunction.UseClickStatu = true; - //鍙崇澶� - btnFunction.AddRightArrow(); - btnFunction.ButtonClickEvent += (sender, e) => - { - //鏄剧ず鍒楄〃 - var listText = new List<string>(); - listText.Add(Language.StringByID(R.MyInternationalizationString.uSwitch));//寮�鍏� - listText.Add(Language.StringByID(R.MyInternationalizationString.uLight));//鐏厜 - listText.Add(Language.StringByID(R.MyInternationalizationString.uSocket1));//鎻掑骇 - //鏍囬:閫夋嫨鍔熻兘绫诲瀷 - var title = Language.StringByID(R.MyInternationalizationString.uSelectFunctionType); - - var form = new BottomItemSelectForm(); - form.CancelCallEvent = true;//鍏佽鍙栨秷 - form.AddForm(title, listText, nowSelectNo); - form.FinishSelectEvent += (selectNo) => - { - if (selectNo == -1) - { - //閫夋嫨鍙栨秷 - btnFunction.Text = string.Empty; - } - else - { - btnFunction.Text = listText[selectNo]; - } - nowSelectNo = selectNo; - //璁板綍璧峰綋鍓嶉�夋嫨鐨勫姛鑳界被鍨� - if (selectNo == 0) - { - dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A寮�鍏�; - } - else if (selectNo == 1) - { - dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A鐏厜; - } - else if (selectNo == 2) - { - dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A鎻掑骇; - } - else - { - dicDeviceFuncType[nowSelectDevice.DeviceEpoint] = DeviceFunctionType.A鏈畾涔�; - } - }; - }; - } + rowFunction.AddBottomLine(); } } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs index c00653b..3090b66 100644 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/DoorLockCommonInfo.cs @@ -11,7 +11,7 @@ { #region 鏈湴鍙橀噺 /// <summary> - /// + /// 鏇存柊鈥滈�昏緫甯稿紑鈥濈晫闈㈢殑鍥炶皟 /// </summary> public static Action<bool> LogicAction = null; /// <summary> @@ -150,15 +150,7 @@ /// </summary> public static void NormallyOpenModeValue(ZigBee.Device.DoorLock doorLock, bool value) { - string key = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint; - if (doorLock.IsDoorLockNormallyMode.ContainsKey(key)) - { - doorLock.IsDoorLockNormallyMode[key] = value; - } - else - { - doorLock.IsDoorLockNormallyMode.Add(key, value); - } + doorLock.IsDoorLockNormallyMode = value; if (LogicAction != null) { @@ -219,17 +211,9 @@ { //涓婃姤鈥滃父寮�妯″紡鈥濆凡琚彇娑� Application.RunOnMainThread(() => { CommonPage.Loading.Start(""); }); - //鍏堝垹闄ゅ凡澶辨晥鐨勨�滃父寮�妯″紡鈥濈殑閫昏緫 - //if (resTemp == 1) - //{ - // var restulTemp = await Shared.Phone.Device.Logic.SkipView.Exist(3); - // //if (restulTemp == 3) - // //{ - // // string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed2); - // // this.ShowTipMsg(msg0); - // // return; - // //} - //} + + //娓╁眳鍩庢柟娉曪紵锛燂紵 + //姝ゅ鏄惁瑕佸垹闄ゆ俯灞呭煄鐨勭壒娈婇�昏緫 //app閲嶆柊寮�鍚�滃父寮�妯″紡鈥� var result = await doorLock.SetNormallyOpenModeFuncAsync(true); @@ -241,7 +225,6 @@ ShowTipMsg(msg0); NormallyOpenModeValue(doorLock, false); CommonPage.Loading.Hide(); - //new Tip() { MaxWidth = 150, Text = msg0, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); }); action?.Invoke(); return; @@ -254,7 +237,6 @@ ShowTipMsg(msg1); NormallyOpenModeValue(doorLock, false); CommonPage.Loading.Hide(); - //new Tip() { MaxWidth = 150, Text = msg1, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); }); action?.Invoke(); return; @@ -269,7 +251,6 @@ ShowTipMsg(msg0); NormallyOpenModeValue(doorLock, true); CommonPage.Loading.Hide(); - //new Tip() { MaxWidth = 150, Text = msg0, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); }); } } @@ -288,12 +269,8 @@ NormallyOpenModeValue(doorLock, false); if (haveLogic) { - var resTemp2 = await Shared.Phone.Device.Logic.SkipView.Exist(3); - //if (resTemp2 == 3) - //{ - // string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed); - // this.ShowTipMsg(msg0); - //} + //娓╁眳鍩庢柟娉曪紵锛燂紵 + //姝ゅ鏄惁瑕佸垹闄ゆ俯灞呭煄鐨勭壒娈婇�昏緫 } } else @@ -307,7 +284,6 @@ { ShowTipMsg(Language.StringByID(R.MyInternationalizationString.GwResponseOvertime)); CommonPage.Loading.Hide(); - //new Tip() { MaxWidth = 150, Text = Language.StringByID(R.MyInternationalizationString.GwResponseOvertime), Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); }); action?.Invoke(); return; @@ -319,7 +295,6 @@ string msg1 = Language.StringByID(R.MyInternationalizationString.CloseNormallyOpenModeFailed); ShowTipMsg(msg1); CommonPage.Loading.Hide(); - //new Tip() { MaxWidth = 150, Text = msg1, Direction = AMPopTipDirection.None, CloseTime = 1 }.Show(CommonPage.Instance); }); action?.Invoke(); return; @@ -334,22 +309,8 @@ if (haveLogic) { var resTemp1 = await Shared.Phone.Device.Logic.SkipView.Exist(3); - //鍥犱负鐩墠鏈哄埗闂锛岄�昏緫缁忓父澶辫触锛屾墍浠ヤ笉鎻愮ず锛屽悗鏈熸満鍒惰鏀癸紝閲嶆柊鍋氫竴涓繖涓晫闈� - //if (resTemp1 == 3) - //{ - //Application.RunOnMainThread(() => - //{ - // string msg0 = Language.StringByID(R.MyInternationalizationString.CancelLogicNormallyModeFailed); - // ShowTipMsg(msg0); - //}); - //} - //else if (resTemp1 == 2) - //{ - //Application.RunOnMainThread(() => - //{ - // string msg0 = Language.StringByID(R.MyInternationalizationString.CloseNormallyOpenModeSuccess); - // ShowTipMsg(msg0); - //}); + //娓╁眳鍩庢柟娉曪紵锛燂紵 + //姝ゅ鏄惁瑕佸垹闄ゆ俯灞呭煄鐨勭壒娈婇�昏緫 } Application.RunOnMainThread(() => { @@ -470,20 +431,8 @@ }); } - //榛樿鍒涘缓甯稿紑妯″紡鐨勭壒娈婇�昏緫 - var res = await Shared.Phone.Device.Logic.SkipView.LockAddModifyLogic(DoorLockCommonInfo.NormallyOpenModeInvalidTime, doorLock); - //if (!res) - //{ - // Application.RunOnMainThread(() => - // { - // //榛樿鍒涘缓甯稿紑妯″紡澶辫触 - // string msg0 = Language.StringByID(R.MyInternationalizationString.AddLogicNormallyModeFailed); - // var alert = new UserCenter.ShowMsgControl(UserCenter.ShowMsgType.Normal, msg0, Language.StringByID(R.MyInternationalizationString.confrim)); - // alert.Show(); - // //浜屾鍔犺浇寮圭獥 甯稿紑妯″紡寮�鍚彁绀� - // NomallyOpenModeInvalidTimeDialog(doorLock, action); - // }); - //} + //娓╁眳鍩庢柟娉曪紵锛燂紵 + //姝ゅ鏄惁瑕佸垱寤哄父寮�妯″紡鐨勭壒娈婇�昏緫 }; } #endregion @@ -1248,7 +1197,6 @@ }); } - #endregion - + #endregion } } diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs old mode 100644 new mode 100755 index 37af7b7..37945a5 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/FunctionSetting.cs @@ -252,7 +252,7 @@ } }; } - #endregion + #endregion #region 娣诲姞鍏ㄩ儴鑿滃崟 /// <summary> diff --git a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs index 281a899..d546c58 100644 --- a/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/DoorLock/UserDoorLockPage.cs @@ -605,15 +605,11 @@ { return; } - string key = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint; - if (doorLock.IsDoorLockNormallyMode.ContainsKey(key)) - { - if (doorLock.IsDoorLockNormallyMode[key] == true) - { - if (canOpenNormallyMode) - { - Application.RunOnMainThread(() => { NomallyOpenModeInvalidDialog(true); }); - } + if (doorLock.IsDoorLockNormallyMode) + { + if (canOpenNormallyMode) + { + Application.RunOnMainThread(() => { NomallyOpenModeInvalidDialog(true); }); } } } @@ -849,26 +845,17 @@ //寮�閿佷簨浠� EventHandler<MouseEventArgs> hander1 = async (sender, e) => { - - string key = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint; - if (doorLock.IsDoorLockNormallyMode.ContainsKey(key)) + if (doorLock.IsDoorLockNormallyMode) { - if (doorLock.IsDoorLockNormallyMode[key] == true) + if (canOpenNormallyMode) { - if (canOpenNormallyMode) - { - NomallyOpenModeInvalidDialog(false); - } - else - { - OpenDoorLockHandle(progressButton, btnDoorLockPic, btnStatus); - } + NomallyOpenModeInvalidDialog(false); } else { OpenDoorLockHandle(progressButton, btnDoorLockPic, btnStatus); } - } + } else { OpenDoorLockHandle(progressButton, btnDoorLockPic, btnStatus); @@ -886,13 +873,9 @@ { if (canOpenNormallyMode) { - var key = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint; - if (doorLock.IsDoorLockNormallyMode.ContainsKey(key)) + if (doorLock.IsDoorLockNormallyMode) { - if (doorLock.IsDoorLockNormallyMode[key] == true) - { - NomallyOpenModeInvalidDialog(); - } + NomallyOpenModeInvalidDialog(); } } else @@ -1086,12 +1069,6 @@ action = () => { - //绯荤粺瀵嗙爜鏀寔鎿嶄綔闂ㄩ攣鍚庯紝璋冪敤闂俯灞呭煄鐨勭晫闈€�愬父寮�鑷姩鍖栥�� - //Action nomallyOpenModeStartAction = () => - //{ - // UpdateNomallyOpenStatus(); - //}; - string msg = Language.StringByID(R.MyInternationalizationString.SetDoorLockNomallyOpen).Replace("{0}", "\r\n"); var confirm = Language.StringByID(R.MyInternationalizationString.Confrim); var alert = new ShowDoorLockMsgControl(ShowDoorLockMsgControl.DoorLockMsgType.Confirm, msg, confirm); @@ -1415,12 +1392,7 @@ btnNormallyOpenFrameLayout.Width = Application.GetRealWidth(0); return; } - string key = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint; - if (!doorLock.IsDoorLockNormallyMode.ContainsKey(key)) - { - return; - } - if (doorLock.IsDoorLockNormallyMode[key] == true) + if (doorLock.IsDoorLockNormallyMode) { btnNormallyOpen.IsSelected = true; btnDoorLockPic.IsSelected = true; @@ -1428,7 +1400,7 @@ btnStatus.Text = Language.StringByID(R.MyInternationalizationString.Current) + Language.StringByID(R.MyInternationalizationString.DoorLockOpen); } - else if (doorLock.IsDoorLockNormallyMode[key] == false) + else if (!doorLock.IsDoorLockNormallyMode) { btnStatus.Text = Language.StringByID(R.MyInternationalizationString.Current) + Language.StringByID(R.MyInternationalizationString.CLose); btnDoorLockPic.IsSelected = false; diff --git a/ZigbeeApp/Shared/Phone/UserView/HomePage.cs b/ZigbeeApp/Shared/Phone/UserView/HomePage.cs index 5b29ee7..cfe69a0 100755 --- a/ZigbeeApp/Shared/Phone/UserView/HomePage.cs +++ b/ZigbeeApp/Shared/Phone/UserView/HomePage.cs @@ -81,7 +81,7 @@ else { //鏈櫥褰曞脊鍑虹櫥褰曠晫闈� - var accountLogin = new Login.AccountLogin { }; + var accountLogin = new Login.AccountLoginForm { }; Shared.Common.CommonPage.Instance.AddChidren(accountLogin); accountLogin.ShowForm(); } diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs old mode 100755 new mode 100644 index 944cd49..6a54df8 --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/DoorLock.cs @@ -35,11 +35,12 @@ public string currentUserDisplayMethod = string.Empty;//褰撳墠鐢ㄦ埛鏄剧ず鏂瑰紡 //鏈湴鎵�鏈夎处鎴峰垪琛� public List<Shared.Phone.UserCenter.MemberInfoRes> localAllAccountList = new List<Shared.Phone.UserCenter.MemberInfoRes> { }; + /// <summary> - /// 鏄惁甯稿紑妯″紡銆恔ey = doorLock.DeviceAddr + "_" + doorLock.DeviceEpoint銆� + /// 鏄惁甯稿紑妯″紡 /// ture:甯稿紑锛� false:鍏抽棴 /// </summary> - public Dictionary<string, bool> IsDoorLockNormallyMode = new Dictionary<string, bool> { };//鏄惁鍐荤粨瀛愯处鎴� + public bool IsDoorLockNormallyMode = false; public string LocalTempPassword = string.Empty;//鏈湴鐢熸垚鐨勪复鏃跺瘑鐮� public Dictionary<string, bool> IsFreezeAccount = new Dictionary<string, bool> { };//鏄惁鍐荤粨瀛愯处鎴� public Dictionary<string, bool> HasRemoteUnlockAccess = new Dictionary<string, bool> { };//鏄惁缁欏瓙璐︽埛鎷ユ湁杩滅▼寮�閿佺殑鏉′欢 diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs old mode 100755 new mode 100644 index cc6989d..b90f787 --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/FreshAir.cs @@ -18,7 +18,7 @@ /// 椋庨�熸ā寮� /// <para>5:鑷姩</para> /// <para>6:Smart</para> - /// <para>7:鎵嬪姩</para> + /// <para>15:鎵嬪姩</para> /// </summary> public int currentFanMode = 0; /// <summary> @@ -224,7 +224,7 @@ /// <summary> /// 鎵嬪姩 /// </summary> - Manual = 7, + Manual = 15, } } } diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs old mode 100755 new mode 100644 index 2ac732f..edd263e --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/Panel.cs @@ -37,6 +37,10 @@ /// </summary> public string currentSelectFloorId = string.Empty; /// <summary> + /// 褰撳墠閫夋嫨鐨勬埧闂碔D銆愭柊椋庨潰鏉裤�� + /// </summary> + public string currentSelectRoomId = string.Empty; + /// <summary> /// 褰撳墠寮�鍏虫ā寮� /// </summary> public string CurrentSwitchMode = ""; diff --git a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs old mode 100755 new mode 100644 index a105443..09952d0 --- a/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs +++ b/ZigbeeApp/Shared/Phone/ZigBee/Device/ZbGateway.cs @@ -3273,8 +3273,8 @@ /// <summary> /// 杩滅▼MqttClient /// </summary> - public static IMqttClient RemoteMqttClient= new MqttFactory().CreateMqttClient(); - static bool remoteIsConnected; + public static IMqttClient RemoteMqttClient = new MqttFactory().CreateMqttClient(); + static bool remoteIsConnected; private int IsLogin = 0; [Newtonsoft.Json.JsonIgnore] static Action actionTemp; @@ -3467,8 +3467,8 @@ .WithTcpServer(domain, int.Parse(port)) .WithCredentials(connEmqUserName, connEmqPwd) .WithKeepAlivePeriod(TimeSpan.FromSeconds(20)) - .WithCleanSession() - //.WithCommunicationTimeout(TimeSpan.FromSeconds(10)) + .WithCleanSession() + //.WithCommunicationTimeout(TimeSpan.FromSeconds(10)) .Build(); await DisConnectRemoteMqttClient("StartRemoteMqtt"); await RemoteMqttClient.ConnectAsync(options, CancellationToken.None); @@ -3503,7 +3503,7 @@ localIsConnected = false; DebugPrintLog($"Local涓诲姩鏂紑_{s}"); //await localMqttClient.DisconnectAsync(new MQTTnet.Client.Disconnecting.MqttClientDisconnectOptions { }, CancellationToken.None); - await localMqttClient.DisconnectAsync(); + await localMqttClient.DisconnectAsync(); } } catch (Exception ex) @@ -3515,7 +3515,7 @@ /// <summary> /// 鏂紑杩滅▼Mqtt鐨勯摼鎺� /// </summary> - public static async System.Threading.Tasks.Task DisConnectRemoteMqttClient(string s="") + public static async System.Threading.Tasks.Task DisConnectRemoteMqttClient(string s = "") { try { @@ -3527,7 +3527,8 @@ await RemoteMqttClient.DisconnectAsync(); } } - catch(Exception e) { + catch (Exception e) + { DebugPrintLog($"Remote鏂紑閫氳杩炴帴鍑哄紓甯�:{e.Message}"); } } @@ -3633,7 +3634,7 @@ { await localMqttClient.PublishAsync(new MqttApplicationMessage { Topic = topic, Payload = message, QualityOfServiceLevel = MQTTnet.Protocol.MqttQualityOfServiceLevel.ExactlyOnce, Retain = retain }); } - catch(Exception e) + catch (Exception e) { DebugPrintLog($"Local涓诲姩鏂紑_{e.Message}"); await DisConnectLocalMqttClient(e.Message); @@ -3752,7 +3753,8 @@ { return; } - if (topics[2]== "NotifyGateWayInfoChange") { + if (topics[2] == "NotifyGateWayInfoChange") + { initGateWayBaseInfomation(); return; } @@ -3838,7 +3840,7 @@ /// <param name="topic">Topic.</param> /// <param name="message">Message.</param> /// <param name="e">E.</param> - static void ReceiveMessage(string topic, string message, byte []payload) + static void ReceiveMessage(string topic, string message, byte[] payload) { try { diff --git a/ZigbeeApp/Shared/R.cs b/ZigbeeApp/Shared/R.cs index 8aaba76..3e656f6 100644 --- a/ZigbeeApp/Shared/R.cs +++ b/ZigbeeApp/Shared/R.cs @@ -5730,6 +5730,11 @@ /// 鐏叏鍏� /// </summary> public const int uAllLightClose = 16114; + /// <summary> + /// 甯稿紑鑷姩鍖栨墜鍔ㄥ彇娑� + /// </summary> + public const int uNormallyOpenLogicManualClose = 16115; + //鈽呪槄鈽呪槄涓嬮潰杩欎簺鏄帴鍙g殑杩斿洖淇℃伅缈昏瘧,浠�18000寮�濮嬧槄鈽呪槄鈽� /// <summary> @@ -6193,6 +6198,10 @@ /// 鑷畾涔夎澶囨墍灞濱D涓�16鐨勭炕璇戝悕瀛楋細骞叉帴鐐� /// </summary> public const int uDeviceBelongId16 = 40017; + /// <summary> + /// 鑷畾涔夎澶囨墍灞濱D涓�2310鐨勭炕璇戝悕瀛楋細鏂伴 + /// </summary> + public const int uDeviceBelongId2310 = 40018; //鈽呪槄鈽呪槄妯″潡ID鐨勮澶囬粯璁ゅ娉ㄥ悕瀛�,浠�50000寮�濮�,杩欓噷涓嶉渶瑕佸畾涔�,鍙啓鍦↙anguage.ini鏂囦欢閲岄潰鈽呪槄鈽呪槄 //鈽呪槄鈽呪槄妯″潡ID鐨勮澶囩被鍨嬪悕瀛�,浠�60000寮�濮�,杩欓噷涓嶉渶瑕佸畾涔�,鍙啓鍦↙anguage.ini鏂囦欢閲岄潰鈽呪槄鈽呪槄 diff --git a/ZigbeeApp/Shared/Shared.projitems b/ZigbeeApp/Shared/Shared.projitems old mode 100755 new mode 100644 index 6c3a1c5..3d71b32 --- a/ZigbeeApp/Shared/Shared.projitems +++ b/ZigbeeApp/Shared/Shared.projitems @@ -51,7 +51,7 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\SkipView.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\Device\Logic\SoneLogicList.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountForgetPWD.cs" /> - <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountLogic.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\Logic\AccountLogic.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountRegister.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountRegisterSuccess.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountResetPWDSuccess.cs" /> @@ -196,9 +196,7 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueEnvironmentButtonSettionForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueEnvironmentLightSettionForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueEnvironmentTargetForm.cs" /> - <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueFreshAirBackLightSettionForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueFreshAirButtonSettionForm.cs" /> - <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueFreshAirTargetForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueFreshAirTargetsForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueFunctionSettionForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\PirSensor\PirSensorDimmingModeForm.cs" /> @@ -206,19 +204,16 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\PirSensor\PirSensorWorkModeMenuForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\AddUnLockMethod.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\AddUnLockMethodTip.cs" /> - <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\DoorLockCommonInfo.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\DoorLockCommonLayout.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\DoorlockDialog.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\EntryStatusPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\FunctionSetting.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\MasterManagementPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\MemberFrozenPage.cs" /> - <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\ShowDoorLockMsgControl.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\TemporaryPassword.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\TimeSettignPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\UndistributeDoorlockUserPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\UnLockMethod.cs" /> - <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\UserDoorLockPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\UserManagement.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\AddGatewayHelpForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\WirelessApDirection1Form.cs" /> @@ -396,7 +391,6 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\UserView\LoginLoading.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\ZigBee\Device\AC.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\ZigBee\Device\DimmableLight.cs" /> - <Compile Include="$(MSBuildThisFileDirectory)Phone\ZigBee\Device\DoorLock.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\ZigBee\Device\FreshAir.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\ZigBee\Device\HumiditySensor.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\ZigBee\Device\Repeater.cs" /> @@ -417,7 +411,7 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\WiredGatewayDirectionForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Add\WiredGatewaySearchForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Gateway\Manage\GatewayInfoEditorForm.cs" /> - <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountLogin.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\Login\AccountLoginForm.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Common\CommonPage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\GetAreaCode.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Common\ResponseEntity\ResidenceRes.cs" /> @@ -474,9 +468,16 @@ <Compile Include="$(MSBuildThisFileDirectory)Phone\ZigBee\IO\LocalFileUtils.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlSafeguardLogic.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\CommonBase\Logic\HdlAlarmsLogic.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\Device\Panel\PanelFangyueFreshAirBackLightSettionForm.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\UserDoorLockPage.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\DoorLockCommonInfo.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\UserCenter\DoorLock\ShowDoorLockMsgControl.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\ZigBee\Device\DoorLock.cs" /> + <Compile Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceCard\DeviceFreshAirCardControl.cs" /> </ItemGroup> <ItemGroup> <Folder Include="$(MSBuildThisFileDirectory)Phone\CommonForm\" /> + <Folder Include="$(MSBuildThisFileDirectory)Phone\Login\Logic\" /> <Folder Include="$(MSBuildThisFileDirectory)Phone\MainPage\Controls\DeviceCard\Base\" /> </ItemGroup> <ItemGroup> -- Gitblit v1.8.0