tzy
2021-05-25 65bcedda4d8e3ff6500dbf59a4e607d96e469375
HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection3Page.cs
@@ -21,6 +21,14 @@
        /// wifi的线程是否启动
        /// </summary>
        private bool WifiThreadAction = false;
        /// <summary>
        /// wifi名(别的界面传过来的)
        /// </summary>
        private string wifiName = string.Empty;
        /// <summary>
        /// wifi密码(别的界面传过来的)
        /// </summary>
        private string wifiPassword = string.Empty;
        #endregion
@@ -29,8 +37,13 @@
        /// <summary>
        /// 画面显示(底层会固定调用此方法,借以完成画面创建)
        /// </summary>
        public void ShowForm()
        /// <param name="i_wifiName">wifi名(别的界面传过来的)</param>
        /// <param name="i_wifiPassword">(别的界面传过来的)</param>
        public void ShowForm(string i_wifiName, string i_wifiPassword)
        {
            this.wifiName = i_wifiName;
            this.wifiPassword = i_wifiPassword;
            //设置头部信息
            base.SetTitleText(Language.StringByID(StringId.AddInfraredRemoteControl));
            //这个界面的背景需要白色
@@ -38,6 +51,14 @@
            //初始化中部信息
            this.InitMiddleFrame();
            //重写底层的返回按键
            this.BackButtonClickEvent += () =>
            {
                //关掉蓝牙
                HdlBluetoothLogic.Current.Dispone();
                this.CloseForm();
            };
        }
        /// <summary>
@@ -57,15 +78,15 @@
            //目前只支持2.4G WiFi网络
            //暂不支持带有中文字符的WiFi名称
            var strMsg = Language.StringByID(StringId.AddInfraredRemoteControlMsg4);
            int yy = this.AddListMsgControls(bodyFrameLayout, strMsg, CSS.CSS_FontSize.TextFontSize, CSS.CSS_Color.TextualColor,
            var listContr = this.AddListMsgControls(bodyFrameLayout, strMsg, CSS.CSS_FontSize.TextFontSize, CSS.CSS_Color.TextualColor,
                Application.GetRealHeight(20), btnWifi.Bottom + Application.GetRealHeight(16), TextAlignment.CenterLeft);
            //wifi行
            var rowWifi = new RowLayoutControl();
            rowWifi.Y = yy + Application.GetRealHeight(32);
            rowWifi.Y = listContr[listContr.Count - 1].Bottom + Application.GetRealHeight(32);
            bodyFrameLayout.AddChidren(rowWifi);
            //wifi名字
            var txtWifi = rowWifi.frameTable.AddLeftInput("", 200);
            var txtWifi = rowWifi.frameTable.AddLeftInput(wifiName, 200);
            txtWifi.TextColor = CSS.CSS_Color.FirstLevelTitleColor;
            //底线
            rowWifi.frameTable.AddBottomLine();
@@ -79,13 +100,18 @@
                //刷新wifi名字
                this.RefreshWifiName(txtWifi);
            };
            if (this.wifiName != string.Empty)
            {
                //这个时候是重试模式,不允许点击
                btnRight.CanClick = false;
            }
            //密码行
            var rowPsw = new RowLayoutControl();
            rowPsw.Y = rowWifi.Bottom;
            bodyFrameLayout.AddChidren(rowPsw);
            //密码
            var txtPsw = rowPsw.frameTable.AddLeftInput("551775569", 200);
            var txtPsw = rowPsw.frameTable.AddLeftInput(wifiPassword, 200);
            txtPsw.TextColor = CSS.CSS_Color.FirstLevelTitleColor;
            txtPsw.PlaceholderText = Language.StringByID(StringId.Password);
            txtPsw.SecureTextEntry = true;
@@ -100,6 +126,22 @@
                btnView.IsSelected = !btnView.IsSelected;
                txtPsw.SecureTextEntry = !btnView.IsSelected;
            };
            if (this.wifiName != string.Empty)
            {
                //这个时候是重试模式,不需要点击
                HdlThreadLogic.Current.RunThread(() =>
                {
                    System.Threading.Thread.Sleep(1000);
                    HdlThreadLogic.Current.RunMain(() =>
                    {
                        //进入下一个界面
                        this.CloseForm();
                        var form = new AddMiniRemoteControlDirection4Page();
                        form.AddForm(wifiName, wifiPassword);
                    });
                });
                return;
            }
            //下一步
            var btnNext = this.AddBottomClickButton(Language.StringByID(StringId.Next));