Esempio n. 1
0
 public static string ShowBox(string txtMessage)
 {
     newMessageBox = new MyMessageBox();
     newMessageBox.lblMessage.Text = txtMessage;
     newMessageBox.ShowDialog();
     return(Button_id);
 }
Esempio n. 2
0
 public static DialogResult Show(string txtMessage, string txtTitle, MessageBoxButtons YesNo, MessageBoxIcon Question)
 {
     newMessageBox = new MyMessageBox();
     newMessageBox.lblTitle.Text           = txtTitle;
     newMessageBox.lblMessage.Text         = txtMessage;
     newMessageBox.label1.Image            = tomarIcono(Question);
     newMessageBox.cbxSelectOption.Visible = false;
     newMessageBox.ShowDialog();
     return(Int32.Parse(Button_id) == 1? DialogResult.OK:DialogResult.Cancel);
 }
Esempio n. 3
0
 public static void Show(string txtMessage, string txtTitle, MessageBoxIcon Question)
 {
     newMessageBox = new MyMessageBox();
     newMessageBox.btnCancel.Hide();
     newMessageBox.btnOK.Text              = "Aceptar";
     newMessageBox.lblTitle.Text           = txtTitle;
     newMessageBox.lblMessage.Text         = txtMessage;
     newMessageBox.label1.Image            = tomarIcono(Question);
     newMessageBox.cbxSelectOption.Visible = false;
     newMessageBox.ShowDialog();
 }
Esempio n. 4
0
 public static Object[] ShowComboBox(string txtMessage, string txtTitle, string[] options, MessageBoxButtons YesNo, MessageBoxIcon Question)
 {
     newMessageBox = new MyMessageBox();
     newMessageBox.lblTitle.Text           = txtTitle;
     newMessageBox.lblMessage.Text         = txtMessage;
     newMessageBox.cbxSelectOption.Visible = true;
     newMessageBox.Size                          = new Size(newMessageBox.Size.Width, newMessageBox.Size.Height + 70);
     newMessageBox.btnOK.Location                = new Point(newMessageBox.btnOK.Location.X, newMessageBox.btnOK.Location.Y + 70);
     newMessageBox.btnCancel.Location            = new Point(newMessageBox.btnCancel.Location.X, newMessageBox.btnCancel.Location.Y + 70);
     newMessageBox.lblMessage.Size               = new Size(newMessageBox.lblMessage.Size.Width, newMessageBox.lblMessage.Size.Height);
     newMessageBox.cbxSelectOption.Location      = new Point(newMessageBox.lblMessage.Location.X, newMessageBox.Location.Y + 80);
     newMessageBox.cbxSelectOption.Size          = new Size(newMessageBox.lblMessage.Size.Width, newMessageBox.cbxSelectOption.Size.Height);
     newMessageBox.cbxSelectOption.DropDownStyle = ComboBoxStyle.DropDownList;
     newMessageBox.panel1.Size                   = new Size(newMessageBox.panel1.Size.Width, newMessageBox.panel1.Size.Height + 70);
     newMessageBox.label1.Image                  = tomarIcono(Question);
     newMessageBox.ShowDialog();
     Object[] obj = new Object[]
     {
         Int32.Parse(Button_id) == 1 ? DialogResult.OK :DialogResult.Cancel,
         Selected_Text
     };
     return(obj);
 }