示例#1
0
 public static string ShowBox(string txtMessage)
 {
     newMB = new MyCMB();
     newMB.lblMessage.Text = txtMessage;
     newMB.ShowDialog();
     return(Button_id);
 }
示例#2
0
 public static string ShowBox(string txtMessage, string txtTitle, int delay)
 {
     disposeFormTimer      = delay;
     newMB                 = new MyCMB();
     newMB.lblTitle.Text   = txtTitle;
     newMB.lblMessage.Text = txtMessage;
     newMB.ShowDialog();
     return(Button_id);
 }
示例#3
0
 void Button2Click(object sender, EventArgs e)
 {
     try{
         string result = MyCMB.ShowBox("Do you want to exit? \n This Dialog will close automaticaly after 10 sec", "Exit", 10);
         if (result.Equals("1"))
         {
             MessageBox.Show("OK Button was Clicked");
         }
         else if (result.Equals("2"))
         {
             MessageBox.Show("Cancel Button was Clicked");
         }
     }catch { }
 }