Пример #1
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;
        }
Пример #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;
        }