private void MainButton_ButtonClick(object sender, EventArgs e) { MainButton btn = sender as MainButton; if (btn.ContentText == "Yes") { DialogResult = CxDialogResultEnum.Yes; } if (btn.ContentText == "No") { DialogResult = CxDialogResultEnum.No; } MessageBox.Show(DialogResult.ToString()); this.Close(); }
private void ExitButton_Click(object sender, RoutedEventArgs e) { DialogResult = CxDialogResultEnum.Cancel; MessageBox.Show(DialogResult.ToString()); this.Close(); }