陈嘉乐
2020-07-10 48ba446936b51fffafa7c3600c0dadc6ac0e8c20
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApSelectNetworkForm.cs
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Security.Cryptography;
using System.Text;
namespace Shared.Phone.UserCenter.GatewayAdd
@@ -45,7 +46,7 @@
            frameBack.AddChidren(btnTitle);
            //WIFI
            var rowWifi = new FrameCaptionInputControl("WiFi", string.Empty);
            var rowWifi = new FrameCaptionInputControl("WiFi", "");
            rowWifi.Y = Application.GetRealHeight(124);
            frameBack.AddChidren(rowWifi);
            rowWifi.InitControl();
@@ -74,15 +75,15 @@
            btnMsg.Y = frameBack.Bottom + Application.GetRealHeight(23);
            btnMsg.TextSize = 12;
            btnMsg.Height = Application.GetRealHeight(40);
            btnMsg.TextColor = UserCenterColor.Current.Red;
            btnMsg.TextColor = UserCenterColor.Current.ErrorColor;
            bodyFrameLayout.AddChidren(btnMsg);
            //查看帮助
            var btnHelp = this.AddHelpControl();
            btnHelp.ButtonClickEvent += (sender, e) =>
            {
                var form = new DeviceDirection.DeviceDirectionHelpForm();
                form.AddForm("WirelessUdp");
                var form = new AddGatewayHelpForm();
                form.AddForm("Ap");
            };
            //下一步
@@ -105,11 +106,35 @@
                    btnMsg.Text = Language.StringByID(R.MyInternationalizationString.uPleaseInputWifiPassword);
                    return;
                }
                //发送密码
                var result = HdlWifiLogic.Current.SendApHomeWifiPassword(rowWifi.Text, btnPsw.Text);
                if (result == false)
                {
                    //密码发送失败
                    this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uSendPasswordFail));
                    return;
                }
                var form = new WirelessApDirection3Form();
                this.AddFromAndRemoveNowForm(form);
            };
        }
        #endregion
        #region ■ 界面关闭___________________________
        /// <summary>
        /// 界面关闭
        /// </summary>
        public override void CloseFormBefore()
        {
            //关闭Tcp链接
            HdlWifiLogic.Current.CloseApTcpConnection();
            base.CloseFormBefore();
        }
        #endregion
    }
}