陈嘉乐
2020-09-02 652243206427f35a256400a149a1734085824cb9
ZigbeeApp/Shared/Phone/CommonForm/EditorCommonForm.cs
@@ -21,15 +21,15 @@
        /// <summary>
        /// TopMenuFrameLayout
        /// </summary>
        public FrameLayout topMenuFrameLayout = null;
        public NormalFrameLayout topMenuFrameLayout = null;
        /// <summary>
        /// TopFrameLayout
        /// </summary>
        public FrameLayout topFrameLayout = null;
        public NormalFrameLayout topFrameLayout = null;
        /// <summary>
        /// bodyFrameLayout
        /// </summary>
        public FrameLayout bodyFrameLayout = null;
        public NormalFrameLayout bodyFrameLayout = null;
        /// <summary>
        /// 左滑使能
        /// </summary>
@@ -102,14 +102,14 @@
            }
            //TopMenuFrameLayout做成
            topMenuFrameLayout = new FrameLayout();
            topMenuFrameLayout = new NormalFrameLayout();
            topMenuFrameLayout.Height = ControlCommonResourse.TopMenuFrameHeight;
            topMenuFrameLayout.BackgroundColor = UserCenterColor.Current.TopFrameLayout;
            topMenuFrameLayout.Name = "topMenuFrameLayout";
            this.AddChidren(topMenuFrameLayout);
            //TopFrameLayout做成
            topFrameLayout = new FrameLayout();
            topFrameLayout = new NormalFrameLayout();
            topFrameLayout.Height = ControlCommonResourse.TopFrameHeight;
            topFrameLayout.BackgroundColor = UserCenterColor.Current.TopFrameLayout;
            topFrameLayout.Y = topMenuFrameLayout.Bottom;
@@ -121,6 +121,7 @@
            btnLine.BackgroundColor = 0x40000000;
            btnLine.Y = topFrameLayout.Height - 1;
            topFrameLayout.AddChidren(btnLine);
            topFrameLayout.AddTag("btnLine", btnLine);
            //返回键
            var btnBack = new BackViewControl();
@@ -168,7 +169,7 @@
            {
                bodyFrameLayout.RemoveAll();
            }
            bodyFrameLayout = new FrameLayout();
            bodyFrameLayout = new NormalFrameLayout();
            bodyFrameLayout.Height = ControlCommonResourse.BodyFrameHeight;
            bodyFrameLayout.Y = topFrameLayout.Bottom;
            bodyFrameLayout.BackgroundColor = UserCenterColor.Current.BodyFrameLayout;
@@ -188,13 +189,16 @@
        /// <param name="parameter">启动参数:参数由指定画面的ShowForm函数所指定</param>
        public override void AddForm(params object[] parameter)
        {
            //界面加载中
            ControlCommonResourse.IsFormAdding = true;
            base.AddForm(parameter);
            //检测能否追加画面
            if (UserCenterLogic.CheckCanAddForm(this) == false)
            {
                return;
            }
            //检测能否追加画面 2020.05.14舍弃
            //if (UserCenterLogic.CheckCanAddForm(this) == false)
            //{
            //    return;
            //}
            UserView.HomePage.Instance.AddChidren(this);
            UserView.HomePage.Instance.PageIndex += 1;
@@ -204,6 +208,9 @@
            //执行ShowForm()方法
            this.LoadShowFormMethod(parameter);
            //界面加载结束
            ControlCommonResourse.IsFormAdding = false;
        }
        #endregion
@@ -225,9 +232,38 @@
            this.m_parameter = null;
            //清空bodyFrame
            this.ClearBodyFrame();
        }
        }
        #endregion
        #region ■ 添加帮助控件_______________________
        /// <summary>
        /// 添加查看帮助控件
        /// </summary>
        /// <returns></returns>
        public NormalViewControl AddHelpControl()
        {
            //查看帮助
            var btnHelp = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false);
            btnHelp.Y = Application.GetRealHeight(1388);
            btnHelp.TextSize = 12;
            btnHelp.TextAlignment = TextAlignment.Center;
            btnHelp.TextColor = UserCenterColor.Current.TextOrangeColor;
            btnHelp.Text = Language.StringByID(R.MyInternationalizationString.uSearchHelp);
            bodyFrameLayout.AddChidren(btnHelp);
            //底线
            int lineWidth = btnHelp.GetRealWidthByText();
            var btnLine = new NormalViewControl(lineWidth, ControlCommonResourse.BottomLineHeight, false);
            btnLine.BackgroundColor = UserCenterColor.Current.TextOrangeColor;
            btnLine.Gravity = Gravity.CenterHorizontal;
            btnLine.Y = btnHelp.Bottom - Application.GetRealHeight(8);
            bodyFrameLayout.AddChidren(btnLine);
            return btnHelp;
        }
        #endregion
        #region ■ 显示重新加载_______________________
@@ -236,7 +272,7 @@
        /// </summary>
        public override void ShowReLoadView()
        {
            Application.RunOnMainThread(() =>
            HdlThreadLogic.Current.RunMain(() =>
            {
                if (bodyFrameLayout == null || bodyFrameLayout.Parent == null)
                {
@@ -256,6 +292,9 @@
                frame.AddChidren(btnReLoad);
                btnReLoad.ButtonClickEvent += (sender, e) =>
                {
                    //点击重新加载时,允许再次联网
                    HdlWifiLogic.Current.CanAccessHttp = true;
                    //清除全部控件
                    this.ClearBodyFrame();
@@ -289,35 +328,6 @@
        {
        }
        #endregion
        #region ■ 添加帮助控件_______________________
        /// <summary>
        /// 添加查看帮助控件
        /// </summary>
        /// <returns></returns>
        public NormalViewControl AddHelpControl()
        {
            //查看帮助
            var btnHelp = new NormalViewControl(bodyFrameLayout.Width, Application.GetRealHeight(50), false);
            btnHelp.Y = Application.GetRealHeight(1388);
            btnHelp.TextSize = 12;
            btnHelp.TextAlignment = TextAlignment.Center;
            btnHelp.TextColor = UserCenterColor.Current.TextOrangeColor;
            btnHelp.Text = Language.StringByID(R.MyInternationalizationString.uSearchHelp);
            bodyFrameLayout.AddChidren(btnHelp);
            //底线
            int lineWidth = btnHelp.GetRealWidthByText();
            var btnLine = new NormalViewControl(lineWidth, ControlCommonResourse.BottomLineHeight, false);
            btnLine.BackgroundColor = UserCenterColor.Current.TextOrangeColor;
            btnLine.Gravity = Gravity.CenterHorizontal;
            btnLine.Y = btnHelp.Bottom - Application.GetRealHeight(8);
            bodyFrameLayout.AddChidren(btnLine);
            return btnHelp;
        }
        #endregion
        #region ■ 显示没有数据的图像显示特效_________