黄学彪
2020-12-16 0d9f64668fd7350d6a21fd157e32009a96d98134
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs
@@ -95,7 +95,7 @@
            //设备类型 (固定智能网关)
            caption = Language.StringByID(R.MyInternationalizationString.uDeviceType);
            var infoContent = Common.LocalDevice.Current.GetDeviceModelIdNameInfo("1");
            var infoContent = HdlDeviceCommonLogic.Current.GetDeviceModelIdNameInfo("1");
            var btnType = new FrameCaptionViewControl(caption, infoContent != null ? infoContent.A类型名字 : string.Empty, listview.rowSpace / 2);
            btnType.UseClickStatu = false;
            listview.AddChidren(btnType);
@@ -130,14 +130,15 @@
            btnBeloneArea.AddBottomLine();
            //mini网关有个功能设置
            if (HdlGatewayLogic.Current.IsMiniGateway(this.zbGateway) == true)
            var linuxImageType = this.zbGateway.LinuxImageType;
            if (linuxImageType == 11)
            {
                var listDevice = Common.LocalDevice.Current.GetDeviceByGatewayID(this.zbGateway.GwId);
                var listDevice = HdlDeviceCommonLogic.Current.GetDeviceByGatewayID(this.zbGateway.GwId);
                CommonDevice miniDevice = null;
                foreach (var device in listDevice)
                {
                    //获取这个网关下的小夜灯设备
                    if (Common.LocalDevice.Current.IsMiniLight(device) == true)
                    if (HdlDeviceCommonLogic.Current.IsMiniLight(device) == true)
                    {
                        miniDevice = device;
                        break;
@@ -294,7 +295,7 @@
        private void ShowTopRightMenu()
        {
            //搜索网关的时候,不能删除,不给他切换,只有定位功能
            bool isSearchGw = UserCenterResourse.DicActionForm.ContainsKey("NewGateWayMenuSelectForm");
            bool isSearchGw = HdlFormLogic.Current.IsFormOpen("NewGateWayMenuSelectForm");
            int menuCount = isSearchGw == true ? 1 : 3;
            bool canAddReplaceMenu = false;
@@ -313,7 +314,7 @@
                && Common.Config.Instance.Home.IsShowTemplate == false
                && Common.Config.Instance.Home.IsVirtually == false)
            {
                menuCount++;
                //menuCount++;
            }
            var frame = new TopRightMenuControl(menuCount, 1);
            //定位
@@ -330,7 +331,7 @@
                //切换
                MenuName = Language.StringByID(R.MyInternationalizationString.uSwitch1);
                string strWayId = this.zbGateway.GwId;
                if (strWayId == GatewayResourse.AppOldSelectGatewayId)
                if (strWayId == HdlGatewayResourse.AppOldSelectGatewayId)
                {
                    MenuName = Language.StringByID(R.MyInternationalizationString.uRefresh);
                }
@@ -339,7 +340,7 @@
                    string nameValue = HdlGatewayLogic.Current.GetGatewayName(zbGateway);
                    //是否切换到{0}网关?
                    string msg = string.Format(Language.StringByID(R.MyInternationalizationString.uConfirmWantToSwitchTheGateway), "[" + nameValue + "]");
                    if (strWayId == GatewayResourse.AppOldSelectGatewayId)
                    if (strWayId == HdlGatewayResourse.AppOldSelectGatewayId)
                    {
                        //是否重新刷新{0}网关?
                        msg = string.Format(Language.StringByID(R.MyInternationalizationString.uConfirmWantToRefreshTheGateway), "[" + nameValue + "]");
@@ -369,16 +370,14 @@
                    });
                });
            }
            if (canAddReplaceMenu == true)
            {
                //替换
                MenuName = Language.StringByID(R.MyInternationalizationString.uReplace);
                frame.AddRowMenu(MenuName, null, "Item/ReplaceIconSelected.png", () =>
                {
                    var form = new GatewayReplaceForm();
                    form.AddForm(this.zbGateway);
                });
            }
            //if (canAddReplaceMenu == true)
            //{
            //    //替换
            //    MenuName = Language.StringByID(R.MyInternationalizationString.uReplace);
            //    frame.AddRowMenu(MenuName, null, "Item/ReplaceIconSelected.png", () =>
            //    {
            //    });
            //}
        }
        #endregion
@@ -455,13 +454,13 @@
                this.CloseForm();
                //关闭指定界面(网关搜索)
                this.CloseFormByFormName("GatewaySearchListForm");
                this.CloseFormByFormName("NewGateWayMenuSelectForm");
                HdlFormLogic.Current.CloseFormByFormName("GatewaySearchListForm");
                HdlFormLogic.Current.CloseFormByFormName("NewGateWayMenuSelectForm");
                //关闭指定界面(网关编辑)
                this.CloseFormByFormName("GatewayListForm");
                HdlFormLogic.Current.CloseFormByFormName("GatewayListForm");
                if (UserCenterResourse.DicActionForm.ContainsKey("DeviceListMainForm") == false)
                if (HdlFormLogic.Current.IsFormOpen("DeviceListMainForm") == false)
                {
                    //刷新主画面
                    var form = new Device.DeviceListMainForm();
@@ -500,7 +499,7 @@
                    return;
                }
                if (strWayId == GatewayResourse.AppOldSelectGatewayId)
                if (strWayId == HdlGatewayResourse.AppOldSelectGatewayId)
                {
                    HdlGatewayLogic.Current.SaveGatewayIdToLocation(string.Empty);
                }