Пример #1
0
        private MyOpaqueLayer m_OpaqueLayer = null;//半透明蒙板层

        /// <summary>
        /// 显示遮罩层
        /// </summary>
        /// <param name="control">控件</param>
        /// <param name="alpha">透明度</param>
        /// <param name="isShowLoadingImage">是否显示图标</param>
        public void ShowOpaqueLayer(Control control, int alpha, bool isShowLoadingImage, bool opera = true)
        {
            try
            {
                if (this.m_OpaqueLayer == null)
                {
                    this.m_OpaqueLayer = new MyOpaqueLayer(alpha, isShowLoadingImage);

                    control.Controls.Add(this.m_OpaqueLayer);
                    this.m_OpaqueLayer.Dock = DockStyle.Fill;
                    this.m_OpaqueLayer.BringToFront();
                    if (!opera)
                    {
                        this.m_OpaqueLayer.LostFocus += new EventHandler((o, e) =>
                        {
                            this.m_OpaqueLayer.Focus();
                        });
                    }
                    else
                    {
                        this.m_OpaqueLayer.LostFocus -= new EventHandler((o, e) =>
                        {
                            this.m_OpaqueLayer.Focus();
                        });
                    }
                    this.m_OpaqueLayer.Focus();
                }
                this.m_OpaqueLayer.Enabled = true;
                this.m_OpaqueLayer.Visible = true;
            }
            catch { }
        }
Пример #2
0
        /// <summary>
        /// 显示遮罩层
        /// </summary>
        /// <param name="control">控件</param>
        /// <param name="alpha">透明度</param>
        /// <param name="isShowLoadingImage">是否显示图标</param>
        public void ShowOpaqueLayer(Control control, int alpha, bool isShowLoadingImage,bool opera=true)
        {
            try
            {
                if (this.m_OpaqueLayer == null)
                {
                    this.m_OpaqueLayer = new MyOpaqueLayer(alpha, isShowLoadingImage);

                    control.Controls.Add(this.m_OpaqueLayer);
                    this.m_OpaqueLayer.Dock = DockStyle.Fill;
                    this.m_OpaqueLayer.BringToFront();
                    if(!opera)
                        this.m_OpaqueLayer.LostFocus += new EventHandler((o, e) =>
                        {
                            this.m_OpaqueLayer.Focus();
                        });
                    else
                        this.m_OpaqueLayer.LostFocus -= new EventHandler((o, e) =>
                        {
                            this.m_OpaqueLayer.Focus();
                        });
                    this.m_OpaqueLayer.Focus();
                }
                this.m_OpaqueLayer.Enabled = true;
                this.m_OpaqueLayer.Visible = true;
            }
            catch { }
        }
Пример #3
0
 public PaginationUtils(FlowLayoutPanel panel, CustomTipDialog customTipDialog, int[] pageSizeCollection,
                        CustomPaginationQuery custQuery, MyOpaqueLayer myOpaqueLayer)
 {
     this.panel               = panel;
     this.customTipDialog     = customTipDialog;
     this.pageSizeCollection  = pageSizeCollection;
     this.custQuery           = custQuery;
     this.myOpaqueLayer       = myOpaqueLayer;
     this.customTipDialog.Tag = this.myOpaqueLayer;
 }
Пример #4
0
 /// <summary>
 /// 显示遮罩层
 /// </summary>
 /// <param name="control"></param>
 /// <param name="alpha"></param>
 /// <param name="showLoadingImage"></param>
 protected void ShowOpaqueLayer(Control control, int alpha, bool showLoadingImage)
 {
     if (this.m_OpaqueLayer == null)
     {
         this.m_OpaqueLayer = new MyOpaqueLayer(alpha, showLoadingImage);
         control.Controls.Add(this.m_OpaqueLayer);
         this.m_OpaqueLayer.Dock = DockStyle.Fill;
         this.m_OpaqueLayer.BringToFront();
         m_OpaqueLayer.Click += M_OpaqueLayer_Click;
     }
     this.m_OpaqueLayer.Enabled = true;
     this.m_OpaqueLayer.Visible = true;
 }
