From 0d9f64668fd7350d6a21fd157e32009a96d98134 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期三, 16 十二月 2020 13:09:08 +0800 Subject: [PATCH] 新云端代码Ver1.2 --- ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs | 45 ++++++++++++++++++++++----------------------- 1 files changed, 22 insertions(+), 23 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs index 083fb29..1973ec7 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayInfoEditorForm.cs +++ b/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); } -- Gitblit v1.8.0