Пример #1
0
        /*Модальное отображение диалога*/
        public static DialogResult Show(String text, String caption, Global.DialogTypes type)
        {
            DialogForm tempDialog = new DialogForm(text, caption, type);

            tempDialog.ShowDialog();
            DialogResult dialog = tempDialog.result;

            tempDialog.Close();
            return(dialog);
        }
Пример #2
0
        public static string Show(String text, String caption, Global.DialogTypes type, out DialogResult dialogResult)
        {
            DialogForm tempDialog = new DialogForm(text, caption, type);

            tempDialog.ShowDialog();
            dialogResult = tempDialog.result;
            string newValue = tempDialog.editText;

            tempDialog.Close();
            return(newValue);
        }
Пример #3
0
 /*Gлучаем заголовок, содержимое и тип вызываемой формы*/
 public DialogForm(String header, String text, Global.DialogTypes dialog)
 {
     InitializeComponent();
     this.Size          = new Size(260, 150);
     this.Text          = header;
     message            = new DBLabel(text);
     editText           = text;
     this.dialogType    = dialog;
     this.Width         = 260;
     this.Height        = 150;
     this.StartPosition = FormStartPosition.CenterScreen;
 }