黄学彪
2019-12-09 163777d8a2cb7cfa469f54a7042528870ebc10a3
ZigbeeApp/Shared/Phone/UserCenter/Gateway/Add/NewGateWayMenuSelectForm.cs
@@ -71,89 +71,6 @@
                    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.Radius = 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 form = new WirelessApDirection1Form();
                    form.AddForm();
                };
                var frameBack2 = new FrameLayoutControl();
                frameBack2.UseClickStatu = false;
                frameBack2.Y = frameBack1.Bottom + Application.GetRealHeight(23);
                frameBack2.Gravity = Gravity.CenterHorizontal;
                frameBack2.Radius = 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();
                };
            }
        }
    }
}