From dc0309e64f02227d8e1468b7326c07955f804612 Mon Sep 17 00:00:00 2001 From: chenqiyang <1406175257@qq.com> Date: 星期三, 22 六月 2022 11:22:18 +0800 Subject: [PATCH] 修改引用路径 --- ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewaySelectNetworkForm.cs | 119 ++++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 104 insertions(+), 15 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewaySelectNetworkForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewaySelectNetworkForm.cs index c959bbf..96be439 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewaySelectNetworkForm.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewaySelectNetworkForm.cs @@ -39,12 +39,12 @@ frameBack.BackgroundColor = UserCenterColor.Current.White; bodyFrameLayout.AddChidren(frameBack); - //璇烽�夋嫨缃戠粶 + //璇疯緭鍏IFI鍜屽瘑鐮� var btnTitle = new NormalViewControl(600, 64, true); btnTitle.X = ControlCommonResourse.XXLeft; - btnTitle.Y = Application.GetRealHeight(30); + btnTitle.Y = Application.GetRealHeight(32); btnTitle.TextSize = 15; - btnTitle.TextID = R.MyInternationalizationString.uPleaseSelectNetwork; + btnTitle.TextID = R.MyInternationalizationString.uPleaseInputWifiAndPassword; frameBack.AddChidren(btnTitle); //WIFI @@ -54,31 +54,66 @@ rowWifi.InitControl(); rowWifi.AddBottomLine(); rowWifi.txtInput.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInputHomeWifiAccount); + //涓嬫媺鍥炬爣鏄亸鍙崇殑 + rowWifi.RightOffset = -Application.GetRealWidth(18); + var btnDrop = rowWifi.AddMostRightEmptyIcon(58, 58); + btnDrop.UnSelectedImagePath = "Item/Down.png"; + rowWifi.ChangedChidrenBindMode(btnDrop, ChidrenBindMode.NotBind); + btnDrop.ButtonClickEvent += (sender, e) => + { + //鏄剧ずWifi涓嬫媺鍒楄〃 + //this.ShowWifiListView(rowWifi); + }; //瀵嗙爜 - var btnPsw = new FrameCaptionInputControl(Language.StringByID(R.MyInternationalizationString.uPassword), string.Empty); - btnPsw.Y = rowWifi.Bottom + Application.GetRealHeight(9); - frameBack.AddChidren(btnPsw); - btnPsw.InitControl(); - btnPsw.txtInput.SecureTextEntry = true; - btnPsw.txtInput.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInputWifiPassword); - var btnView = btnPsw.AddMostRightEmptyIcon(81, 81); + var rowPsw = new FrameCaptionInputControl(Language.StringByID(R.MyInternationalizationString.uPassword), string.Empty); + rowPsw.Y = rowWifi.Bottom + Application.GetRealHeight(9); + frameBack.AddChidren(rowPsw); + rowPsw.InitControl(); + rowPsw.txtInput.SecureTextEntry = true; + rowPsw.txtInput.PlaceholderText = Language.StringByID(R.MyInternationalizationString.uPleaseInputWifiPassword); + var btnView = rowPsw.AddMostRightEmptyIcon(81, 81); btnView.UnSelectedImagePath = "Item/HidenPWD.png"; btnView.SelectedImagePath = "Item/UnHidenPWD.png"; - btnPsw.ChangedChidrenBindMode(btnView, ChidrenBindMode.NotBind); + rowPsw.ChangedChidrenBindMode(btnView, ChidrenBindMode.NotBind); btnView.ButtonClickEvent += (sender, e) => { btnView.IsSelected = !btnView.IsSelected; - btnPsw.txtInput.SecureTextEntry = !btnPsw.txtInput.SecureTextEntry; + rowPsw.txtInput.SecureTextEntry = !rowPsw.txtInput.SecureTextEntry; }; - var btnMsg = new NormalViewControl(btnPsw.txtInput.Width, false); + var btnMsg = new NormalViewControl(rowPsw.txtInput.Width, false); btnMsg.X = ControlCommonResourse.XXLeft; btnMsg.Y = frameBack.Bottom + Application.GetRealHeight(23); btnMsg.TextSize = 12; btnMsg.Height = Application.GetRealHeight(40); btnMsg.TextColor = UserCenterColor.Current.ErrorColor; bodyFrameLayout.AddChidren(btnMsg); + + //鍙戦�佸眬鍩熺綉璐﹀彿銆佸瘑鐮� + var btnMsgTitle = new NormalViewControl(500, 60, true); + btnMsgTitle.TextID = R.MyInternationalizationString.uSendLanAccountAndPassword; + btnMsgTitle.X = ControlCommonResourse.XXLeft; + btnMsgTitle.Y = frameBack.Bottom + Application.GetRealHeight(369); + btnMsgTitle.IsBold = true; + bodyFrameLayout.AddChidren(btnMsgTitle); + + //1.濉啓璺敱鍣ㄧ殑璐﹀彿鍜屽瘑鐮� + //2.鐐瑰嚮涓嬩竴姝ワ紝灏嗚矾鐢卞櫒璐﹀彿鍜屽瘑鐮佸彂閫佽嚦缃戝叧 + //3.缃戝叧鎺ユ敹鎴愬姛锛岀櫧鍏夐棯鐑� + string[] ArryMsg = Language.StringByID(R.MyInternationalizationString.uAddMiniGatewayMsg2).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); + int yy = btnMsgTitle.Bottom + Application.GetRealHeight(23); + foreach (var msg in ArryMsg) + { + var btnTip = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false); + btnTip.Text = msg; + btnTip.Y = yy; + btnTip.X = btnMsgTitle.X; + btnTip.TextColor = UserCenterColor.Current.TextGrayColor1; + btnTip.TextSize = 12; + bodyFrameLayout.AddChidren(btnTip); + yy = btnTip.Bottom; + } //鏌ョ湅甯姪 var btnHelp = this.AddHelpControl(); @@ -102,14 +137,14 @@ btnMsg.Text = Language.StringByID(R.MyInternationalizationString.uPleaseInputHomeWifiAccount); return; } - if (btnPsw.Text == string.Empty) + if (rowPsw.Text == string.Empty) { //璇疯緭鍏ifi瀵嗙爜 btnMsg.Text = Language.StringByID(R.MyInternationalizationString.uPleaseInputWifiPassword); return; } //鍙戦�佸瘑鐮� - var result = HdlWifiLogic.Current.SendApHomeWifiPassword(rowWifi.Text, btnPsw.Text); + var result = HdlWifiLogic.Current.SendApHomeWifiPassword(rowWifi.Text, rowPsw.Text); if (result == false) { //瀵嗙爜鍙戦�佸け璐� @@ -125,6 +160,60 @@ #endregion + #region 鈻� 鏄剧ずWifi涓嬫媺鍒楄〃___________________ + + /// <summary> + /// 鏄剧ずWifi涓嬫媺鍒楄〃 + /// </summary> + /// <param name="rowWifi"></param> + private void ShowWifiListView(FrameCaptionInputControl rowWifi) + { + //涓�涓彲浠ラ伄浣廈ody鐨勪笢瑗� + var frameTran = new NormalFrameLayout(); + frameTran.Height = bodyFrameLayout.Height; + frameTran.BackgroundColor = UserCenterColor.Current.DialogBackColor; + bodyFrameLayout.AddChidren(frameTran); + frameTran.ButtonClickEvent += (sender, e) => + { + frameTran.RemoveFromParent(); + }; + //鐧借壊鑳屾櫙妗� + var frameList = new NormalFrameLayout(); + frameList.Y = rowWifi.Bottom; + frameList.Gravity = Gravity.CenterHorizontal; + frameList.Width = frameTran.Width - ControlCommonResourse.XXLeft * 2; + frameList.Height = this.GetPictrueRealSize(1200); + frameList.Radius = (uint)Application.GetRealWidth(17); + frameList.BackgroundColor = UserCenterColor.Current.White; + frameTran.AddChidren(frameList); + //鍒楄〃鎺т欢 + var listView = new VerticalListControl(); + listView.Height = frameList.Height; + frameList.AddChidren(listView); + + for (int i = 1; i <= 10; i++) + { + var frameRow = new FrameRowControl(); + listView.AddChidren(frameRow); + //wifi鍚嶅瓧 + var btnWifi = new NormalViewControl(frameRow.Width, frameRow.Height - ControlCommonResourse.BottomLineHeight, false); + btnWifi.X = ControlCommonResourse.XXLeft; + btnWifi.Text = "Application Software" + i; + frameRow.AddChidren(btnWifi, ChidrenBindMode.BindEvent); + //搴曠嚎 + var btnLine = new NormalViewControl(frameRow.Width, ControlCommonResourse.BottomLineHeight, false); + btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine; + btnLine.Y = btnWifi.Bottom; + frameRow.AddChidren(btnLine, ChidrenBindMode.BindEvent); + frameRow.ButtonClickEvent += (sender, e) => + { + rowWifi.Text = btnWifi.Text; + frameTran.RemoveFromParent(); + }; + } + } + #endregion + #region 鈻� 鐣岄潰鍏抽棴___________________________ /// <summary> -- Gitblit v1.8.0