Пример #5
0
 /// <summary>
 /// 显示遮罩层
 /// </summary>
 /// <param name="control">控件</param>
 /// <param name="alpha">透明度</param>
 /// <param name="isShowLoadingImage">是否显示图标</param>
 public void ShowOpaqueLayer(Form form, int alpha, bool isShowLoadingImage, bool IsShowLabel, string Msg)
 {
     try
     {
         if (this.m_OpaqueLayer == null)
         {
             this.m_OpaqueLayer = new MyOpaqueLayer(alpha, isShowLoadingImage, IsShowLabel, Msg);
             form.Controls.Add(this.m_OpaqueLayer);
             this.m_OpaqueLayer.Dock = DockStyle.Fill;
             this.m_OpaqueLayer.BringToFront();
         }
         this.m_OpaqueLayer.Enabled = true;
         this.m_OpaqueLayer.Visible = true;
     }
     catch { }
 }
Пример #6
0
 /// <summary>
 /// 显示遮罩层
 /// </summary>
 /// <param name="control">控件</param>
 /// <param name="alpha">透明度</param>
 /// <param name="isShowLoadingImage">是否显示图标</param>
 public void ShowOpaqueLayer(Control control, int alpha, bool isShowLoadingImage)
 {
     try
     {
         if (this.m_OpaqueLayer == null)
         {
             this.m_OpaqueLayer = new MyOpaqueLayer(alpha, isShowLoadingImage);
             control.Controls.Add(this.m_OpaqueLayer);
             this.m_OpaqueLayer.Dock = DockStyle.Fill;
             this.m_OpaqueLayer.BringToFront();
         }
         this.m_OpaqueLayer.Enabled = true;
         this.m_OpaqueLayer.Visible = true;
     }
     catch { }
 }
Пример #7
0
 /// <summary>
 /// 显示遮罩层
 /// </summary>
 /// <param name="control">控件</param>
 /// <param name="alpha">透明度</param>
 /// <param name="isShowLoadingImage">是否显示图标</param>
 public void ShowOpaqueLayer(Form form, int alpha, bool isShowLoadingImage, bool IsShowLabel, string Msg)
 {
     try
     {
         if (this.m_OpaqueLayer == null)
         {
             this.m_OpaqueLayer = new MyOpaqueLayer(alpha, isShowLoadingImage, IsShowLabel, Msg);
             form.Controls.Add(this.m_OpaqueLayer);
             this.m_OpaqueLayer.Dock = DockStyle.Fill;
             this.m_OpaqueLayer.BringToFront();
         }
         this.m_OpaqueLayer.Enabled = true;
         this.m_OpaqueLayer.Visible = true;
     }
     catch { }
 }
Пример #8
0
        private MyOpaqueLayer m_OpaqueLayer = null; //半透明蒙板层

        #endregion Fields

        #region Methods

        /// <summary>
        /// 隐藏遮罩层
        /// </summary>
        public void HideOpaqueLayer()
        {
            try
            {
                if (this.m_OpaqueLayer != null)
                {
                    this.m_OpaqueLayer.Visible = false;
                    this.m_OpaqueLayer.Enabled = false;
                    m_OpaqueLayer = null;
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally { }
        }
Пример #9
0
 /// <summary>
 /// 隐藏遮罩层
 /// </summary>
 public void HideOpaqueLayer()
 {
     try
     {
         if (this.m_OpaqueLayer != null)
         {
             this.m_OpaqueLayer.Visible = false;
             this.m_OpaqueLayer.Enabled = false;
             m_OpaqueLayer = null;
         }
     }
     catch (Exception)
     {
         throw;
     }
     finally { }
 }
Пример #10
0
        /// <summary>
        /// 显示遮罩层
        /// </summary>
        /// <param name="control">控件</param>
        /// <param name="alpha">透明度</param>
        /// <param name="isShowLoadingImage">是否显示图标</param>
        public static void Loading(this Control control, int alpha = 125, bool isShowLoadingImage = true)
        {
            try
            {
                if (m_OpaqueLayer != null)
                {
                    m_OpaqueLayer.Parent.Controls.Remove(m_OpaqueLayer);
                    m_OpaqueLayer = null;
                }
                if (m_OpaqueLayer == null)
                {
                    m_OpaqueLayer = new MyOpaqueLayer(alpha, isShowLoadingImage);
                    control.Controls.Add(m_OpaqueLayer);
                    m_OpaqueLayer.Dock = DockStyle.Fill;
                    m_OpaqueLayer.BringToFront();
                }
                m_OpaqueLayer.Enabled = true;
                m_OpaqueLayer.Visible = true;

                EnabledTabIndex(control, false);
            }
            catch { }
        }