2019-07-28 23:53:15 +03:00
|
|
|
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt)
|
2015-06-02 22:52:35 +03:00
|
|
|
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
|
2015-05-14 22:35:07 +03:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
|
|
|
namespace VisualPascalABC
|
|
|
|
|
{
|
|
|
|
|
public class UserOptions : VisualPascalABCPlugins.IUserOptions
|
|
|
|
|
{
|
|
|
|
|
public bool RedirectConsoleIO = false;
|
|
|
|
|
public bool ShowLineNums = false;
|
|
|
|
|
public bool EnableFolding = false; // SSM 4.09.08
|
|
|
|
|
public bool ShowMathBraket = false;
|
|
|
|
|
public bool ConverTabsToSpaces = true;
|
2019-05-16 15:42:16 +03:00
|
|
|
public bool deleteEXEAfterExecute = false;
|
2015-05-14 22:35:07 +03:00
|
|
|
public bool deletePDBAfterExecute = true;
|
2019-08-18 00:16:39 +03:00
|
|
|
public bool UseOutputDirectory = true;
|
2015-05-14 22:35:07 +03:00
|
|
|
public string OutputDirectory = null;
|
|
|
|
|
public bool PauseInRunModeIfConsole = true;
|
|
|
|
|
public string DefaultSourceFileNameFormat = "Program{0}.pas";
|
|
|
|
|
public int TabIndent = 2;
|
|
|
|
|
public int EditorFontSize = 10;
|
|
|
|
|
public bool AllowCodeCompletion = true;
|
|
|
|
|
public bool CodeCompletionHint = true;
|
|
|
|
|
public bool CodeCompletionDot = true;
|
|
|
|
|
public bool CodeCompletionParams = true;
|
|
|
|
|
public bool SaveSourceFilesIfComilationOk = false;
|
|
|
|
|
public int CodeCompletionNamespaceVisibleRange = 3;
|
|
|
|
|
public int CursorTabCount = 2;
|
|
|
|
|
public bool ShowCompletionInfoByGroup = true;
|
|
|
|
|
public bool EnableSmartIntellisense = false;
|
|
|
|
|
public bool ShowQuickClassBrowserPanel = false;
|
2021-11-14 13:34:27 +03:00
|
|
|
public bool UseSemanticIntellisense = false;
|
2015-05-14 22:35:07 +03:00
|
|
|
public bool AllowCodeFormatting = false;
|
2019-08-03 14:17:02 +03:00
|
|
|
public bool SkipStackTraceItemIfSourceFileInSystemDirectory = true;
|
2015-05-14 22:35:07 +03:00
|
|
|
public bool AlwaysAttachDebuggerAtStart = false;
|
|
|
|
|
public string CurrentFontFamily = "Courier New";
|
|
|
|
|
public bool HighlightOperatorBrackets=true;
|
|
|
|
|
public bool UseDllForSystemUnits = true;
|
|
|
|
|
public bool PABCDllChecked = false;
|
2019-08-03 14:17:02 +03:00
|
|
|
public bool AutoInsertCodeIsEnabledOnStartup = true;
|
2015-05-14 22:35:07 +03:00
|
|
|
|
|
|
|
|
public bool DeleteEXEAfterExecute
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (ProjectFactory.Instance.CurrentProject != null)
|
|
|
|
|
return ProjectFactory.Instance.CurrentProject.DeleteEXE;
|
|
|
|
|
return deleteEXEAfterExecute;
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
deleteEXEAfterExecute = value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool DeletePDBAfterExecute
|
|
|
|
|
{
|
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
if (ProjectFactory.Instance.CurrentProject != null)
|
|
|
|
|
return ProjectFactory.Instance.CurrentProject.DeletePDB;
|
|
|
|
|
return deletePDBAfterExecute;
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
deletePDBAfterExecute = value;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#region IUserOptions Member
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.AllowCodeCompletion
|
|
|
|
|
{
|
|
|
|
|
get { return AllowCodeCompletion; }
|
|
|
|
|
set { AllowCodeCompletion = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.AllowCodeFormatting
|
|
|
|
|
{
|
|
|
|
|
get { return AllowCodeFormatting; }
|
|
|
|
|
set { AllowCodeFormatting = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.AlwaysAttachDebuggerAtStart
|
|
|
|
|
{
|
|
|
|
|
get { return AlwaysAttachDebuggerAtStart; }
|
|
|
|
|
set { AlwaysAttachDebuggerAtStart = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.CodeCompletionDot
|
|
|
|
|
{
|
|
|
|
|
get { return CodeCompletionDot; }
|
|
|
|
|
set { CodeCompletionDot = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.CodeCompletionHint
|
|
|
|
|
{
|
|
|
|
|
get { return CodeCompletionHint; }
|
|
|
|
|
set { CodeCompletionHint = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int VisualPascalABCPlugins.IUserOptions.CodeCompletionNamespaceVisibleRange
|
|
|
|
|
{
|
|
|
|
|
get { return CodeCompletionNamespaceVisibleRange; }
|
|
|
|
|
set { CodeCompletionNamespaceVisibleRange = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.CodeCompletionParams
|
|
|
|
|
{
|
|
|
|
|
get { return CodeCompletionParams; }
|
|
|
|
|
set { CodeCompletionParams = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.ConverTabsToSpaces
|
|
|
|
|
{
|
|
|
|
|
get { return ConverTabsToSpaces; }
|
|
|
|
|
set { ConverTabsToSpaces = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string VisualPascalABCPlugins.IUserOptions.CurrentFontFamily
|
|
|
|
|
{
|
|
|
|
|
get { return CurrentFontFamily; }
|
|
|
|
|
set { CurrentFontFamily = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int VisualPascalABCPlugins.IUserOptions.CursorTabCount
|
|
|
|
|
{
|
|
|
|
|
get { return CursorTabCount; }
|
|
|
|
|
set { CursorTabCount = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string VisualPascalABCPlugins.IUserOptions.DefaultSourceFileNameFormat
|
|
|
|
|
{
|
|
|
|
|
get { return DefaultSourceFileNameFormat; }
|
|
|
|
|
set { DefaultSourceFileNameFormat = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.DeleteEXEAfterExecute
|
|
|
|
|
{
|
|
|
|
|
get { return DeleteEXEAfterExecute; }
|
|
|
|
|
set { DeleteEXEAfterExecute = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.DeletePDBAfterExecute
|
|
|
|
|
{
|
|
|
|
|
get { return DeletePDBAfterExecute; }
|
|
|
|
|
set { DeletePDBAfterExecute = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int VisualPascalABCPlugins.IUserOptions.EditorFontSize
|
|
|
|
|
{
|
|
|
|
|
get { return EditorFontSize; }
|
|
|
|
|
set { EditorFontSize = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.EnableFolding
|
|
|
|
|
{
|
|
|
|
|
get { return EnableFolding; }
|
|
|
|
|
set { EnableFolding = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.EnableSmartIntellisense
|
|
|
|
|
{
|
|
|
|
|
get { return EnableSmartIntellisense; }
|
|
|
|
|
set { EnableSmartIntellisense = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.HighlightOperatorBrackets
|
|
|
|
|
{
|
|
|
|
|
get { return HighlightOperatorBrackets; }
|
|
|
|
|
set { HighlightOperatorBrackets = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
string VisualPascalABCPlugins.IUserOptions.OutputDirectory
|
|
|
|
|
{
|
|
|
|
|
get { return OutputDirectory; }
|
|
|
|
|
set { OutputDirectory = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.PauseInRunModeIfConsole
|
|
|
|
|
{
|
|
|
|
|
get { return PauseInRunModeIfConsole; }
|
|
|
|
|
set { PauseInRunModeIfConsole = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.RedirectConsoleIO
|
|
|
|
|
{
|
|
|
|
|
get { return RedirectConsoleIO; }
|
|
|
|
|
set { RedirectConsoleIO = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.SaveSourceFilesIfComilationOk
|
|
|
|
|
{
|
|
|
|
|
get { return SaveSourceFilesIfComilationOk; }
|
|
|
|
|
set { SaveSourceFilesIfComilationOk = value; }
|
|
|
|
|
}
|
|
|
|
|
|
2019-08-03 14:17:02 +03:00
|
|
|
bool VisualPascalABCPlugins.IUserOptions.AutoInsertCodeIsEnabledOnStartup
|
|
|
|
|
{
|
|
|
|
|
get { return AutoInsertCodeIsEnabledOnStartup; }
|
|
|
|
|
set { AutoInsertCodeIsEnabledOnStartup = value; }
|
|
|
|
|
}
|
|
|
|
|
|
2015-05-14 22:35:07 +03:00
|
|
|
bool VisualPascalABCPlugins.IUserOptions.ShowCompletionInfoByGroup
|
|
|
|
|
{
|
|
|
|
|
get { return ShowCompletionInfoByGroup; }
|
|
|
|
|
set { ShowCompletionInfoByGroup = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.ShowLineNums
|
|
|
|
|
{
|
|
|
|
|
get { return ShowLineNums; }
|
|
|
|
|
set { ShowLineNums = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.ShowMathBraket
|
|
|
|
|
{
|
|
|
|
|
get { return ShowMathBraket; }
|
|
|
|
|
set { ShowMathBraket = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.ShowQuickClassBrowserPanel
|
|
|
|
|
{
|
|
|
|
|
get { return ShowQuickClassBrowserPanel; }
|
|
|
|
|
set { ShowQuickClassBrowserPanel = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.SkipStakTraceItemIfSourceFileInSystemDirectory
|
|
|
|
|
{
|
2019-08-03 14:17:02 +03:00
|
|
|
get { return SkipStackTraceItemIfSourceFileInSystemDirectory; }
|
|
|
|
|
set { SkipStackTraceItemIfSourceFileInSystemDirectory = value; }
|
2015-05-14 22:35:07 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int VisualPascalABCPlugins.IUserOptions.TabIndent
|
|
|
|
|
{
|
|
|
|
|
get { return TabIndent; }
|
|
|
|
|
set { TabIndent = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.UseOutputDirectory
|
|
|
|
|
{
|
|
|
|
|
get { return UseOutputDirectory; }
|
|
|
|
|
set { UseOutputDirectory = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.UseDllForSystemUnits
|
|
|
|
|
{
|
|
|
|
|
get { return UseDllForSystemUnits; }
|
|
|
|
|
set { UseDllForSystemUnits = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool VisualPascalABCPlugins.IUserOptions.PABCDllChecked
|
|
|
|
|
{
|
|
|
|
|
get { return PABCDllChecked; }
|
|
|
|
|
set { PABCDllChecked = value; }
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-14 13:34:27 +03:00
|
|
|
bool VisualPascalABCPlugins.IUserOptions.UseSemanticIntellisense
|
|
|
|
|
{
|
|
|
|
|
get { return UseSemanticIntellisense; }
|
|
|
|
|
set { UseSemanticIntellisense = value; }
|
|
|
|
|
}
|
|
|
|
|
|
2015-05-14 22:35:07 +03:00
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|