From efad979b6fae76fb37a4de7e94e6bac0a85cb72c Mon Sep 17 00:00:00 2001 From: JLChen <551775569@qq.com> Date: 星期二, 30 十一月 2021 13:14:28 +0800 Subject: [PATCH] 2021-11-30 1.修复乐橙Android,没调用拒接接口问题。 --- HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs | 38 ++++++++++++++++++-------------------- 1 files changed, 18 insertions(+), 20 deletions(-) diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs index ab952eb..cc204e9 100644 --- a/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs +++ b/HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs @@ -10,19 +10,16 @@ { public SetPir() { - Tag = "PirMain"; + Tag = "PirView"; } - Action backAction; - public void Show(Action action) + public void Show() { - backAction = action; #region 鐣岄潰甯冨眬 this.BackgroundColor = CSS.CSS_Color.viewMiddle; Intelligence.Automation.LogicView.TopView topView = new Intelligence.Automation.LogicView.TopView(); this.AddChidren(topView.FLayoutView()); topView.clickBackBtn.MouseUpEventHandler += (e, sen) => { - //action(); RemoveFromParent(); }; topView.topNameBtn.TextID = StringId.setlogic; @@ -48,7 +45,8 @@ //banbenshengjiFL.frameLayout.Y = editNameFLayout.frameLayout.Bottom; //viewLayout.AddChidren(banbenshengjiFL.FLayoutView()); - var versions = Pir.currPir.versions.Find((c)=>c.module== "fw_version"); + + var versions = Pir.currPir.versions.Find((c) => c.module == "FW"); if (versions == null) { versions = new Entity.VersionInfo(); @@ -56,9 +54,15 @@ ///鐗堟湰鍙�:v1.3.5 FrameLayout50 banbenhaoFLayout = new FrameLayout50(); banbenhaoFLayout.btnNextIcon.Visible = false; - banbenhaoFLayout.btnText.Text = Language.StringByID(StringId.banbenhao) + ":"+ versions.version; + banbenhaoFLayout.btnText.Text = Language.StringByID(StringId.banbenhao) + ":";// + versions.version; + banbenhaoFLayout.btnEditText.Text = versions.version; + banbenhaoFLayout.btnEditText.TextAlignment = TextAlignment.CenterRight; + banbenhaoFLayout.btnEditText.X = Application.GetRealWidth(357 - 200 - 16); + banbenhaoFLayout.btnEditText.Width = Application.GetRealWidth(200); + banbenhaoFLayout.btnText.Width = Application.GetRealWidth(280); banbenhaoFLayout.frameLayout.Y = editNameFLayout.frameLayout.Bottom;// banbenshengjiFL.frameLayout.Bottom; viewLayout.AddChidren(banbenhaoFLayout.FLayoutView()); + //鍒犻櫎 FrameLayout frameLayout = new FrameLayout { @@ -84,10 +88,10 @@ editNameFLayout.btnClick.MouseUpEventHandler += (sender, e) => { List<string> list = new List<string>(); - Method method = new Method(); + PirMethod method = new PirMethod(); method.EditControlName(StringId.editName, list, Pir.currPir.name, (name, dialog) => { - Method.ThreadSend(new Control { deviceId = Pir.currPir.deviceId, name = name }, (responsePackNew) => + PirMethod.ThreadSend(new Control { deviceId = Pir.currPir.deviceId, name = name }, (responsePackNew) => { dialog.Close(); editNameFLayout.btnEditText.Text = name; @@ -105,7 +109,7 @@ tipPopView.TipBox(StringId.tip, text, (dialog) => { - Method.ThreadSend(new Control { deviceId = Pir.currPir.deviceId }, (responsePackNew) => + PirMethod.ThreadSend(new Control { deviceId = Pir.currPir.deviceId }, (responsePackNew) => { var pir = Pir.pirDeviceList.Find((c) => c.deviceId == Pir.currPir.deviceId); if (pir != null) @@ -113,16 +117,8 @@ Pir.pirDeviceList.Remove(Pir.currPir); } dialog.Close(); - action(); this.RemoveFromParent(); - for (int i = MainPage.BasePageView.ChildrenCount - 1; 0 <= i; i--) - { - var view = MainPage.BasePageView.GetChildren(i); - if (view.GetType() == typeof(PirMain)) - { - view.RemoveFromParent(); - } - } + PirMethod.RemoveView("PirMain"); }, "鍒犻櫎", "dialog", null, dialog); }, () => @@ -141,8 +137,10 @@ /// </summary> public override void RemoveFromParent() { - backAction(); + //鍒锋柊PirMain鐣岄潰 + PirMethod.RefreshView("PirMain"); base.RemoveFromParent(); + } } } -- Gitblit v1.8.0