예제 #1
0
 private void Btn3_Click(object sender, RoutedEventArgs e)
 {
     Result = ThreeButtonDialogResult.Cancel;
     Button3();
     // Close the dialog
     Hide();
 }
예제 #2
0
 // Handle the button clicks from dialog
 private void Btn1_Click(object sender, RoutedEventArgs e)
 {
     Result = ThreeButtonDialogResult.Yes;
     Button1();
     // Close the dialog
     Hide();
 }
예제 #3
0
 public ThreeButtonDialog(string Title, string Message, string Button1, Action Button1Clicked,
                          string Button2, Action Button2Clicked, string Button3, Action Button3Clicked)
 {
     InitializeComponent();
     Result       = ThreeButtonDialogResult.Nothing;
     this.Title   = Title;
     msg.Text     = Message;
     btn1.Content = Button1;
     btn2.Content = Button2;
     btn3.Content = Button3;
     this.Button1 = Button1Clicked;
     this.Button2 = Button2Clicked;
     this.Button3 = Button3Clicked;
 }
 private void TernaryButton_Click(object sender, RoutedEventArgs e)
 {
     Result = ThreeButtonDialogResult.TernaryButton;
     Hide();
 }