| | |
| | | #region ■ 变量声明___________________________ |
| | | |
| | | /// <summary> |
| | | /// 返回按键的点击事件(如果实现此事件,则底层的事件将不会再触发)
|
| | | /// </summary>
|
| | | public Action<BackViewControl> BackButtonClickEvent = null;
|
| | | /// <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> |
| | | private bool m_ScrollEnabled = true; |
| | | /// <summary>
|
| | | /// 左滑使能
|
| | | /// 左滑使能(界面关闭时,底层会还原,无需再处理)
|
| | | /// </summary> |
| | | public bool ScrollEnabled
|
| | | {
|
| | |
| | | } |
| | | |
| | | //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; |
| | |
| | | btnLine.BackgroundColor = 0x40000000; |
| | | btnLine.Y = topFrameLayout.Height - 1; |
| | | topFrameLayout.AddChidren(btnLine); |
| | | topFrameLayout.AddTag("btnLine", btnLine);
|
| | | |
| | | //返回键 |
| | | var btnBack = new BackViewControl(); |
| | |
| | | btnBack.InitControl(); |
| | | btnBack.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | if (this.BackButtonClickEvent != null)
|
| | | {
|
| | | //如果实现此事件,则底层的事件将不会再触发
|
| | | BackButtonClickEvent(btnBack);
|
| | | return;
|
| | | }
|
| | | //画面关闭
|
| | | this.CloseForm();
|
| | | };
|
| | |
| | | { |
| | | bodyFrameLayout.RemoveAll(); |
| | | }
|
| | | bodyFrameLayout = new FrameLayout(); |
| | | bodyFrameLayout = new NormalFrameLayout(); |
| | | bodyFrameLayout.Height = ControlCommonResourse.BodyFrameHeight; |
| | | bodyFrameLayout.Y = topFrameLayout.Bottom; |
| | | bodyFrameLayout.BackgroundColor = UserCenterColor.Current.BodyFrameLayout; |
| | |
| | | /// <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;
|
| | |
| | |
|
| | | //执行ShowForm()方法
|
| | | this.LoadShowFormMethod(parameter);
|
| | |
|
| | | //界面加载结束
|
| | | ControlCommonResourse.IsFormAdding = false;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | //左滑使能
|
| | | this.ScrollEnabled = true;
|
| | |
|
| | | this.BackButtonClickEvent = null;
|
| | |
|
| | | 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 ■ 显示重新加载_______________________ |
| | | |
| | |
| | | /// </summary> |
| | | public override void ShowReLoadView()
|
| | | {
|
| | | Application.RunOnMainThread(() =>
|
| | | HdlThreadLogic.Current.RunMain(() =>
|
| | | {
|
| | | if (bodyFrameLayout == null || bodyFrameLayout.Parent == null)
|
| | | {
|
| | |
| | | frame.AddChidren(btnReLoad);
|
| | | btnReLoad.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | //点击重新加载时,允许再次联网
|
| | | HdlWifiLogic.Current.CanAccessHttp = true;
|
| | |
|
| | | //清除全部控件
|
| | | 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 ■ 显示没有数据的图像显示特效_________ |
| | |
| | | { |
| | | return; |
| | | } |
| | | bodyFrameLayout?.RemoveAll(); |
| | | if (bodyFrameLayout == null || bodyFrameLayout.Parent == null)
|
| | | {
|
| | | return;
|
| | | } |
| | | bodyFrameLayout.RemoveAll(); |
| | | }
|
| | |
|
| | | #endregion |