Exemplo n.º 1
0
        public static DialogResult Show(IWin32Window owner,
                                        string strText,
                                        MessageBoxButtons buttons,
                                        MessageBoxDefaultButton defaultbutton,
                                        string strCheckBoxText,
                                        ref bool bCheckBox,
                                        string[] button_texts = null,
                                        int nAutoCloseSeconds = 0)
        {
            MessageDialog dlg = new MessageDialog();

            GuiUtil.AutoSetDefaultFont(dlg);
            dlg.Text = "";
            if (strCheckBoxText == null)
            {
                dlg.CheckBoxVisible = false;
            }
            else
            {
                dlg.CheckBoxText = strCheckBoxText;
            }
            dlg.MessageText   = strText;
            dlg.CheckBoxValue = bCheckBox;
            dlg.StartPosition = FormStartPosition.CenterScreen;

            dlg.m_buttonDef    = buttons;
            dlg.m_defautButton = defaultbutton;

            dlg.button_texts     = button_texts;
            dlg.AutoCloseSeconds = nAutoCloseSeconds;
            dlg.ShowDialog(owner);

            bCheckBox = dlg.CheckBoxValue;
            return(dlg.DialogResult);
        }
Exemplo n.º 2
0
        public static DialogResult Show(IWin32Window owner,
                                        string strTitle,
                                        string strText,
                                        string strCheckBoxText,
                                        ref bool bCheckBox)
        {
            MessageDialog dlg = new MessageDialog();

            GuiUtil.AutoSetDefaultFont(dlg);
            dlg.Text = strTitle;
            if (strCheckBoxText == null)
            {
                dlg.CheckBoxVisible = false;
            }
            else
            {
                dlg.CheckBoxText = strCheckBoxText;
            }
            dlg.MessageText   = strText;
            dlg.CheckBoxValue = bCheckBox;
            dlg.StartPosition = FormStartPosition.CenterScreen;
            dlg.ShowDialog(owner);

            bCheckBox = dlg.CheckBoxValue;
            return(dlg.DialogResult);
        }
Exemplo n.º 3
0
        public static DialogResult Show(IWin32Window owner,
            string strText,
            MessageBoxButtons buttons,
            MessageBoxDefaultButton defaultbutton,
            string strCheckBoxText,
            ref bool bCheckBox,
            string[] button_texts = null)
        {
            MessageDialog dlg = new MessageDialog();
            GuiUtil.AutoSetDefaultFont(dlg);
            dlg.Text = "";
            if (strCheckBoxText == null)
                dlg.CheckBoxVisible = false;
            else
                dlg.CheckBoxText = strCheckBoxText;
            dlg.MessageText = strText;
            dlg.CheckBoxValue = bCheckBox;
            dlg.StartPosition = FormStartPosition.CenterScreen;

            dlg.m_buttonDef = buttons;
            dlg.m_defautButton = defaultbutton;

            dlg.button_texts = button_texts;

            dlg.ShowDialog(owner);

            bCheckBox = dlg.CheckBoxValue;
            return dlg.DialogResult;
        }
Exemplo n.º 4
0
        public static DialogResult Show(IWin32Window owner,
            string strTitle,
            string strText,
            string strCheckBoxText,
            ref bool bCheckBox)
        {
            MessageDialog dlg = new MessageDialog();
            GuiUtil.AutoSetDefaultFont(dlg);
            dlg.Text = strTitle;
            if (strCheckBoxText == null)
                dlg.CheckBoxVisible = false;
            else
                dlg.CheckBoxText = strCheckBoxText;
            dlg.MessageText = strText;
            dlg.CheckBoxValue = bCheckBox;
            dlg.StartPosition = FormStartPosition.CenterScreen;
            dlg.ShowDialog(owner);

            bCheckBox = dlg.CheckBoxValue;
            return dlg.DialogResult;
        }