黄学彪
2020-12-16 0d9f64668fd7350d6a21fd157e32009a96d98134
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayReplaceForm.cs
File was renamed from ZigbeeApp/Shared/Phone/UserCenter/Gateway/Manage/GatewayReplaceListForm.cs
@@ -3,7 +3,7 @@
using System.Text;
using ZigBee.Device;
namespace Shared.Phone.UserCenter.GatewayManage
namespace Shared.Phone.UserCenter.Gateway
{
    /// <summary>
    /// 网关替换界面
@@ -158,13 +158,12 @@
                //底线
                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;
            };
        }
@@ -178,24 +177,6 @@
        /// </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