JLChen
2021-11-30 efad979b6fae76fb37a4de7e94e6bac0a85cb72c
HDL_ON/UI/UI2/4-PersonalCenter/PirDevice/SetPir.cs
@@ -45,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();
@@ -53,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
            {
@@ -81,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;
@@ -102,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)
@@ -111,7 +118,7 @@
                        }
                        dialog.Close();
                        this.RemoveFromParent();
                        Method.RemoveView("PirMain");
                        PirMethod.RemoveView("PirMain");
                    }, "删除", "dialog", null, dialog);
                }, () =>
@@ -131,7 +138,7 @@
        public override void RemoveFromParent()
        {
            //刷新PirMain界面
            Method.RefreshView("PirMain");
            PirMethod.RefreshView("PirMain");
            base.RemoveFromParent();
          
        }