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