| | |
| | | /// 点击背景的时候,关闭界面
|
| | | /// </summary>
|
| | | public bool CloseFormByClickBack = true;
|
| | | /// <summary>
|
| | | /// 原来的滑动标识
|
| | | /// </summary>
|
| | | private bool oldScrollEnabled = false;
|
| | |
|
| | | #endregion
|
| | |
|
| | |
| | | /// 初始化界面框架 |
| | | /// </summary> |
| | | public override void InitForm() |
| | | { |
| | | {
|
| | | this.oldScrollEnabled = UserView.HomePage.Instance.ScrollEnabled;
|
| | | UserView.HomePage.Instance.ScrollEnabled = false; |
| | | |
| | | base.InitForm(); |
| | | |
| | | bodyFrameLayout = new FrameLayout(); |
| | | bodyFrameLayout.BackgroundColor = UserCenterColor.Current.DialogBackColor; |
| | | this.AddChidren(bodyFrameLayout);
|
| | |
|
| | | bodyFrameLayout.MouseUpEventHandler += (sender, e) =>
|
| | | if (CloseFormByClickBack == true)
|
| | | {
|
| | | //关闭自身
|
| | | this.CloseForm();
|
| | | }; |
| | | bodyFrameLayout.MouseUpEventHandler += (sender, e) =>
|
| | | {
|
| | | //关闭自身
|
| | | this.CloseForm();
|
| | | };
|
| | | } |
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | }
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 关闭界面___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 关闭界面
|
| | | /// </summary>
|
| | | public override void CloseForm()
|
| | | {
|
| | | if (this.oldScrollEnabled == true)
|
| | | {
|
| | | //如果它原来就是不可以滑动的话,不处理
|
| | | UserView.HomePage.Instance.ScrollEnabled = true;
|
| | | }
|
| | |
|
| | | base.CloseForm();
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | | }
|