private void previewButton_Click(object sender, RoutedEventArgs e) { try { PreviewDialog previewDialog = new PreviewDialog(m_newRule); previewDialog.Owner = Window.GetWindow(this); if ((bool)previewDialog.ShowDialog()) { okButton_Click(sender, e); } } catch (Exception exception) { Utilities.HandleException(exception); } }
private void previewButton_Click(object sender, RoutedEventArgs e) { try { FrameworkElement button = sender as FrameworkElement; Debug.Assert(button != null); RuleViewModelBase conflict = button.DataContext as RuleViewModelBase; Debug.Assert(conflict != null); PreviewDialog previewDialog = new PreviewDialog(conflict); previewDialog.Owner = Window.GetWindow(this); if ((bool)previewDialog.ShowDialog()) { resolveButton_Click(sender, e); } } catch (Exception exception) { Utilities.HandleException(exception); } }