File was renamed from ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayReplaceListForm.cs |
| | |
| | | using System.Text; |
| | | using ZigBee.Device; |
| | | |
| | | namespace Shared.Phone.UserCenter.GatewayManage |
| | | namespace Shared.Phone.UserCenter.Gateway |
| | | { |
| | | /// <summary> |
| | | /// 网关替换界面 |
| | |
| | | //底线 |
| | | frameRow.AddBottomLine(); |
| | | } |
| | | frameRow.ButtonClickEvent += (sender, e) => |
| | | btnSelect.ButtonClickEvent += (sender, e) => |
| | | { |
| | | if (this.btnSelectIcon != null) { this.btnSelectIcon.Visible = false; } |
| | | if (this.btnSelectIcon != null) { this.btnSelectIcon.IsSelected = false; } |
| | | |
| | | btnSelect.Visible = true; |
| | | btnSelect.IsSelected = true; |
| | | this.btnSelectIcon = btnSelect; |
| | | this.btnSelectIcon.MainKey = localWay.GwId; |
| | | this.btnConfirm.CanClick = true; |
| | | }; |
| | | } |
| | |
| | | /// </summary> |
| | | private void DoReplaceGateway() |
| | | { |
| | | if (this.btnSelectIcon == null) { return; } |
| | | |
| | | ZbGateway realGateway = null; |
| | | if (HdlGatewayLogic.Current.GetRealGateway(ref realGateway, this.nowZbGateway.GwId) == false) |
| | | { |
| | | //错误:网关对象丢失 |
| | | HdlMessageLogic.Current.ShowMassage(ShowMsgType.Tip, Language.StringByID(R.MyInternationalizationString.uErrorGatewayLostMsg)); |
| | | return; |
| | | } |
| | | |
| | | var targetGw = HdlGatewayLogic.Current.GetLocalGateway(this.btnSelectIcon.MainKey); |
| | | //确认替换掉网关:{0}? |
| | | string msg = Language.StringByID(R.MyInternationalizationString.uReplaceGatewayConfirmMsg).Replace("{0}", HdlGatewayLogic.Current.GetGatewayName(targetGw)); |
| | | this.ShowMassage(ShowMsgType.Confirm, msg, () => |
| | | { |
| | | var form = new GatewayReplaceBackUpListForm(); |
| | | form.AddForm(realGateway, this.btnSelectIcon.MainKey); |
| | | }); |
| | | } |
| | | |
| | | #endregion |