public override bool StorePanelContents() { SharpDevelopTextEditorProperties properties = SharpDevelopTextEditorProperties.Instance; if (((CheckBox)ControlDictionary["enableAAFontRenderingCheckBox"]).Enabled) { properties.TextRenderingHint = ((CheckBox)ControlDictionary["enableAAFontRenderingCheckBox"]).Checked ? TextRenderingHint.ClearTypeGridFit : TextRenderingHint.SystemDefault; } else { properties.TextRenderingHint = TextRenderingHint.SystemDefault; } properties.MouseWheelTextZoom = ((CheckBox)ControlDictionary["mouseWheelZoomCheckBox"]).Checked; //((Properties)CustomizationObject).Set("EnableCodeCompletion", ((CheckBox)ControlDictionary["enableCodeCompletionCheckBox"]).Checked); properties.EnableFolding = ((CheckBox)ControlDictionary["enableFoldingCheckBox"]).Checked; Font currentFont = CurrentFont; if (currentFont != null) { properties.Font = currentFont; } properties.EncodingCodePage = CharacterEncodings.GetCodePageByIndex(((ComboBox)ControlDictionary["textEncodingComboBox"]).SelectedIndex); properties.ShowQuickClassBrowserPanel = ((CheckBox)ControlDictionary["showQuickClassBrowserCheckBox"]).Checked; IViewContent activeViewContent = WorkbenchSingleton.Workbench.ActiveViewContent; if (activeViewContent is ITextEditorControlProvider) { TextEditorControl textarea = ((ITextEditorControlProvider)activeViewContent).TextEditorControl; textarea.OptionsChanged(); } return(true); }
public override bool StorePanelContents() { ((Properties)CustomizationObject).Set("DoubleBuffer", ((CheckBox)ControlDictionary["enableDoublebufferingCheckBox"]).Checked); ((Properties)CustomizationObject).Set("UseAntiAliasFont", ((CheckBox)ControlDictionary["enableAAFontRenderingCheckBox"]).Checked); ((Properties)CustomizationObject).Set("MouseWheelTextZoom", ((CheckBox)ControlDictionary["mouseWheelZoomCheckBox"]).Checked); //((Properties)CustomizationObject).Set("EnableCodeCompletion", ((CheckBox)ControlDictionary["enableCodeCompletionCheckBox"]).Checked); ((Properties)CustomizationObject).Set("EnableFolding", ((CheckBox)ControlDictionary["enableFoldingCheckBox"]).Checked); Font currentFont = CurrentFont; if (currentFont != null) { ((Properties)CustomizationObject).Set("DefaultFont", currentFont.ToString()); } ((Properties)CustomizationObject).Set("Encoding", CharacterEncodings.GetCodePageByIndex(((ComboBox)ControlDictionary["textEncodingComboBox"]).SelectedIndex)); ((Properties)CustomizationObject).Set("ShowQuickClassBrowserPanel", ((CheckBox)ControlDictionary["showQuickClassBrowserCheckBox"]).Checked); IWorkbenchWindow window = WorkbenchSingleton.Workbench.ActiveWorkbenchWindow; if (window != null && (window.ViewContent is ITextEditorControlProvider)) { TextEditorControl textarea = ((ITextEditorControlProvider)window.ViewContent).TextEditorControl; textarea.OptionsChanged(); } return(true); }
public override bool StorePanelContents() { ((IProperties)CustomizationObject).SetProperty("DoubleBuffer", ((CheckBox)ControlDictionary["enableDoublebufferingCheckBox"]).Checked); ((IProperties)CustomizationObject).SetProperty("UseAntiAliasFont", ((CheckBox)ControlDictionary["enableAAFontRenderingCheckBox"]).Checked); ((IProperties)CustomizationObject).SetProperty("MouseWheelTextZoom", ((CheckBox)ControlDictionary["mouseWheelZoomCheckBox"]).Checked); ((IProperties)CustomizationObject).SetProperty("EnableCodeCompletion", ((CheckBox)ControlDictionary["enableCodeCompletionCheckBox"]).Checked); ((IProperties)CustomizationObject).SetProperty("EnableFolding", ((CheckBox)ControlDictionary["enableFoldingCheckBox"]).Checked); ((IProperties)CustomizationObject).SetProperty("DefaultFont", CurrentFont.ToString()); ((IProperties)CustomizationObject).SetProperty("Encoding", CharacterEncodings.GetCodePageByIndex(((ComboBox)ControlDictionary["textEncodingComboBox"]).SelectedIndex)); ((IProperties)CustomizationObject).SetProperty("ShowQuickClassBrowserPanel", ((CheckBox)ControlDictionary["showQuickClassBrowserCheckBox"]).Checked); IViewContent content = WorkbenchSingleton.Workbench.ActiveViewContent; if (content != null && (content is TextEditorView)) { TextEditorControl textEditorContorl = content.Control as TextEditorControl; textEditorContorl.OptionsChanged(); } return(true); }