陈嘉乐
2021-03-23 8123d0298c0fed448bddc956059126a4875782c2
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs
@@ -12,16 +12,17 @@
        {
            Tag = "PirMain";
        }
        Action backAction;
        public void Show(Action action)
        {
            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();
                //action();
                RemoveFromParent();
            };
            topView.topNameBtn.TextID = StringId.setlogic;
@@ -46,10 +47,16 @@
            banbenshengjiFL.btnText.Text = Language.StringByID(StringId.banbenshengji);
            banbenshengjiFL.frameLayout.Y = editNameFLayout.frameLayout.Bottom;
            viewLayout.AddChidren(banbenshengjiFL.FLayoutView());
            var versions = Pir.currPir.versions.Find((c)=>c.module== "fw_version");
            if (versions == null)
            {
                versions = new Entity.VersionInfo();
            }
            ///版本号:v1.3.5
            FrameLayout50 banbenhaoFLayout = new FrameLayout50();
            banbenhaoFLayout.btnNextIcon.Visible = false;
            banbenhaoFLayout.btnText.Text = Language.StringByID(StringId.banbenhao) + ":v1.3.5";
            banbenhaoFLayout.btnText.Text = Language.StringByID(StringId.banbenhao) + ":"+ versions.version;
            banbenhaoFLayout.frameLayout.Y = banbenshengjiFL.frameLayout.Bottom;
            viewLayout.AddChidren(banbenhaoFLayout.FLayoutView());
            //删除
@@ -129,6 +136,13 @@
            #endregion
        }
        /// <summary>
        /// 移除界面
        /// </summary>
        public override void RemoveFromParent()
        {
            backAction();
            base.RemoveFromParent();
        }
    }
}