From a9d1161b1df96e7ddad566335989a1444e433ef5 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期二, 28 三月 2023 11:54:45 +0800 Subject: [PATCH] 2023年03月28日11:52:02 --- HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs | 174 +++++++++++++++++++++++++++++++--------------------------- 1 files changed, 93 insertions(+), 81 deletions(-) diff --git a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs index 5b6d5ca..6b7887f 100644 --- a/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs +++ b/HDL_ON/UI/UI2/FuntionControlView/DoorLock/DoorLockPage.cs @@ -5,6 +5,7 @@ using System.Text; using HDL_ON.UI.CSS; using HDL_ON.Entity; +using HDL_ON.DriverLayer; namespace HDL_ON.UI { @@ -96,24 +97,26 @@ this.dicText["宸茶繛鎺�"] = Language.StringByID(StringId.Connected); this.dicText["鏈繛鎺�"] = Language.StringByID(StringId.UnConnected); - //宸﹀彸缈婚〉鐨勪簨浠� - base.PageChangeEvent += (index) => - { - if (index == 1) - { - //鍒濆鍖栭棬閿佸巻鍙茶褰曚互鍙婃帶浠� - this.InitDoorHistoryLogAndControl(); - } - }; + ////宸﹀彸缈婚〉鐨勪簨浠� + //base.PageChangeEvent += (index) => + //{ + // if (index == 1) + // { + // //鍒濆鍖栭棬閿佸巻鍙茶褰曚互鍙婃帶浠� + // this.InitDoorHistoryLogAndControl(); + // } + //}; //鍒锋柊褰撳墠璁惧鐨勭姸鎬佺紦瀛� this.RefreshNowDeviceStatuMemory(this.device); //鍒濆鍖栫涓�涓储寮曢〉鐨勫唴瀹� this.InitFrameWhiteContent1(); - //鍒濆鍖栫浜屼釜绱㈠紩椤�(鍘嗗彶璁板綍) - this.InitFrameWhiteContent2(); + ////鍒濆鍖栫浜屼釜绱㈠紩椤�(鍘嗗彶璁板綍) + //this.InitFrameWhiteContent2(); //鍒锋柊鐣岄潰鐘舵�� this.RefreshFormStatu(); + //璇诲彇璁惧鐘舵�� + Control.Ins.SendReadCommand(device); } /// <summary> @@ -126,7 +129,7 @@ //瀹冩湁涓渶灏忕殑X杞� batteryControl.X = Application.GetRealWidth(104) > base.btnRoomName.Right ? Application.GetRealWidth(104) : base.btnRoomName.Right + Application.GetRealWidth(4); - FrameWhiteCentet1.AddChidren(batteryControl); + //FrameWhiteCentet1.AddChidren(batteryControl); if (batteryControl.Height > base.btnRoomName.Height) { //涓�涓槸25锛屼竴涓槸21锛屽紕涓嶅噯鍒板簳璋佹洿楂�,鍥犱负璁$畻鏂规硶涓嶄竴鏍� @@ -144,7 +147,7 @@ btnOnlineIcon.X = batteryControl.Right + Application.GetRealWidth(12); btnOnlineIcon.Y = batteryControl.Y; btnOnlineIcon.UnSelectedImagePath = "FunctionIcon/DoorLock/Connect.png"; - FrameWhiteCentet1.AddChidren(btnOnlineIcon); + //FrameWhiteCentet1.AddChidren(btnOnlineIcon); //鍦ㄧ嚎鏂囨湰 this.btnOnlineView = new NormalViewControl(Application.GetRealWidth(100), btnOnlineIcon.Height, false); btnOnlineView.X = btnOnlineIcon.Right + Application.GetRealWidth(4); @@ -152,7 +155,7 @@ btnOnlineView.TextSize = CSS_FontSize.PromptFontSize_SecondaryLevel; btnOnlineView.TextColor = CSS_Color.PromptingColor1; btnOnlineView.TextID = StringId.Connected; - FrameWhiteCentet1.AddChidren(btnOnlineView); + //FrameWhiteCentet1.AddChidren(btnOnlineView); //鍙充笂瑙掗厤缃粨鏉熺殑浜嬩欢 base.SettionFinishEvent += () => { @@ -167,7 +170,7 @@ this.picLockControl = new PicViewControl(256, 260); picLockControl.Y = Application.GetRealHeight(129); picLockControl.Gravity = Gravity.CenterHorizontal; - picLockControl.UnSelectedImagePath = "FunctionIcon/DoorLock/LockPictrue1.png"; + picLockControl.UnSelectedImagePath = "FunctionIcon/DoorLock/LockPictrue1.png"; FrameWhiteCentet1.AddChidren(picLockControl); picLockControl.ButtonClickEvent += (sender, e) => { @@ -182,42 +185,42 @@ frameTempPsw.Visible = false; FrameWhiteCentet1.AddChidren(frameTempPsw); - //澹伴煶 - this.btnVoice = new IconViewControl(24); - btnVoice.UnSelectedImagePath = "FunctionIcon/DoorLock/Voice.png"; - btnVoice.X = Application.GetRealWidth(23); - btnVoice.Y = Application.GetRealHeight(410); - FrameWhiteCentet1.AddChidren(btnVoice); + ////澹伴煶 + //this.btnVoice = new IconViewControl(24); + //btnVoice.UnSelectedImagePath = "FunctionIcon/DoorLock/Voice.png"; + //btnVoice.X = Application.GetRealWidth(23); + //btnVoice.Y = Application.GetRealHeight(410); + //FrameWhiteCentet1.AddChidren(btnVoice); - //澹伴煶鐨勬粦鍔ㄦ潯 - this.seekBarVoiceControl = new SeekBarImageControl(215); - seekBarVoiceControl.Gravity = Gravity.CenterHorizontal; - FrameWhiteCentet1.AddChidren(seekBarVoiceControl); - seekBarVoiceControl.Y = btnVoice.Y - (seekBarVoiceControl.Height - btnVoice.Height) / 2; - //缁戝畾PageLayout鎺т欢 - seekBarVoiceControl.BindPageLayout(); + ////澹伴煶鐨勬粦鍔ㄦ潯 + //this.seekBarVoiceControl = new SeekBarImageControl(215); + //seekBarVoiceControl.Gravity = Gravity.CenterHorizontal; + //FrameWhiteCentet1.AddChidren(seekBarVoiceControl); + //seekBarVoiceControl.Y = btnVoice.Y - (seekBarVoiceControl.Height - btnVoice.Height) / 2; + ////缁戝畾PageLayout鎺т欢 + //seekBarVoiceControl.BindPageLayout(); - //澹伴煶鐧惧垎姣� - this.btnVoicePersent = new NormalViewControl(Application.GetRealWidth(50), btnVoice.Height, false); - btnVoicePersent.X = seekBarVoiceControl.Right + Application.GetRealWidth(8) - seekBarVoiceControl.SeekBarPadding; - btnVoicePersent.Y = btnVoice.Y; - btnVoicePersent.TextColor = CSS_Color.PromptingColor1; - btnVoicePersent.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; - btnVoicePersent.Text = "100%"; - FrameWhiteCentet1.AddChidren(btnVoicePersent); + ////澹伴煶鐧惧垎姣� + //this.btnVoicePersent = new NormalViewControl(Application.GetRealWidth(50), btnVoice.Height, false); + //btnVoicePersent.X = seekBarVoiceControl.Right + Application.GetRealWidth(8) - seekBarVoiceControl.SeekBarPadding; + //btnVoicePersent.Y = btnVoice.Y; + //btnVoicePersent.TextColor = CSS_Color.PromptingColor1; + //btnVoicePersent.TextSize = CSS_FontSize.PromptFontSize_FirstLevel; + //btnVoicePersent.Text = "100%"; + //FrameWhiteCentet1.AddChidren(btnVoicePersent); - seekBarVoiceControl.ProgressChangedEvent += (div, value) => - { - btnVoicePersent.Text = value + "%"; - if (div == 1) - { - } - }; + //seekBarVoiceControl.ProgressChangedEvent += (div, value) => + //{ + // btnVoicePersent.Text = value + "%"; + // if (div == 1) + // { + // } + //}; //鍒濆鍖栧紑閿佽彍鍗�(涓�閿紑閿�,涓存椂瀵嗙爜寮�閿�) this.InitUnLockMenuControl(); //鍒濆鍖栧簳閮ㄨ彍鍗曞浘鏍� - this.InitBottomMenuIconControl(); + //this.InitBottomMenuIconControl(); } /// <summary> @@ -226,7 +229,7 @@ private void InitUnLockMenuControl() { //濡傛灉鏄垚鍛�,鍒欏彧鏈変竴閿紑閿� - if (DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true) + if (true)// DB_ResidenceData.Instance.CurrentRegion.isOtherShare == true) { //涓�閿紑閿� var btnOneKey = new NormalViewControl(100, 25, true); @@ -908,6 +911,17 @@ HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipRemind, Language.StringByID(StringId.DeviceNotOnline), null, null, null, 2); return; } + if (UserInfo.Current.VerOpenDoorPw || string.IsNullOrEmpty(UserInfo.Current.doorPasswordString)) + { + var page = new DoorLockUnlockPage(this.device); + MainPage.BasePageView.AddChidren(page); + page.LoadView(); + MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + } + else + { + Control.Ins.OneKeyUnlocking(this.device, UserInfo.Current.doorPasswordString); + } //绗竴娆′娇鐢紝璇峰厛缁戝畾闂ㄩ攣瀵嗙爜 //HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.PleaseBindTheDoorPswFirst), () => //{ @@ -921,42 +935,40 @@ // }); //}); - if (UserInfo.Current.appUnlockPage.Contains("3") == true) - { - //璋冭捣瀹夊叏璁よ瘉 - HdlCheckLogic.Current.CheckUnlockSecurity(true, (div) => - { - //閿佸凡鎵撳紑 - if (div == 1) - { - HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipSuccess, Language.StringByID(StringId.LockIsOpened), null, null, null, 2); - } - else - { - //涓轰簡瀹夊叏锛岃璺宠浆鑷充釜浜轰腑蹇儃0}璁剧疆涓汉瀵嗙爜锛屽苟搴旂敤浜庨棬閿佸紑閿� - HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () => - { - var page = new AppUnlockSettingsPage(); - MainPage.BasePageView.AddChidren(page); - page.LoadPage(); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - - }, Language.StringByID(StringId.Jump)); - } - }); - } - else - { - //涓轰簡瀹夊叏锛岃璺宠浆鑷充釜浜轰腑蹇儃0}璁剧疆涓汉瀵嗙爜锛屽苟搴旂敤浜庨棬閿佸紑閿� - HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () => - { - var page = new AppUnlockSettingsPage(); - MainPage.BasePageView.AddChidren(page); - page.LoadPage(); - MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; - - }, Language.StringByID(StringId.Jump)); - } + //if (UserInfo.Current.appUnlockPage.Contains("3") == true) + //{ + // //璋冭捣瀹夊叏璁よ瘉 + // HdlCheckLogic.Current.CheckUnlockSecurity(true, (div) => + // { + // //閿佸凡鎵撳紑 + // if (div == 1) + // { + // HdlMessageLogic.Current.ShowMassage(ShowMsgType.TipSuccess, Language.StringByID(StringId.LockIsOpened), null, null, null, 2); + // } + // else + // { + // //涓轰簡瀹夊叏锛岃璺宠浆鑷充釜浜轰腑蹇儃0}璁剧疆涓汉瀵嗙爜锛屽苟搴旂敤浜庨棬閿佸紑閿� + // HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () => + // { + // var page = new AppUnlockSettingsPage(); + // MainPage.BasePageView.AddChidren(page); + // page.LoadPage(); + // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + // }, Language.StringByID(StringId.Jump)); + // } + // }); + //} + //else + //{ + // //涓轰簡瀹夊叏锛岃璺宠浆鑷充釜浜轰腑蹇儃0}璁剧疆涓汉瀵嗙爜锛屽苟搴旂敤浜庨棬閿佸紑閿� + // HdlMessageLogic.Current.ShowMassage(ShowMsgType.Confirm, Language.StringByID(StringId.JumpToPersonalCentetToSetPasswordMsg), () => + // { + // var page = new AppUnlockSettingsPage(); + // MainPage.BasePageView.AddChidren(page); + // page.LoadPage(); + // MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; + // }, Language.StringByID(StringId.Jump)); + //} } #endregion -- Gitblit v1.8.0