public static FormatColumnsResponse ShowFormatColumnsDialog()
        {
            var dialog = new FormatWindow();

            dialog.ShowDialog();

            return(dialog.DataContext == null ? null : (dialog.DataContext as FormatColumnsDialogViewModel).Response);
        }
Exemplo n.º 2
0
        private void SetFormat()
        {
            ObservableCollection <FormattingRuleDefinition> definitions = new ObservableCollection <FormattingRuleDefinition>();

            foreach (FormattingRuleDefinition definition in _optionsTracker.Options.FormattingRuleDefinitions)
            {
                definitions.Add(definition.Clone());
            }

            FormatWindow filterWindow = new FormatWindow();

            filterWindow.Owner = this;
            filterWindow.SetCollection(definitions);
            if (filterWindow.ShowDialog() ?? false)
            {
                _optionsTracker.Options.FormattingRuleDefinitions = new List <FormattingRuleDefinition>(definitions);
            }
        }
Exemplo n.º 3
0
        private void EditFormatButton_Click(object sender, RoutedEventArgs e)
        {
            var editWindow = new FormatWindow(SpellContainer);

            editWindow.Show();
        }