public StyleCustomizationDialog(Package packageArg, StyleDatabase styleDatabaseArg, CustomStyleInfo initialStyle)
 {
     InitializeComponent();
     pasteCommand.InputGestures.Add(new KeyGesture(Key.V, ModifierKeys.Control));
     CommandBindings.Add(new CommandBinding(pasteCommand, doPaste));
     curStyle = new ClangFormatStyle();
     styleDatabase = styleDatabaseArg;
     CustomStyleListCombobox.SelectionChanged += CustomStyleListCombobox_SelectionChanged;
     CustomStyleListCombobox.ItemsSource = styleDatabase.viewOnlyCustom ();
     cw = new CodeWindow(packageArg);
     CodeWindowContainer.Content = cw;
     if (initialStyle != null)
         CustomStyleListCombobox.SelectedItem = initialStyle;
     else
         CustomStyleListCombobox.SelectedIndex = 0;
     clangStylePropertyGrid.SelectedObject = curStyle;
     clangStylePropertyGrid.PropertyValueChanged += clangStylePropertyGrid_PropertyValueChanged;
     StyleNameTextbox.DataContext = this;
     updatePreview();
 }
Exemplo n.º 2
0
 public void removeStyle(CustomStyleInfo info)
 {
     styles.Remove(info);
 }
Exemplo n.º 3
0
 public void addStyle(CustomStyleInfo newStyle)
 {
     styles.Add(newStyle);
 }