public OnTheFlyFormattingPanelWidget() { preferences = IdeApp.Preferences.Roslyn.CSharp; OptionService = IdeApp.TypeSystemService.Workspace.Services.GetService <IOptionService> (); formatOnTypeCheckBox = new CheckBox(GettextCatalog.GetString("Automatically format when typing")); formatOnTypeCheckBox.Active = preferences.AutoFormattingOnTyping; formatOnTypeCheckBox.Toggled += FormatOnTypeCheckBox_Toggled; PackStart(formatOnTypeCheckBox); formatOnSemicolonCheckBox = new CheckBox(GettextCatalog.GetString("Automatically format statement on ;")); formatOnSemicolonCheckBox.Active = preferences.AutoFormattingOnSemicolon; formatOnSemicolonCheckBox.MarginLeft = 18; PackStart(formatOnSemicolonCheckBox); formatOnCloseBraceCheckBox = new CheckBox(GettextCatalog.GetString("Automatically format block on }")); formatOnCloseBraceCheckBox.Active = preferences.AutoFormattingOnCloseBrace; formatOnCloseBraceCheckBox.MarginLeft = 18; PackStart(formatOnCloseBraceCheckBox); formatOnReturnCheckBox = new CheckBox(GettextCatalog.GetString("Automatically format on return")); formatOnReturnCheckBox.Active = preferences.AutoFormattingOnReturn; PackStart(formatOnReturnCheckBox); formatOnPasteCheckBox = new CheckBox(GettextCatalog.GetString("Automatically format on paste")); formatOnPasteCheckBox.Active = preferences.FormatOnPaste; PackStart(formatOnPasteCheckBox); FormatOnTypeCheckBox_Toggled(this, EventArgs.Empty); }
public OnTheFlyFormattingPanelWidget() { preferences = IdeApp.Preferences.Roslyn.CSharp; OptionService = IdeApp.TypeSystemService.Workspace.Services.GetService <IOptionService> (); formatOnTypeCheckBox = new CheckBox(GettextCatalog.GetString("Automatically format when typing")); formatOnTypeCheckBox.Active = preferences.AutoFormattingOnTyping; formatOnTypeCheckBox.Toggled += FormatOnTypeCheckBox_Toggled; PackStart(formatOnTypeCheckBox); formatOnSemicolonCheckBox = new CheckBox(GettextCatalog.GetString("Automatically format statement on ;")); formatOnSemicolonCheckBox.Active = preferences.AutoFormattingOnSemicolon; formatOnSemicolonCheckBox.MarginLeft = 18; PackStart(formatOnSemicolonCheckBox); formatOnCloseBraceCheckBox = new CheckBox(GettextCatalog.GetString("Automatically format block on }")); formatOnCloseBraceCheckBox.Active = preferences.AutoFormattingOnCloseBrace; formatOnCloseBraceCheckBox.MarginLeft = 18; PackStart(formatOnCloseBraceCheckBox); formatOnReturnCheckBox = new CheckBox(GettextCatalog.GetString("Automatically format on return")); formatOnReturnCheckBox.Active = preferences.AutoFormattingOnReturn; PackStart(formatOnReturnCheckBox); formatOnPasteCheckBox = new CheckBox(GettextCatalog.GetString("Automatically format on paste")); formatOnPasteCheckBox.Active = preferences.FormatOnPaste; PackStart(formatOnPasteCheckBox); FormatOnTypeCheckBox_Toggled(this, EventArgs.Empty); showFilterButtonsCheckBox = new CheckBox(GettextCatalog.GetString("Show completion item filters")); showFilterButtonsCheckBox.Active = preferences.ShowCompletionItemFilters; PackStart(showFilterButtonsCheckBox); triggerCompletionOnDeletionCheckBox = new CheckBox(GettextCatalog.GetString("Show completion list after a character is deleted")); triggerCompletionOnDeletionCheckBox.Active = preferences.TriggerOnDeletion.Value ?? false; PackStart(triggerCompletionOnDeletionCheckBox); }