public FormattingOptions()
        {
            Indentation = new IndentationOptions();
            NewLines    = new NewLinesOptions();
            Spacing     = new SpacingOptions();

            SpacesPerIndent = 4;
            NewLine         = Environment.NewLine;
        }
Exemplo n.º 2
0
        public FormattingOptions()
        {
            Indentation = new IndentationOptions();
            NewLines = new NewLinesOptions();
            Spacing = new SpacingOptions();

            SpacesPerIndent = 4;
            NewLine = Environment.NewLine;
        }
        public FormattingNewLinesViewModel(IServiceProvider serviceProvider, NewLinesOptions page)
            : base(serviceProvider)
        {
            Items.Add(new TextBlock { Text = "New line options for braces" });

            Items.Add(new CheckBoxOptionViewModel(new Option<bool>("Place open brace on new line for types", () => page.PlaceOpenBraceOnNewLineForTypes, v => page.PlaceOpenBraceOnNewLineForTypes = v), TypePreview, this));
            Items.Add(new CheckBoxOptionViewModel(new Option<bool>("Place open brace on new line for techniques and passes", () => page.PlaceOpenBraceOnNewLineForTechniquesAndPasses, v => page.PlaceOpenBraceOnNewLineForTechniquesAndPasses = v), TechniquePreview, this));
            Items.Add(new CheckBoxOptionViewModel(new Option<bool>("Place open brace on new line for functions", () => page.PlaceOpenBraceOnNewLineForFunctions, v => page.PlaceOpenBraceOnNewLineForFunctions = v), FunctionPreview, this));
            Items.Add(new CheckBoxOptionViewModel(new Option<bool>("Place open brace on new line for control blocks", () => page.PlaceOpenBraceOnNewLineForControlBlocks, v => page.PlaceOpenBraceOnNewLineForControlBlocks = v), ControlBlockPreview, this));
            Items.Add(new CheckBoxOptionViewModel(new Option<bool>("Place open brace on new line for state blocks", () => page.PlaceOpenBraceOnNewLineForStateBlocks, v => page.PlaceOpenBraceOnNewLineForStateBlocks = v), StateBlockPreview, this));
            Items.Add(new CheckBoxOptionViewModel(new Option<bool>("Place open brace on new line for array initializers", () => page.PlaceOpenBraceOnNewLineForArrayInitializers, v => page.PlaceOpenBraceOnNewLineForArrayInitializers = v), ArrayInitializerPreview, this));

            Items.Add(new TextBlock { Text = "New line options for keywords" });

            Items.Add(new CheckBoxOptionViewModel(new Option<bool>("Place \"else\" on new line", () => page.PlaceElseOnNewLine, v => page.PlaceElseOnNewLine = v), ElsePreview, this));
        }