Beispiel #1
0
        /// <summary>
        /// 显示消息框,带遮蔽层
        /// </summary>
        /// <param name="icon"></param>
        /// <param name="message"></param>
        /// <returns></returns>
        public static DialogResult ShowCustomerMessage(MessageBoxIcon icon, string title, string message, double timer, Control control)
        {
            #region 显示遮蔽层
            //panel = new OpaqueLayer();
            //control.Controls.Add(panel);
            //panel.Dock = DockStyle.Fill;
            //panel.BringToFront();
            //panel.Enabled = true;
            //panel.Visible = true;
            #endregion

            #region 屏蔽父窗体
            // Mod hyx 2014-11-20  Start 尽量避免闪烁
            // control.Enabled = false;
            SP1(false, control);
            // Mod hyx 2014-11-20  End 尽量避免闪烁
            parentControl = control;
            #endregion

            newMessageBox = new BaseMessageBox();
            newMessageBox.Init(icon, title, message, timer, null, null);
            newMessageBox.ShowDialog();
            return result;
        }