public void Action(OptionsContentAction action) { switch (action) { case OptionsContentAction.Show: if (!alreadyShown) { cbAllowCodeCompletion.Checked = MainForm.UserOptions.AllowCodeCompletion; cbCodeCompletionDot.Checked = MainForm.UserOptions.CodeCompletionDot; cbCodeCompletionHint.Checked = MainForm.UserOptions.CodeCompletionHint; cbCodeCompletionParams.Checked = MainForm.UserOptions.CodeCompletionParams; cbCodeCompletionKeyPressed.Checked = MainForm.UserOptions.EnableSmartIntellisense; nuNamespaceVisibleRange.Value = MainForm.UserOptions.CodeCompletionNamespaceVisibleRange; cbIntellisencePanel.Checked = MainForm.UserOptions.ShowQuickClassBrowserPanel; alreadyShown = true; } break; case OptionsContentAction.Ok: MainForm.UserOptions.CodeCompletionDot = cbCodeCompletionDot.Checked; MainForm.UserOptions.CodeCompletionHint = cbCodeCompletionHint.Checked; MainForm.UserOptions.CodeCompletionParams = cbCodeCompletionParams.Checked; MainForm.UserOptions.AllowCodeCompletion = cbAllowCodeCompletion.Checked; MainForm.UserOptions.EnableSmartIntellisense = cbCodeCompletionKeyPressed.Checked; MainForm.UserOptions.CodeCompletionNamespaceVisibleRange = Convert.ToInt32(nuNamespaceVisibleRange.Value); MainForm.UserOptions.ShowQuickClassBrowserPanel = cbIntellisencePanel.Checked; MainForm.UpdateUserOptions(); alreadyShown = false; WorkbenchServiceFactory.OptionsService.SaveOptions(); break; case OptionsContentAction.Cancel: alreadyShown = false; break; } }
internal void Action(OptionsContentAction action) { foreach (IOptionsContent c in showedContent) c.Action(action); if (action == OptionsContentAction.Ok || action == OptionsContentAction.Cancel) showedContent.Clear(); }
public void Action(OptionsContentAction action) { switch (action) { case OptionsContentAction.Show: if (!alreadyShown) { languageSelect.SelectedItem = PascalABCCompiler.StringResourcesLanguage.CurrentLanguageName; cbSaveFilesIfComilationOk.Checked = MainForm.UserOptions.SaveSourceFilesIfComilationOk; cbPauseInRunModeIfConsole.Checked = MainForm.UserOptions.PauseInRunModeIfConsole; cbAutoInsertCodeIsEnabledOnStartup.Checked = MainForm.UserOptions.AutoInsertCodeIsEnabledOnStartup; addErrorStrategyComboBox(); cbShowDebugPlayPauseButtons.Checked = MainForm.PlayPauseButtonsVisibleInPanel; alreadyShown = true; } break; case OptionsContentAction.Ok: UserOptions UsOpt = MainForm.UserOptions; UsOpt.SaveSourceFilesIfComilationOk = cbSaveFilesIfComilationOk.Checked; UsOpt.AutoInsertCodeIsEnabledOnStartup = cbAutoInsertCodeIsEnabledOnStartup.Checked; MainForm.ErrorsManager.Strategy = (ErrorsStrategy)cbErrorsStrategy.Items.IndexOf(cbErrorsStrategy.SelectedItem); switch (cbErrorsStrategy.Items.IndexOf(cbErrorsStrategy.SelectedItem)) { case 0: MainForm.ErrorsManager.Strategy = ErrorsStrategy.FirstOnly; break; case 1: MainForm.ErrorsManager.Strategy = ErrorsStrategy.FirstSemanticAndSyntax; break; } /*switch (cbErrorsStrategy.Items.IndexOf(cbErrorsStrategy.SelectedItem)) * { * case 0: * MainForm.ErrorsManager.Strategy = ErrorsStrategy.All; * break; * case 1: * MainForm.ErrorsManager.Strategy = ErrorsStrategy.FirstOnly; * break; * case 2: * MainForm.ErrorsManager.Strategy = ErrorsStrategy.FirstSemanticAndSyntax; * break; * } */ UsOpt.PauseInRunModeIfConsole = cbPauseInRunModeIfConsole.Checked; MainForm.UpdateUserOptions(); MainForm.PlayPauseButtonsVisibleInPanel = cbShowDebugPlayPauseButtons.Checked; alreadyShown = false; WorkbenchServiceFactory.OptionsService.SaveOptions(); //this.Enabled = true; break; case OptionsContentAction.Cancel: alreadyShown = false; break; } }
internal void Action(IOptionsContent content, OptionsContentAction action) { content.Action(action); if (action == OptionsContentAction.Show) { showedContent.Add(content); } }
internal void Action(OptionsContentAction action) { foreach (IOptionsContent c in showedContent) { c.Action(action); } if (action == OptionsContentAction.Ok || action == OptionsContentAction.Cancel) { showedContent.Clear(); } }
public void Action(OptionsContentAction action) { switch (action) { case OptionsContentAction.Show: if (!alreadyShown) { cbShowLinesNum.Checked = MainForm.UserOptions.ShowLineNums; cbEnableFolding.Checked = MainForm.UserOptions.EnableFolding; // SSM 4.09.08 cbShowMathBracket.Checked = MainForm.UserOptions.ShowMathBraket; cbConvertTabsToSpaces.Checked = MainForm.UserOptions.ConverTabsToSpaces; cbEnableMatchOperBrackets.Checked = MainForm.UserOptions.HighlightOperatorBrackets; nudTabIndent.Value = MainForm.UserOptions.TabIndent; cbSkipStakTraceItemIfSourceFileInSystemDirectory.Checked = !MainForm.UserOptions.SkipStackTraceItemIfSourceFileInSystemDirectory; //cbErrorPos.Items.Clear(); //AddcbErrorPosItem(SourceLocationAction.GotoBeg, strprefix + "EP_BEGIN"); //AddcbErrorPosItem(SourceLocationAction.GotoEnd, strprefix + "EP_END"); //AddcbErrorPosItem(SourceLocationAction.SelectAndGotoBeg, strprefix + "EP_SELECTBEGIN"); //AddcbErrorPosItem(SourceLocationAction.SelectAndGotoEnd, strprefix + "EP_SELECTEND"); cbEditorFontSize.SelectedItem = null; foreach (int size in cbEditorFontSize.Items) { if (size == MainForm.UserOptions.EditorFontSize) { cbEditorFontSize.SelectedItem = size; break; } } if (cbEditorFontSize.SelectedItem == null) { cbEditorFontSize.Items.Add(MainForm.UserOptions.EditorFontSize); cbEditorFontSize.SelectedItem = MainForm.UserOptions.EditorFontSize; } /*if (MainForm.UserOptions.CurrentFontFamily != null) * { * MainForm.CurrentSyntaxEditor.TextEditor.Font = new Font(new FontFamily(MainForm.UserOptions.CurrentFontFamily),MainForm.CurrentSyntaxEditor.TextEditor.Font.Size); * }*/ fcbFont.Populate(false, MainForm.CurrentSyntaxEditor.TextEditor.Font); alreadyShown = true; } break; case OptionsContentAction.Ok: MainForm.UserOptions.ConverTabsToSpaces = cbConvertTabsToSpaces.Checked; MainForm.UserOptions.TabIndent = (int)nudTabIndent.Value; MainForm.UserOptions.ShowLineNums = cbShowLinesNum.Checked; MainForm.UserOptions.EnableFolding = cbEnableFolding.Checked; // SSM 4.09.08 MainForm.UserOptions.ShowMathBraket = cbShowMathBracket.Checked; MainForm.UserOptions.HighlightOperatorBrackets = cbEnableMatchOperBrackets.Checked; MainForm.ErrorCursorPosStrategy = SourceLocationAction.GotoBeg;//(SourceLocationAction)(cbErrorPos.SelectedItem as ObjectLocalisator).Value; if (fcbFont.SelectedItem != null) { MainForm.CurrentSyntaxEditor.TextEditor.Font = new Font(new FontFamily((string)fcbFont.SelectedItem), MainForm.CurrentSyntaxEditor.TextEditor.Font.Size); MainForm.UserOptions.CurrentFontFamily = fcbFont.SelectedItem as string; } MainForm.UserOptions.EditorFontSize = Convert.ToInt32(cbEditorFontSize.Text); MainForm.UserOptions.SkipStackTraceItemIfSourceFileInSystemDirectory = !cbSkipStakTraceItemIfSourceFileInSystemDirectory.Checked; MainForm.UpdateUserOptions(); WorkbenchServiceFactory.OptionsService.SaveOptions(); alreadyShown = false; break; case OptionsContentAction.Cancel: alreadyShown = false; break; } }
public void Action(OptionsContentAction action) { PascalABCCompiler.CompilerOptions CompOpt = WorkbenchServiceFactory.BuildService.CompilerOptions; UserOptions opt = MainForm.UserOptions; switch (action) { case OptionsContentAction.Show: //comboBox1.SelectedItem = comboBox1.Items[0]; if (!alreadyShown) { comboBox1.Items.Clear(); comboBox1.Items.Add(PascalABCCompiler.StringResources.Get("VP_MF_AT_CONSOLE")); comboBox1.Items.Add(PascalABCCompiler.StringResources.Get("VP_MF_AT_WINDOWS")); comboBox1.Items.Add(PascalABCCompiler.StringResources.Get("VP_MF_AT_DLL")); switch (CompOpt.OutputFileType) { case PascalABCCompiler.CompilerOptions.OutputType.ConsoleApplicaton: comboBox1.SelectedItem = comboBox1.Items[0]; break; case PascalABCCompiler.CompilerOptions.OutputType.WindowsApplication: comboBox1.SelectedItem = comboBox1.Items[1]; break; case PascalABCCompiler.CompilerOptions.OutputType.ClassLibrary: comboBox1.SelectedItem = comboBox1.Items[2]; break; } checkBox1.Checked = CompOpt.Debug; cbDeleteExe.Checked = opt.DeleteEXEAfterExecute; cbDeletePdb.Checked = opt.DeletePDBAfterExecute; cbUseOutputDirecory.Checked = opt.UseOutputDirectory; cbUseOutputDirecory_CheckedChanged(null, null); tbOutputDirectory.Text = opt.OutputDirectory; cbUseDllForSystemUnits.Checked = opt.UseDllForSystemUnits; alreadyShown = true; } break; case OptionsContentAction.Ok: /*switch (comboBox1.Items.IndexOf(comboBox1.SelectedItem)) { case 0: CompOpt.OutputFileType = PascalABCCompiler.CompilerOptions.OutputType.ConsoleApplicaton; break; case 1: CompOpt.OutputFileType = PascalABCCompiler.CompilerOptions.OutputType.WindowsApplication; break; case 2: CompOpt.OutputFileType = PascalABCCompiler.CompilerOptions.OutputType.ClassLibrary; break; }*/ CompOpt.Debug = checkBox1.Checked; MainForm.SelectAppType(CompOpt.OutputFileType); opt.DeleteEXEAfterExecute = cbDeleteExe.Checked; opt.DeletePDBAfterExecute = cbDeletePdb.Checked; if (!Directory.Exists(tbOutputDirectory.Text)) { try { Directory.CreateDirectory(tbOutputDirectory.Text); } catch (Exception ex) { MessageBox.Show(ex.Message, PascalABCCompiler.StringResources.Get("!ERROR_ON_CREATE_DIRECORY"), MessageBoxButtons.OK, MessageBoxIcon.Error); ActiveControl = tbOutputDirectory; return; } } opt.UseOutputDirectory = cbUseOutputDirecory.Checked; opt.OutputDirectory = tbOutputDirectory.Text; opt.UseDllForSystemUnits = cbUseDllForSystemUnits.Checked; if (opt.UseOutputDirectory) WorkbenchStorage.StandartDirectories[Constants.OutputDirectoryIdent] = opt.OutputDirectory; else WorkbenchStorage.StandartDirectories[Constants.OutputDirectoryIdent] = null; alreadyShown = false; WorkbenchServiceFactory.OptionsService.SaveOptions(); break; case OptionsContentAction.Cancel: alreadyShown = false; break; } }
public void Action(OptionsContentAction action) { switch (action) { case OptionsContentAction.Show: if (!alreadyShown) { languageSelect.SelectedItem = PascalABCCompiler.StringResourcesLanguage.CurrentLanguageName; cbSaveFilesIfComilationOk.Checked = MainForm.UserOptions.SaveSourceFilesIfComilationOk; cbPauseInRunModeIfConsole.Checked = MainForm.UserOptions.PauseInRunModeIfConsole; cbErrorsStrategy.Items.Clear(); //cbErrorsStrategy.Items.Add(PascalABCCompiler.StringResources.Get(strprefix + "ES_ALL")); cbErrorsStrategy.Items.Add(PascalABCCompiler.StringResources.Get(strprefix + "ES_FIRSTONLY")); cbErrorsStrategy.Items.Add(PascalABCCompiler.StringResources.Get(strprefix + "ES_FIRSTSEMANTICANDSYNTAX")); switch (MainForm.ErrorsManager.Strategy) { /*case ErrorsStrategy.All: * cbErrorsStrategy.SelectedItem = cbErrorsStrategy.Items[1]; * break;*/ case ErrorsStrategy.FirstOnly: cbErrorsStrategy.SelectedItem = cbErrorsStrategy.Items[0]; break; case ErrorsStrategy.FirstSemanticAndSyntax: cbErrorsStrategy.SelectedItem = cbErrorsStrategy.Items[1]; break; default: cbErrorsStrategy.SelectedItem = cbErrorsStrategy.Items[1]; break; } cbShowDebugPlayPauseButtons.Checked = MainForm.PlayPauseButtonsVisibleInPanel; alreadyShown = true; } break; case OptionsContentAction.Ok: UserOptions UsOpt = MainForm.UserOptions; UsOpt.SaveSourceFilesIfComilationOk = cbSaveFilesIfComilationOk.Checked; MainForm.ErrorsManager.Strategy = (ErrorsStrategy)cbErrorsStrategy.Items.IndexOf(cbErrorsStrategy.SelectedItem); switch (cbErrorsStrategy.Items.IndexOf(cbErrorsStrategy.SelectedItem)) { case 0: MainForm.ErrorsManager.Strategy = ErrorsStrategy.FirstOnly; break; case 1: MainForm.ErrorsManager.Strategy = ErrorsStrategy.FirstSemanticAndSyntax; break; } /*switch (cbErrorsStrategy.Items.IndexOf(cbErrorsStrategy.SelectedItem)) * { * case 0: * MainForm.ErrorsManager.Strategy = ErrorsStrategy.All; * break; * case 1: * MainForm.ErrorsManager.Strategy = ErrorsStrategy.FirstOnly; * break; * case 2: * MainForm.ErrorsManager.Strategy = ErrorsStrategy.FirstSemanticAndSyntax; * break; * } */ UsOpt.PauseInRunModeIfConsole = cbPauseInRunModeIfConsole.Checked; MainForm.UpdateUserOptions(); MainForm.PlayPauseButtonsVisibleInPanel = cbShowDebugPlayPauseButtons.Checked; alreadyShown = false; WorkbenchServiceFactory.OptionsService.SaveOptions(); //this.Enabled = true; break; case OptionsContentAction.Cancel: alreadyShown = false; break; } }
internal void Action(IOptionsContent content, OptionsContentAction action) { content.Action(action); if (action == OptionsContentAction.Show) showedContent.Add(content); }
public void Action(OptionsContentAction action) { PascalABCCompiler.CompilerOptions CompOpt = WorkbenchServiceFactory.BuildService.CompilerOptions; UserOptions opt = MainForm.UserOptions; switch (action) { case OptionsContentAction.Show: //comboBox1.SelectedItem = comboBox1.Items[0]; if (!alreadyShown) { comboBox1.Items.Clear(); comboBox1.Items.Add(PascalABCCompiler.StringResources.Get("VP_MF_AT_CONSOLE")); comboBox1.Items.Add(PascalABCCompiler.StringResources.Get("VP_MF_AT_WINDOWS")); comboBox1.Items.Add(PascalABCCompiler.StringResources.Get("VP_MF_AT_DLL")); switch (CompOpt.OutputFileType) { case PascalABCCompiler.CompilerOptions.OutputType.ConsoleApplicaton: comboBox1.SelectedItem = comboBox1.Items[0]; break; case PascalABCCompiler.CompilerOptions.OutputType.WindowsApplication: comboBox1.SelectedItem = comboBox1.Items[1]; break; case PascalABCCompiler.CompilerOptions.OutputType.ClassLibrary: comboBox1.SelectedItem = comboBox1.Items[2]; break; } checkBox1.Checked = CompOpt.Debug; cbDeleteExe.Checked = opt.DeleteEXEAfterExecute; cbDeletePdb.Checked = opt.DeletePDBAfterExecute; cbUseOutputDirectory.Checked = opt.UseOutputDirectory; cbUseOutputDirectory_CheckedChanged(null, null); tbOutputDirectory.Text = opt.OutputDirectory; cbUseDllForSystemUnits.Checked = opt.UseDllForSystemUnits; alreadyShown = true; } break; case OptionsContentAction.Ok: /*switch (comboBox1.Items.IndexOf(comboBox1.SelectedItem)) * { * case 0: * CompOpt.OutputFileType = PascalABCCompiler.CompilerOptions.OutputType.ConsoleApplicaton; * break; * case 1: * CompOpt.OutputFileType = PascalABCCompiler.CompilerOptions.OutputType.WindowsApplication; * break; * case 2: * CompOpt.OutputFileType = PascalABCCompiler.CompilerOptions.OutputType.ClassLibrary; * break; * }*/ CompOpt.Debug = checkBox1.Checked; MainForm.SelectAppType(CompOpt.OutputFileType); opt.DeleteEXEAfterExecute = cbDeleteExe.Checked; opt.DeletePDBAfterExecute = cbDeletePdb.Checked; if (!Directory.Exists(tbOutputDirectory.Text)) { try { Directory.CreateDirectory(tbOutputDirectory.Text); } catch (Exception ex) { MessageBox.Show(ex.Message, PascalABCCompiler.StringResources.Get("!ERROR_ON_CREATE_DIRECTORY"), MessageBoxButtons.OK, MessageBoxIcon.Error); ActiveControl = tbOutputDirectory; return; } } opt.UseOutputDirectory = cbUseOutputDirectory.Checked; opt.OutputDirectory = tbOutputDirectory.Text; opt.UseDllForSystemUnits = cbUseDllForSystemUnits.Checked; if (opt.UseOutputDirectory) { WorkbenchStorage.StandartDirectories[Constants.OutputDirectoryIdent] = opt.OutputDirectory; } else { WorkbenchStorage.StandartDirectories[Constants.OutputDirectoryIdent] = null; } alreadyShown = false; WorkbenchServiceFactory.OptionsService.SaveOptions(); break; case OptionsContentAction.Cancel: alreadyShown = false; break; } }
public void Action(OptionsContentAction action) { switch (action) { case OptionsContentAction.Show: if (!alreadyShown) { languageSelect.SelectedItem = PascalABCCompiler.StringResourcesLanguage.CurrentLanguageName; cbSaveFilesIfComilationOk.Checked = MainForm.UserOptions.SaveSourceFilesIfComilationOk; cbPauseInRunModeIfConsole.Checked = MainForm.UserOptions.PauseInRunModeIfConsole; cbErrorsStrategy.Items.Clear(); //cbErrorsStrategy.Items.Add(PascalABCCompiler.StringResources.Get(strprefix + "ES_ALL")); cbErrorsStrategy.Items.Add(PascalABCCompiler.StringResources.Get(strprefix + "ES_FIRSTONLY")); cbErrorsStrategy.Items.Add(PascalABCCompiler.StringResources.Get(strprefix + "ES_FIRSTSEMANTICANDSYNTAX")); switch (MainForm.ErrorsManager.Strategy) { /*case ErrorsStrategy.All: cbErrorsStrategy.SelectedItem = cbErrorsStrategy.Items[1]; break;*/ case ErrorsStrategy.FirstOnly: cbErrorsStrategy.SelectedItem = cbErrorsStrategy.Items[0]; break; case ErrorsStrategy.FirstSemanticAndSyntax: cbErrorsStrategy.SelectedItem = cbErrorsStrategy.Items[1]; break; default: cbErrorsStrategy.SelectedItem = cbErrorsStrategy.Items[1]; break; } cbShowDebugPlayPauseButtons.Checked = MainForm.PlayPauseButtonsVisibleInPanel; alreadyShown = true; } break; case OptionsContentAction.Ok: UserOptions UsOpt = MainForm.UserOptions; UsOpt.SaveSourceFilesIfComilationOk = cbSaveFilesIfComilationOk.Checked; MainForm.ErrorsManager.Strategy = (ErrorsStrategy)cbErrorsStrategy.Items.IndexOf(cbErrorsStrategy.SelectedItem); switch (cbErrorsStrategy.Items.IndexOf(cbErrorsStrategy.SelectedItem)) { case 0: MainForm.ErrorsManager.Strategy = ErrorsStrategy.FirstOnly; break; case 1: MainForm.ErrorsManager.Strategy = ErrorsStrategy.FirstSemanticAndSyntax; break; } /*switch (cbErrorsStrategy.Items.IndexOf(cbErrorsStrategy.SelectedItem)) { case 0: MainForm.ErrorsManager.Strategy = ErrorsStrategy.All; break; case 1: MainForm.ErrorsManager.Strategy = ErrorsStrategy.FirstOnly; break; case 2: MainForm.ErrorsManager.Strategy = ErrorsStrategy.FirstSemanticAndSyntax; break; } */ UsOpt.PauseInRunModeIfConsole = cbPauseInRunModeIfConsole.Checked; MainForm.UpdateUserOptions(); MainForm.PlayPauseButtonsVisibleInPanel = cbShowDebugPlayPauseButtons.Checked; alreadyShown = false; WorkbenchServiceFactory.OptionsService.SaveOptions(); //this.Enabled = true; break; case OptionsContentAction.Cancel: alreadyShown = false; break; } }
public void Action(OptionsContentAction action) { switch (action) { case OptionsContentAction.Show: if (!alreadyShown) { cbShowLinesNum.Checked = MainForm.UserOptions.ShowLineNums; cbEnableFolding.Checked = MainForm.UserOptions.EnableFolding; // SSM 4.09.08 cbShowMathBracket.Checked = MainForm.UserOptions.ShowMathBraket; cbConvertTabsToSpaces.Checked = MainForm.UserOptions.ConverTabsToSpaces; cbEnableMatchOperBrackets.Checked = MainForm.UserOptions.HighlightOperatorBrackets; nudTabIndent.Value = MainForm.UserOptions.TabIndent; cbSkipStakTraceItemIfSourceFileInSystemDirectory.Checked = !MainForm.UserOptions.SkipStakTraceItemIfSourceFileInSystemDirectory; //cbErrorPos.Items.Clear(); //AddcbErrorPosItem(SourceLocationAction.GotoBeg, strprefix + "EP_BEGIN"); //AddcbErrorPosItem(SourceLocationAction.GotoEnd, strprefix + "EP_END"); //AddcbErrorPosItem(SourceLocationAction.SelectAndGotoBeg, strprefix + "EP_SELECTBEGIN"); //AddcbErrorPosItem(SourceLocationAction.SelectAndGotoEnd, strprefix + "EP_SELECTEND"); cbEditorFontSize.SelectedItem = null; foreach (int size in cbEditorFontSize.Items) if (size == MainForm.UserOptions.EditorFontSize) { cbEditorFontSize.SelectedItem = size; break; } if (cbEditorFontSize.SelectedItem == null) { cbEditorFontSize.Items.Add(MainForm.UserOptions.EditorFontSize); cbEditorFontSize.SelectedItem = MainForm.UserOptions.EditorFontSize; } /*if (MainForm.UserOptions.CurrentFontFamily != null) { MainForm.CurrentSyntaxEditor.TextEditor.Font = new Font(new FontFamily(MainForm.UserOptions.CurrentFontFamily),MainForm.CurrentSyntaxEditor.TextEditor.Font.Size); }*/ fcbFont.Populate(false, MainForm.CurrentSyntaxEditor.TextEditor.Font); alreadyShown = true; } break; case OptionsContentAction.Ok: MainForm.UserOptions.ConverTabsToSpaces = cbConvertTabsToSpaces.Checked; MainForm.UserOptions.TabIndent = (int)nudTabIndent.Value; MainForm.UserOptions.ShowLineNums = cbShowLinesNum.Checked; MainForm.UserOptions.EnableFolding = cbEnableFolding.Checked; // SSM 4.09.08 MainForm.UserOptions.ShowMathBraket = cbShowMathBracket.Checked; MainForm.UserOptions.HighlightOperatorBrackets = cbEnableMatchOperBrackets.Checked; MainForm.ErrorCursorPosStrategy = SourceLocationAction.GotoBeg;//(SourceLocationAction)(cbErrorPos.SelectedItem as ObjectLocalisator).Value; if (fcbFont.SelectedItem != null) { MainForm.CurrentSyntaxEditor.TextEditor.Font = new Font(new FontFamily((string)fcbFont.SelectedItem),MainForm.CurrentSyntaxEditor.TextEditor.Font.Size); MainForm.UserOptions.CurrentFontFamily = fcbFont.SelectedItem as string; } MainForm.UserOptions.EditorFontSize = Convert.ToInt32(cbEditorFontSize.Text); MainForm.UserOptions.SkipStakTraceItemIfSourceFileInSystemDirectory = !cbSkipStakTraceItemIfSourceFileInSystemDirectory.Checked; MainForm.UpdateUserOptions(); WorkbenchServiceFactory.OptionsService.SaveOptions(); alreadyShown = false; break; case OptionsContentAction.Cancel: alreadyShown = false; break; } }