From df8d4ab0ef17a7fab5dea9c47bbd9f4d4a2a40b0 Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期一, 15 三月 2021 14:55:49 +0800
Subject: [PATCH] 合并前上传一个版本

---
 HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection3Page.cs |   48 +++++++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 45 insertions(+), 3 deletions(-)

diff --git a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection3Page.cs b/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection3Page.cs
index 5fd6f0e..3d08125 100644
--- a/HDL_ON/UI/UI2/4-PersonalCenter/AddDevice/AddMiniRemoteControlDirection3Page.cs
+++ b/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>
@@ -65,7 +86,7 @@
             rowWifi.Y = yy + 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));

--
Gitblit v1.8.0