Ejemplo n.º 1
0
        internal PreviewDialog(RuleViewModelBase rule)
        {
            m_rule = rule;

            InitializeComponent();
            DataContext = m_rule;
        }
Ejemplo n.º 2
0
        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);
            }
        }