黄学彪
2019-11-04 c7698e163e43cea9e7f8ee45f8e3f91c9265cca4
ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Form/Base/DialogCommonForm.cs
@@ -19,6 +19,10 @@
        /// 点击背景的时候,关闭界面
        /// </summary>
        public bool CloseFormByClickBack = true;
        /// <summary>
        /// 原来的滑动标识
        /// </summary>
        private bool oldScrollEnabled = false;
        #endregion
@@ -28,18 +32,24 @@
        /// 初始化界面框架
        /// </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
@@ -74,5 +84,23 @@
        }
        #endregion
        #region ■ 关闭界面___________________________
        /// <summary>
        /// 关闭界面
        /// </summary>
        public override void CloseForm()
        {
            if (this.oldScrollEnabled == true)
            {
                //如果它原来就是不可以滑动的话,不处理
                UserView.HomePage.Instance.ScrollEnabled = true;
            }
            base.CloseForm();
        }
        #endregion
    }
}