From 9a4b76398009cf76c508d61f7e48fb6f5cb7ac2d Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期二, 21 七月 2020 09:46:53 +0800 Subject: [PATCH] 请合并最新多功能面板代码 --- ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection2Form.cs | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 118 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection2Form.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection2Form.cs new file mode 100755 index 0000000..840b0f4 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessApDirection2Form.cs @@ -0,0 +1,118 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Shared.Phone.UserCenter.GatewayAdd +{ + /// <summary> + /// 鏃犵嚎缃戝叧AP妯″紡鐨勮鏄庢寚绀虹晫闈�2 + /// </summary> + public class WirelessApDirection2Form : EditorCommonForm + { + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm() + { + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddWirelessGateway)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //涓嬩竴姝� + var btnNext = new BottomClickButton(); + btnNext.TextID = R.MyInternationalizationString.uNextway; + bodyFrameLayout.AddChidren(btnNext); + btnNext.ButtonClickEvent += (sender, e) => + { + //濡傛灉涓嶆槸鐑偣妯″紡 + if (HdlWifiLogic.Current.IsGatewayHotspot == false) + { + //閫夋嫨hdlZigbeeGW-xxxx缃戠粶 + this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseSelectGatewayXXNet)); + return; + } + var errorMsg = HdlWifiLogic.Current.StartApTcpConnection(); + if (errorMsg != null) + { + //鎷ユ湁閿欒 + this.ShowMassage(ShowMsgType.Error, errorMsg); + return; + } + var form = new WirelessApSelectNetworkForm(); + this.AddFromAndRemoveNowForm(form); + }; + //濡傛灉涓嶆槸缃戝叧鐑偣 + if (HdlWifiLogic.Current.IsGatewayHotspot == false) + { + btnNext.Visible = false; + } + + //鍥剧墖 + var framePic = new FrameLayout(); + framePic.Width = this.GetPictrueRealSize(852); + framePic.Height = this.GetPictrueRealSize(478); + framePic.Gravity = Gravity.CenterHorizontal; + framePic.Y = Application.GetRealHeight(285); + framePic.BackgroundImagePath = "Gateway/WirelessGatewaySearching.png"; + bodyFrameLayout.AddChidren(framePic); + + //鎵嬫満鍘昏缃繛鎺ョ綉鍏崇儹鐐箋0}鍗砲dlZigbeeGW-xxxx,瀵嗙爜hdl123456{0}鍙煡鐪嬬綉鍏宠儗闈㈡爣绛炬煡鐪嬬儹鐐瑰悕瀛楀拰瀵嗙爜 + string[] ArryMsg = Language.StringByID(R.MyInternationalizationString.uAddApWirelessGatewayMsg2).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); + int yy = framePic.Bottom + Application.GetRealHeight(213); + foreach (var msg in ArryMsg) + { + var btnMsg = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false); + btnMsg.Text = msg; + btnMsg.Y = yy; + btnMsg.TextAlignment = TextAlignment.Center; + btnMsg.TextColor = UserCenterColor.Current.TextGrayColor3; + bodyFrameLayout.AddChidren(btnMsg); + yy = btnMsg.Bottom; + } + + //鍘昏缃� + var btnSettion = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false); + btnSettion.Y = yy + Application.GetRealHeight(12); + btnSettion.TextSize = 12; + btnSettion.TextAlignment = TextAlignment.Center; + btnSettion.TextColor = 0xff0075ff; + btnSettion.Text = Language.StringByID(R.MyInternationalizationString.uGotoSettion); + btnSettion.ButtonClickEvent += (sender, e) => + { + HdlWifiLogic.Current.OpenAppWifiSettion(); + btnNext.Visible = true; + }; + bodyFrameLayout.AddChidren(btnSettion); + //搴曠嚎 + int lineWidth = btnSettion.GetRealWidthByText(); + var btnLine1 = new NormalViewControl(lineWidth, ControlCommonResourse.BottomLineHeight, false); + btnLine1.BackgroundColor = 0xff0075ff; + btnLine1.Gravity = Gravity.CenterHorizontal; + btnLine1.Y = btnSettion.Bottom - Application.GetRealHeight(8); + bodyFrameLayout.AddChidren(btnLine1); + + //鏌ョ湅甯姪 + var btnHelp = this.AddHelpControl(); + btnHelp.ButtonClickEvent += (sender, e) => + { + var form = new AddGatewayHelpForm(); + form.AddForm("Ap"); + }; + } + + #endregion + } +} -- Gitblit v1.8.0