Exemplo n.º 1
0
 public static void Show(string message, YesMethod yesMethod)
 {
     try {
         CustomYesNoBox custom = new CustomYesNoBox(message, yesMethod);
         custom.ShowDialog();
     } catch (Exception ex) {
         CustomMessageBox.Show("Error : " + ex.Message);
     }
 }
Exemplo n.º 2
0
 private void buttonYes_Click(object sender, EventArgs e)
 {
     try {
         yesMethod?.Invoke();
         yesMethod = null;
         this.Close();
     } catch (Exception ex) {
         CustomMessageBox.Show("Error : " + ex.Message);
     }
 }
Exemplo n.º 3
0
 public CustomYesNoBox(string message, YesMethod yesMethod)
 {
     try {
         InitializeComponent();
         labelPesan.Text = message;
         this.yesMethod  = yesMethod;
     }catch (Exception ex) {
         CustomMessageBox.Show("Error : " + ex.Message);
     }
 }