From d6fb0646531172f23648441c224cdcccd721b894 Mon Sep 17 00:00:00 2001 From: xm <1271024303@qq.com> Date: 星期一, 14 十二月 2020 09:59:01 +0800 Subject: [PATCH] 请合并代码,完成晾衣架最终功能。 --- ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection3Form.cs | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 112 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection3Form.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection3Form.cs new file mode 100755 index 0000000..5acc2e1 --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/MiniGatewayDirection3Form.cs @@ -0,0 +1,112 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Text; + +namespace Shared.Phone.UserCenter.GatewayAdd +{ + /// <summary> + /// Mini缃戝叧鐨勮鏄庢寚绀虹晫闈�3 + /// </summary> + public class MiniGatewayDirection3Form : EditorCommonForm + { + #region 鈻� 鍙橀噺澹版槑___________________________ + + #endregion + + #region 鈻� 鍒濆鍖朹____________________________ + + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm() + { + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddMiniGateway)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + //鏌ョ湅甯姪 + var btnHelp = this.AddHelpControl(); + btnHelp.ButtonClickEvent += (sender, e) => + { + var form = new AddGatewayHelpForm(); + form.AddForm("Mini"); + }; + + //涓嬩竴姝� + var btnNext = new BottomClickButton(); + btnNext.TextID = R.MyInternationalizationString.uNextway; + bodyFrameLayout.AddChidren(btnNext); + btnNext.ButtonClickEvent += (sender, e) => + { + //濡傛灉杩樻槸鐑偣妯″紡 + if (HdlWifiLogic.Current.IsMiniGatewayHotspot == true) + { + //璇烽摼鎺ュ搴璚ifi + this.ShowMassage(ShowMsgType.Error, Language.StringByID(R.MyInternationalizationString.uPleaseLinkHomeWifi)); + return; + } + this.CloseForm(); + var form = new MiniGatewaySearchForm(); + form.AddForm(); + }; + btnNext.Visible = false; + + //鍥剧墖 + var framePic = new FrameLayout(); + framePic.Width = this.GetPictrueRealSize(857); + framePic.Height = this.GetPictrueRealSize(239); + framePic.Gravity = Gravity.CenterHorizontal; + framePic.Y = Application.GetRealHeight(366); + framePic.BackgroundImagePath = "Gateway/MiniGatewaySearching.png"; + bodyFrameLayout.AddChidren(framePic); + + //鎵嬫満鍘昏缃繛鎺ヨ矾鐢卞櫒 + string[] ArryMsg = Language.StringByID(R.MyInternationalizationString.uAddApWirelessGatewayMsg3).Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries); + int yy = framePic.Bottom + Application.GetRealHeight(369); + 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); + } + + #endregion + } +} -- Gitblit v1.8.0