From c1de48884fa145a16a0f8bcee93274dcfaa0ff82 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期四, 07 五月 2020 10:40:28 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev-tzy' into dev-2020xm --- ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpDirectionForm.cs | 98 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 98 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpDirectionForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpDirectionForm.cs new file mode 100755 index 0000000..90d4b15 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/WirelessUdpDirectionForm.cs @@ -0,0 +1,98 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Shared.Phone.UserCenter.GatewayAdd +{ + /// <summary> + /// 鏃犵嚎缃戝叧UPD妯″紡鐨勮鏄庢寚绀虹晫闈� + /// </summary> + public class WirelessUdpDirectionForm : 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 framePic = new FrameLayout(); + framePic.Width = this.GetPictrueRealSize(852); + framePic.Height = this.GetPictrueRealSize(478); + framePic.Gravity = Gravity.CenterHorizontal; + framePic.Y = Application.GetRealHeight(251); + framePic.BackgroundImagePath = "Gateway/WirelessGatewaySearching.png"; + bodyFrameLayout.AddChidren(framePic); + + //璇峰厛鍘昏缃墜鏈鸿繛鎺ュ埌璺敱鍣▄0}鐒跺悗闀挎寜缃戝叧HID/WCFG鎸夐敭澶ф20绉抺0}鐩村埌绯荤粺鎸囩ず鐏揩闂獅0}缃戝叧杩涘叆UDP妯″紡WIFI閰嶇綉 + string[] strMsg = Language.StringByID(R.MyInternationalizationString.uAddUdpWirelessGatewayMsg2).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); + int YY = framePic.Bottom + Application.GetRealHeight(128); + for (int i = 0; i < strMsg.Length; i++) + { + var btnMsg1 = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(60), false); + btnMsg1.Y = YY; + btnMsg1.Text = strMsg[i]; + btnMsg1.TextAlignment = TextAlignment.Center; + btnMsg1.TextColor = UserCenterColor.Current.TextGrayColor3; + bodyFrameLayout.AddChidren(btnMsg1); + YY = btnMsg1.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(); + }; + 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("Udp"); + }; + + //涓嬩竴姝� + var btnNext = new BottomClickButton(); + btnNext.TextID = R.MyInternationalizationString.uNextway; + bodyFrameLayout.AddChidren(btnNext); + btnNext.ButtonClickEvent += (sender, e) => + { + var form = new WirelessUdpSelectNetworkForm(); + this.AddFromAndRemoveNowForm(form); + }; + } + + #endregion + } +} -- Gitblit v1.8.0