黄学彪
2020-09-01 dee21bf452a8979d0515d13e534fbb69ed9715dd
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs
@@ -74,6 +74,9 @@
            btnNote.InitControl();
            //划线
            btnNote.AddBottomLine();
            //如果是展示模板的话,不能编辑
            if (Common.Config.Instance.Home.IsShowTemplate == false)
            {
            btnNote.txtInput.FinishInputEvent += () =>
            {
                string oldName = HdlGatewayLogic.Current.GetGatewayName(zbGateway);
@@ -87,6 +90,7 @@
                    this.SetGatewayName(btnNote.Text, false);
                }
            };
            }
            //设备类型 (固定智能网关)
            caption = Language.StringByID(R.MyInternationalizationString.uDeviceType);
@@ -109,6 +113,11 @@
                //变更网关房间
                HdlGatewayLogic.Current.ChangedGatewayRoom(this.zbGateway.GwId, roomKeys);
            };
            //如果是展示模板的话,不能编辑
            if (Common.Config.Instance.Home.IsShowTemplate == true)
            {
                rowBeloneArea.CanClick = false;
            }
            //所属住宅
            caption = Language.StringByID(R.MyInternationalizationString.uBelongResidence);
@@ -145,11 +154,15 @@
                    rowFunction.frameTable.AddRightArrow();
                    //底线
                    rowFunction.frameTable.AddBottomLine();
                    //如果是展示模板的话,不能编辑
                    if (Common.Config.Instance.Home.IsShowTemplate == false)
                    {
                    rowFunction.frameTable.ButtonClickEvent += (sender, e) =>
                    {
                        var form = new DeviceLight.MiniNightLightFunctionSettionForm();
                        form.AddForm(miniDevice);
                    };
                    }
                }
            }
@@ -161,11 +174,15 @@
            rowData.frameTable.AddRightArrow();
            //底线
            rowData.frameTable.AddBottomLine();
            //如果是展示模板的话,不能编辑
            if (Common.Config.Instance.Home.IsShowTemplate == false)
            {
            rowData.frameTable.ButtonClickEvent += (sender, e) =>
            {
                var form = new GatewayUploadAndDownLoadForm();
                form.AddForm(this.zbGateway.GwId);
            };
            }
            //通用信息
            var btnGeneral = new FrameRowControl(listview.rowSpace / 2);
@@ -211,6 +228,11 @@
            var btnFinish = new BottomClickButton();
            btnFinish.TextID = R.MyInternationalizationString.uSave;
            bodyFrameLayout.AddChidren(btnFinish);
            //如果是展示模板的话,不能编辑
            if (Common.Config.Instance.Home.IsShowTemplate == true)
            {
                btnFinish.CanClick = false;
            }
            btnFinish.ButtonClickEvent += (sender, e) =>
            {
                string oldName = HdlGatewayLogic.Current.GetGatewayName(zbGateway);
@@ -230,11 +252,15 @@
                }
            };
            //如果是展示模板的话,不需要检测
            if (Common.Config.Instance.Home.IsShowTemplate == false)
            {
            HdlThreadLogic.Current.RunThread(() =>
            {
                //检测新版本
                this.CheckNewVersion(btnNewVersion);
            });
            }
        }
        #endregion
@@ -246,6 +272,11 @@
        /// </summary>
        private void InitTopRightMenu()
        {
            //如果是展示模板的话,不能编辑
            if (Common.Config.Instance.Home.IsShowTemplate == true)
            {
                return;
            }
            var btnIcon = new MostRightIconControl(69, 69);
            btnIcon.UnSelectedImagePath = "Item/More.png";
            topFrameLayout.AddChidren(btnIcon);