From a4924de3136289d10cabbf2f61a228387d44ded7 Mon Sep 17 00:00:00 2001 From: gxc <guoxuecheng@guoxuechengdeMacBook-Pro.local> Date: 星期四, 07 十一月 2019 13:48:36 +0800 Subject: [PATCH] Merge branch 'dev-tzy' into DEV_GXC --- ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWayMenuSelectForm.cs | 145 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 145 insertions(+), 0 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWayMenuSelectForm.cs b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWayMenuSelectForm.cs new file mode 100755 index 0000000..88dbcba --- /dev/null +++ b/ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWayMenuSelectForm.cs @@ -0,0 +1,145 @@ +锘縰sing System; +namespace Shared.Phone.UserCenter.GatewayAdd +{ + /// <summary> + /// 娣诲姞缃戝叧鐨勯�夋嫨鐢婚潰 + /// </summary> + public class NewGateWayMenuSelectForm : EditorCommonForm + { + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm() + { + //璁剧疆澶撮儴淇℃伅 + base.SetTitleText(Language.StringByID(R.MyInternationalizationString.uAddGateway)); + + //鍒濆鍖栦腑閮ㄤ俊鎭� + this.InitMiddleFrame(); + } + + /// <summary> + /// 鍒濆鍖栦腑閮ㄤ俊鎭� + /// </summary> + private void InitMiddleFrame() + { + //娓呯┖bodyFrame + this.ClearBodyFrame(); + + var listView = new VerticalListControl(29); + listView.Height = Application.GetRealHeight(340); + listView.BackgroundColor = UserCenterColor.Current.White; + bodyFrameLayout.AddChidren(listView); + + //鏈夌嚎缃戝叧 + var row1 = new FrameRowControl(listView.rowSpace / 2); + listView.AddChidren(row1); + var btnIcon1 = row1.AddLeftIcon(81); + btnIcon1.UnSelectedImagePath = "Gateway/WiredGateway.png"; + var btntext1 = row1.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uWiredGateway), 500); + btntext1.TextSize = 15; + row1.AddRightArrow(); + row1.AddBottomLine(); + row1.ButtonClickEvent += (sender, e) => + { + var form = new WiredGatewayDirectionForm(); + form.AddForm(); + }; + + //鏃犵嚎缃戝叧 + var row2 = new FrameRowControl(listView.rowSpace / 2); + listView.AddChidren(row2); + var btnIcon2 = row2.AddLeftIcon(81); + btnIcon2.UnSelectedImagePath = "Gateway/WirelessGateway.png"; + var btntext2 = row2.AddLeftCaption(Language.StringByID(R.MyInternationalizationString.uWirelessGateway), 500); + btntext2.TextSize = 15; + row2.AddRightArrow(); + row2.ButtonClickEvent += (sender, e) => + { + var form = new SearchWirelessMenuControl(); + form.AddForm(); + }; + } + + /// <summary> + /// 鑿滃崟鎺т欢 + /// </summary> + private class SearchWirelessMenuControl : DialogCommonForm + { + /// <summary> + /// 鐢婚潰鏄剧ず(搴曞眰浼氬浐瀹氳皟鐢ㄦ鏂规硶锛屽�熶互瀹屾垚鐢婚潰鍒涘缓) + /// </summary> + public void ShowForm() + { + var frameBack1 = new FrameLayoutControl(); + frameBack1.UseClickStatu = false; + frameBack1.Y = Application.GetRealHeight(1420); + frameBack1.Gravity = Gravity.CenterHorizontal; + frameBack1.RadiusEx = 12; + frameBack1.Width = Application.GetRealWidth(1034); + frameBack1.Height = Application.GetRealHeight(300); + frameBack1.BackgroundColor = UserCenterColor.Current.White; + bodyFrameLayout.AddChidren(frameBack1); + + //UDP妯″紡(鎺ㄨ崘) + var btnUdp = new NormalViewControl(900, 156, true); + btnUdp.Gravity = Gravity.CenterHorizontal; + btnUdp.TextAlignment = TextAlignment.Center; + btnUdp.TextColor = 0xff0075ff; + btnUdp.TextSize = 17; + btnUdp.TextID = R.MyInternationalizationString.uUdpModeRecommend; + frameBack1.AddChidren(btnUdp, ChidrenBindMode.NotBind); + btnUdp.ButtonClickEvent += (sender, e) => + { + //鍏抽棴鐣岄潰 + this.CloseForm(); + var form = new WirelessUdpDirectionForm(); + form.AddForm(); + }; + + //绾� + var btnLine = new NormalViewControl(frameBack1.Width, ControlCommonResourse.BottomLineHeight, false); + btnLine.BackgroundColor = UserCenterColor.Current.ButtomLine; + btnLine.Y = btnUdp.Bottom; + frameBack1.AddChidren(btnLine, ChidrenBindMode.NotBind); + //AP妯″紡 + var btnAp = new NormalViewControl(900, 144, true); + btnAp.Y = btnLine.Bottom; + btnAp.Gravity = Gravity.CenterHorizontal; + btnAp.TextAlignment = TextAlignment.Center; + btnAp.TextColor = 0xff0075ff; + btnAp.TextSize = 17; + btnAp.TextID = R.MyInternationalizationString.uApMode; + frameBack1.AddChidren(btnAp, ChidrenBindMode.NotBind); + btnAp.ButtonClickEvent += (sender, e) => + { + //鍏抽棴鐣岄潰 + this.CloseForm(); + }; + + var frameBack2 = new FrameLayoutControl(); + frameBack2.UseClickStatu = false; + frameBack2.Y = frameBack1.Bottom + Application.GetRealHeight(23); + frameBack2.Gravity = Gravity.CenterHorizontal; + frameBack2.RadiusEx = 12; + frameBack2.Width = Application.GetRealWidth(1034); + frameBack2.Height = Application.GetRealHeight(156); + frameBack2.BackgroundColor = UserCenterColor.Current.White; + bodyFrameLayout.AddChidren(frameBack2); + //鍙栨秷 + var btnCancel = new NormalViewControl(900, 156, true); + btnCancel.Gravity = Gravity.CenterHorizontal; + btnCancel.TextAlignment = TextAlignment.Center; + btnCancel.TextColor = 0xff0075ff; + btnCancel.TextSize = 17; + btnCancel.TextID = R.MyInternationalizationString.uCancel; + frameBack2.AddChidren(btnCancel, ChidrenBindMode.NotBind); + btnCancel.ButtonClickEvent += (sender, e) => + { + //鍏抽棴鐣岄潰 + this.CloseForm(); + }; + } + } + } +} -- Gitblit v1.8.0