From 3525b7b15e00bfa83e4d85245ef6c436e4eecec3 Mon Sep 17 00:00:00 2001 From: Mikhalkovich Stanislav Date: Sat, 3 Aug 2019 14:17:02 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=BF=D1=86=D0=B8=D1=8F=20"=D0=A0=D0=B5?= =?UTF-8?q?=D0=B6=D0=B8=D0=BC=20=D0=B0=D0=B2=D1=82=D0=BE=D0=B7=D0=B0=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D1=88=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=BA=D0=BE=D0=B4?= =?UTF-8?q?=D0=B0=20=D0=B2=D0=BA=D0=BB=D1=8E=D1=87=D0=B5=D0=BD=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=20=D0=B7=D0=B0=D0=BF=D1=83=D1=81=D0=BA=D0=B5"=20?= =?UTF-8?q?=D0=B2=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9=D0=BA=D0=B0?= =?UTF-8?q?=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PluginsSupport/Interfaces.cs | 1 + VisualPascalABCNET/Form1.cs | 6 +- .../OptionsContent/EditorOptionsContent.cs | 4 +- .../ViewOptionsContent.Designer.cs | 226 ++++++++++-------- .../OptionsContent/ViewOptionsContent.cs | 2 + .../OptionsContent/ViewOptionsContent.resx | 4 +- VisualPascalABCNET/UserOptions.cs | 13 +- .../Workbench/OptionsManager.cs | 17 +- bin/Lng/Eng/VisualPascalABCNET.dat | 1 + bin/Lng/Rus/VisualPascalABCNET.dat | 1 + 10 files changed, 156 insertions(+), 119 deletions(-) diff --git a/PluginsSupport/Interfaces.cs b/PluginsSupport/Interfaces.cs index 70d00ce01..648fba8d1 100644 --- a/PluginsSupport/Interfaces.cs +++ b/PluginsSupport/Interfaces.cs @@ -240,6 +240,7 @@ namespace VisualPascalABCPlugins bool HighlightOperatorBrackets { get; set; } bool UseDllForSystemUnits { get; set; } bool PABCDllChecked { get; set; } + bool AutoInsertCodeIsEnabledOnStartup { get; set; } } public interface IListItem diff --git a/VisualPascalABCNET/Form1.cs b/VisualPascalABCNET/Form1.cs index 31727fe59..492ca9e17 100644 --- a/VisualPascalABCNET/Form1.cs +++ b/VisualPascalABCNET/Form1.cs @@ -370,9 +370,9 @@ namespace VisualPascalABC private void Form1_Load(object sender, EventArgs e) { - // Автовставка кода по умолчанию включена - tsAutoInsertCode.Checked = true; - mAUTOINSERTToolStripMenuItem.Checked = true; + // Автовставка кода по умолчанию включена. Отключил это - теперь сохраняется в настройках! + //tsAutoInsertCode.Checked = true; + //mAUTOINSERTToolStripMenuItem.Checked = true; //CurrentCodeFileDocument.TextEditor.ActiveTextAreaControl.TextArea.KeyEventHandler += TextArea_KeyEventHandler; diff --git a/VisualPascalABCNET/OptionsContent/EditorOptionsContent.cs b/VisualPascalABCNET/OptionsContent/EditorOptionsContent.cs index 8f46694c0..64812aac0 100644 --- a/VisualPascalABCNET/OptionsContent/EditorOptionsContent.cs +++ b/VisualPascalABCNET/OptionsContent/EditorOptionsContent.cs @@ -78,7 +78,7 @@ namespace VisualPascalABC.OptionsContent cbConvertTabsToSpaces.Checked = MainForm.UserOptions.ConverTabsToSpaces; cbEnableMatchOperBrackets.Checked = MainForm.UserOptions.HighlightOperatorBrackets; nudTabIndent.Value = MainForm.UserOptions.TabIndent; - cbSkipStakTraceItemIfSourceFileInSystemDirectory.Checked = !MainForm.UserOptions.SkipStakTraceItemIfSourceFileInSystemDirectory; + cbSkipStakTraceItemIfSourceFileInSystemDirectory.Checked = !MainForm.UserOptions.SkipStackTraceItemIfSourceFileInSystemDirectory; //cbErrorPos.Items.Clear(); //AddcbErrorPosItem(SourceLocationAction.GotoBeg, strprefix + "EP_BEGIN"); //AddcbErrorPosItem(SourceLocationAction.GotoEnd, strprefix + "EP_END"); @@ -119,7 +119,7 @@ namespace VisualPascalABC.OptionsContent MainForm.UserOptions.CurrentFontFamily = fcbFont.SelectedItem as string; } MainForm.UserOptions.EditorFontSize = Convert.ToInt32(cbEditorFontSize.Text); - MainForm.UserOptions.SkipStakTraceItemIfSourceFileInSystemDirectory = !cbSkipStakTraceItemIfSourceFileInSystemDirectory.Checked; + MainForm.UserOptions.SkipStackTraceItemIfSourceFileInSystemDirectory = !cbSkipStakTraceItemIfSourceFileInSystemDirectory.Checked; MainForm.UpdateUserOptions(); WorkbenchServiceFactory.OptionsService.SaveOptions(); alreadyShown = false; diff --git a/VisualPascalABCNET/OptionsContent/ViewOptionsContent.Designer.cs b/VisualPascalABCNET/OptionsContent/ViewOptionsContent.Designer.cs index 03d4ea9cc..b45fb2d01 100644 --- a/VisualPascalABCNET/OptionsContent/ViewOptionsContent.Designer.cs +++ b/VisualPascalABCNET/OptionsContent/ViewOptionsContent.Designer.cs @@ -28,111 +28,126 @@ /// private void InitializeComponent() { - this.cbSaveFilesIfComilationOk = new System.Windows.Forms.CheckBox(); - this.cbPauseInRunModeIfConsole = new System.Windows.Forms.CheckBox(); - this.cbShowDebugPlayPauseButtons = new System.Windows.Forms.CheckBox(); - this.cbErrorsStrategy = new System.Windows.Forms.ComboBox(); - this.label2 = new System.Windows.Forms.Label(); - this.label1 = new System.Windows.Forms.Label(); - this.languageSelect = new System.Windows.Forms.ComboBox(); - this.SuspendLayout(); - // - // cbSaveFilesIfComilationOk - // - this.cbSaveFilesIfComilationOk.AutoSize = true; - this.cbSaveFilesIfComilationOk.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; - this.cbSaveFilesIfComilationOk.Checked = true; - this.cbSaveFilesIfComilationOk.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbSaveFilesIfComilationOk.Location = new System.Drawing.Point(7, 128); - this.cbSaveFilesIfComilationOk.Name = "cbSaveFilesIfComilationOk"; - this.cbSaveFilesIfComilationOk.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.cbSaveFilesIfComilationOk.Size = new System.Drawing.Size(204, 17); - this.cbSaveFilesIfComilationOk.TabIndex = 25; - this.cbSaveFilesIfComilationOk.Text = "SAVE_FILES_IF_COMPILATOIN_OK"; - this.cbSaveFilesIfComilationOk.UseVisualStyleBackColor = true; - // - // cbPauseInRunModeIfConsole - // - this.cbPauseInRunModeIfConsole.AutoSize = true; - this.cbPauseInRunModeIfConsole.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; - this.cbPauseInRunModeIfConsole.Checked = true; - this.cbPauseInRunModeIfConsole.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbPauseInRunModeIfConsole.Location = new System.Drawing.Point(7, 105); - this.cbPauseInRunModeIfConsole.Name = "cbPauseInRunModeIfConsole"; - this.cbPauseInRunModeIfConsole.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.cbPauseInRunModeIfConsole.Size = new System.Drawing.Size(220, 17); - this.cbPauseInRunModeIfConsole.TabIndex = 24; - this.cbPauseInRunModeIfConsole.Text = "PASUSE_IN_RUNMODE_IF_CONSOLE"; - this.cbPauseInRunModeIfConsole.UseVisualStyleBackColor = true; - // - // cbShowDebugPlayPauseButtons - // - this.cbShowDebugPlayPauseButtons.AutoSize = true; - this.cbShowDebugPlayPauseButtons.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; - this.cbShowDebugPlayPauseButtons.Checked = true; - this.cbShowDebugPlayPauseButtons.CheckState = System.Windows.Forms.CheckState.Checked; - this.cbShowDebugPlayPauseButtons.Location = new System.Drawing.Point(7, 151); - this.cbShowDebugPlayPauseButtons.Name = "cbShowDebugPlayPauseButtons"; - this.cbShowDebugPlayPauseButtons.RightToLeft = System.Windows.Forms.RightToLeft.Yes; - this.cbShowDebugPlayPauseButtons.Size = new System.Drawing.Size(237, 17); - this.cbShowDebugPlayPauseButtons.TabIndex = 23; - this.cbShowDebugPlayPauseButtons.Text = "SHOW_DEBUG_PLAY_PAUSE_BUTTONS"; - this.cbShowDebugPlayPauseButtons.UseVisualStyleBackColor = true; - this.cbShowDebugPlayPauseButtons.Visible = false; - this.cbShowDebugPlayPauseButtons.CheckedChanged += new System.EventHandler(this.cbShowDebugPlayPauseButtons_CheckedChanged); - // - // cbErrorsStrategy - // - this.cbErrorsStrategy.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.cbErrorsStrategy.FormattingEnabled = true; - this.cbErrorsStrategy.Location = new System.Drawing.Point(7, 66); - this.cbErrorsStrategy.Name = "cbErrorsStrategy"; - this.cbErrorsStrategy.Size = new System.Drawing.Size(284, 21); - this.cbErrorsStrategy.TabIndex = 21; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(4, 50); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(117, 13); - this.label2.TabIndex = 20; - this.label2.Text = "ERRORS_STRATEGY"; - // - // label1 - // - this.label1.AutoSize = true; - this.label1.Location = new System.Drawing.Point(5, 5); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(66, 13); - this.label1.TabIndex = 19; - this.label1.Text = "LANGUAGE"; - // - // languageSelect - // - this.languageSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.languageSelect.FormattingEnabled = true; - this.languageSelect.Location = new System.Drawing.Point(7, 21); - this.languageSelect.Name = "languageSelect"; - this.languageSelect.Size = new System.Drawing.Size(195, 21); - this.languageSelect.TabIndex = 18; - this.languageSelect.SelectedIndexChanged += new System.EventHandler(this.languageSelect_SelectedIndexChanged); - // - // ViewOptionsContent - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.Controls.Add(this.cbSaveFilesIfComilationOk); - this.Controls.Add(this.cbPauseInRunModeIfConsole); - this.Controls.Add(this.cbShowDebugPlayPauseButtons); - this.Controls.Add(this.cbErrorsStrategy); - this.Controls.Add(this.label2); - this.Controls.Add(this.label1); - this.Controls.Add(this.languageSelect); - this.Name = "ViewOptionsContent"; - this.Size = new System.Drawing.Size(495, 246); - this.ResumeLayout(false); - this.PerformLayout(); + this.cbSaveFilesIfComilationOk = new System.Windows.Forms.CheckBox(); + this.cbPauseInRunModeIfConsole = new System.Windows.Forms.CheckBox(); + this.cbShowDebugPlayPauseButtons = new System.Windows.Forms.CheckBox(); + this.cbErrorsStrategy = new System.Windows.Forms.ComboBox(); + this.label2 = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.languageSelect = new System.Windows.Forms.ComboBox(); + this.cbAutoInsertCodeIsEnabledOnStartup = new System.Windows.Forms.CheckBox(); + this.SuspendLayout(); + // + // cbSaveFilesIfComilationOk + // + this.cbSaveFilesIfComilationOk.AutoSize = true; + this.cbSaveFilesIfComilationOk.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.cbSaveFilesIfComilationOk.Checked = true; + this.cbSaveFilesIfComilationOk.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbSaveFilesIfComilationOk.Location = new System.Drawing.Point(7, 128); + this.cbSaveFilesIfComilationOk.Name = "cbSaveFilesIfComilationOk"; + this.cbSaveFilesIfComilationOk.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.cbSaveFilesIfComilationOk.Size = new System.Drawing.Size(204, 17); + this.cbSaveFilesIfComilationOk.TabIndex = 25; + this.cbSaveFilesIfComilationOk.Text = "SAVE_FILES_IF_COMPILATOIN_OK"; + this.cbSaveFilesIfComilationOk.UseVisualStyleBackColor = true; + // + // cbPauseInRunModeIfConsole + // + this.cbPauseInRunModeIfConsole.AutoSize = true; + this.cbPauseInRunModeIfConsole.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.cbPauseInRunModeIfConsole.Checked = true; + this.cbPauseInRunModeIfConsole.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbPauseInRunModeIfConsole.Location = new System.Drawing.Point(7, 105); + this.cbPauseInRunModeIfConsole.Name = "cbPauseInRunModeIfConsole"; + this.cbPauseInRunModeIfConsole.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.cbPauseInRunModeIfConsole.Size = new System.Drawing.Size(220, 17); + this.cbPauseInRunModeIfConsole.TabIndex = 24; + this.cbPauseInRunModeIfConsole.Text = "PASUSE_IN_RUNMODE_IF_CONSOLE"; + this.cbPauseInRunModeIfConsole.UseVisualStyleBackColor = true; + // + // cbShowDebugPlayPauseButtons + // + this.cbShowDebugPlayPauseButtons.AutoSize = true; + this.cbShowDebugPlayPauseButtons.CheckAlign = System.Drawing.ContentAlignment.MiddleRight; + this.cbShowDebugPlayPauseButtons.Checked = true; + this.cbShowDebugPlayPauseButtons.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbShowDebugPlayPauseButtons.Location = new System.Drawing.Point(7, 174); + this.cbShowDebugPlayPauseButtons.Name = "cbShowDebugPlayPauseButtons"; + this.cbShowDebugPlayPauseButtons.RightToLeft = System.Windows.Forms.RightToLeft.Yes; + this.cbShowDebugPlayPauseButtons.Size = new System.Drawing.Size(237, 17); + this.cbShowDebugPlayPauseButtons.TabIndex = 23; + this.cbShowDebugPlayPauseButtons.Text = "SHOW_DEBUG_PLAY_PAUSE_BUTTONS"; + this.cbShowDebugPlayPauseButtons.UseVisualStyleBackColor = true; + this.cbShowDebugPlayPauseButtons.Visible = false; + this.cbShowDebugPlayPauseButtons.CheckedChanged += new System.EventHandler(this.cbShowDebugPlayPauseButtons_CheckedChanged); + // + // cbErrorsStrategy + // + this.cbErrorsStrategy.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbErrorsStrategy.FormattingEnabled = true; + this.cbErrorsStrategy.Location = new System.Drawing.Point(7, 66); + this.cbErrorsStrategy.Name = "cbErrorsStrategy"; + this.cbErrorsStrategy.Size = new System.Drawing.Size(284, 21); + this.cbErrorsStrategy.TabIndex = 21; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(4, 50); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(117, 13); + this.label2.TabIndex = 20; + this.label2.Text = "ERRORS_STRATEGY"; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(5, 5); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(66, 13); + this.label1.TabIndex = 19; + this.label1.Text = "LANGUAGE"; + // + // languageSelect + // + this.languageSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.languageSelect.FormattingEnabled = true; + this.languageSelect.Location = new System.Drawing.Point(7, 21); + this.languageSelect.Name = "languageSelect"; + this.languageSelect.Size = new System.Drawing.Size(195, 21); + this.languageSelect.TabIndex = 18; + this.languageSelect.SelectedIndexChanged += new System.EventHandler(this.languageSelect_SelectedIndexChanged); + // + // cbAutoInsertCodeIsEnabledOnStartup + // + this.cbAutoInsertCodeIsEnabledOnStartup.AutoSize = true; + this.cbAutoInsertCodeIsEnabledOnStartup.Checked = true; + this.cbAutoInsertCodeIsEnabledOnStartup.CheckState = System.Windows.Forms.CheckState.Checked; + this.cbAutoInsertCodeIsEnabledOnStartup.Location = new System.Drawing.Point(7, 151); + this.cbAutoInsertCodeIsEnabledOnStartup.Name = "cbAutoInsertCodeIsEnabledOnStartup"; + this.cbAutoInsertCodeIsEnabledOnStartup.Size = new System.Drawing.Size(353, 17); + this.cbAutoInsertCodeIsEnabledOnStartup.TabIndex = 26; + this.cbAutoInsertCodeIsEnabledOnStartup.Text = "AUTO_INSERT_CODE_IS_ENABLED_ON_STARTUP"; + this.cbAutoInsertCodeIsEnabledOnStartup.UseVisualStyleBackColor = true; + // + // ViewOptionsContent + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.Controls.Add(this.cbAutoInsertCodeIsEnabledOnStartup); + this.Controls.Add(this.cbSaveFilesIfComilationOk); + this.Controls.Add(this.cbPauseInRunModeIfConsole); + this.Controls.Add(this.cbShowDebugPlayPauseButtons); + this.Controls.Add(this.cbErrorsStrategy); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Controls.Add(this.languageSelect); + this.Name = "ViewOptionsContent"; + this.Size = new System.Drawing.Size(495, 246); + this.ResumeLayout(false); + this.PerformLayout(); + } #endregion @@ -144,5 +159,6 @@ private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label1; private System.Windows.Forms.ComboBox languageSelect; + private System.Windows.Forms.CheckBox cbAutoInsertCodeIsEnabledOnStartup; } } diff --git a/VisualPascalABCNET/OptionsContent/ViewOptionsContent.cs b/VisualPascalABCNET/OptionsContent/ViewOptionsContent.cs index 3b79153b6..7ce4cf6de 100644 --- a/VisualPascalABCNET/OptionsContent/ViewOptionsContent.cs +++ b/VisualPascalABCNET/OptionsContent/ViewOptionsContent.cs @@ -62,6 +62,7 @@ namespace VisualPascalABC.OptionsContent 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; @@ -71,6 +72,7 @@ namespace VisualPascalABC.OptionsContent 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)) { diff --git a/VisualPascalABCNET/OptionsContent/ViewOptionsContent.resx b/VisualPascalABCNET/OptionsContent/ViewOptionsContent.resx index 7080a7d11..1af7de150 100644 --- a/VisualPascalABCNET/OptionsContent/ViewOptionsContent.resx +++ b/VisualPascalABCNET/OptionsContent/ViewOptionsContent.resx @@ -112,9 +112,9 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file diff --git a/VisualPascalABCNET/UserOptions.cs b/VisualPascalABCNET/UserOptions.cs index 08be90bbd..0a641f623 100644 --- a/VisualPascalABCNET/UserOptions.cs +++ b/VisualPascalABCNET/UserOptions.cs @@ -32,12 +32,13 @@ namespace VisualPascalABC public bool EnableSmartIntellisense = false; public bool ShowQuickClassBrowserPanel = false; public bool AllowCodeFormatting = false; - public bool SkipStakTraceItemIfSourceFileInSystemDirectory = true; + public bool SkipStackTraceItemIfSourceFileInSystemDirectory = true; public bool AlwaysAttachDebuggerAtStart = false; public string CurrentFontFamily = "Courier New"; public bool HighlightOperatorBrackets=true; public bool UseDllForSystemUnits = true; public bool PABCDllChecked = false; + public bool AutoInsertCodeIsEnabledOnStartup = true; public bool DeleteEXEAfterExecute { @@ -195,6 +196,12 @@ namespace VisualPascalABC set { SaveSourceFilesIfComilationOk = value; } } + bool VisualPascalABCPlugins.IUserOptions.AutoInsertCodeIsEnabledOnStartup + { + get { return AutoInsertCodeIsEnabledOnStartup; } + set { AutoInsertCodeIsEnabledOnStartup = value; } + } + bool VisualPascalABCPlugins.IUserOptions.ShowCompletionInfoByGroup { get { return ShowCompletionInfoByGroup; } @@ -221,8 +228,8 @@ namespace VisualPascalABC bool VisualPascalABCPlugins.IUserOptions.SkipStakTraceItemIfSourceFileInSystemDirectory { - get { return SkipStakTraceItemIfSourceFileInSystemDirectory; } - set { SkipStakTraceItemIfSourceFileInSystemDirectory = value; } + get { return SkipStackTraceItemIfSourceFileInSystemDirectory; } + set { SkipStackTraceItemIfSourceFileInSystemDirectory = value; } } int VisualPascalABCPlugins.IUserOptions.TabIndent diff --git a/VisualPascalABCNET/Workbench/OptionsManager.cs b/VisualPascalABCNET/Workbench/OptionsManager.cs index 5e16e68ad..eacec518f 100644 --- a/VisualPascalABCNET/Workbench/OptionsManager.cs +++ b/VisualPascalABCNET/Workbench/OptionsManager.cs @@ -58,12 +58,13 @@ namespace VisualPascalABC private string OptionsItemNameDockLeftPortion = "DockLeftPortion"; private string OptionsItemNameDockRightPortion = "DockRightPortion"; private string OptionsItemNameShowQuickClassBrowserPanel = "ShowQuickClassBrowserPanel"; - private string OptionsItemNameSkipStakTraceItemIfSourceFileInSystemDirectory = "SkipStakTraceItemIfSourceFileInSystemDirectory"; + private string OptionsItemNameSkipStackTraceItemIfSourceFileInSystemDirectory = "SkipStakTraceItemIfSourceFileInSystemDirectory"; private string OptionsItemNameShowFoundedNamesTab = "ShowFoundedNamesTab"; private string OptionsItemNameShowWatchTab = "ShowWatchTab"; private string OptionsItemNameShowLocalVarsTab = "ShowLocalVarsTab"; private string OptionsItemUseDllForSystemModules = "UseDllForSystemModules"; private string OptionsItemPABCDllChecked = "PABCDllChecked"; + private string OptionsItemNameAutoInsertCode = "AutoInsertCodeIsEnabledOnStartup"; bool _mainFormWindowStateMaximized = false; @@ -155,6 +156,13 @@ namespace VisualPascalABC UserOptions.EnableFolding = Convert.ToBoolean(value); if ((value = (string)Options[OptionsItemNameSaveSourceFilesIfComilationOk]) != null) UserOptions.SaveSourceFilesIfComilationOk = Convert.ToBoolean(value); + if ((value = (string)Options[OptionsItemNameAutoInsertCode]) != null) + { + UserOptions.AutoInsertCodeIsEnabledOnStartup = Convert.ToBoolean(value); + tsAutoInsertCode.Checked = UserOptions.AutoInsertCodeIsEnabledOnStartup; + mAUTOINSERTToolStripMenuItem.Checked = UserOptions.AutoInsertCodeIsEnabledOnStartup; + } + if ((value = (string)Options[OptionsItemNameMainFormTitle]) != null) MainFormText = value; if ((value = (string)Options[OptionsItemNameDeleteEXEAfterExecute]) != null) @@ -215,8 +223,8 @@ namespace VisualPascalABC UserOptions.DefaultSourceFileNameFormat = value; if ((value = (string)Options[OptionsItemNameAllowCodeCompletion]) != null) UserOptions.AllowCodeCompletion = Convert.ToBoolean(value); - if ((value = (string)Options[OptionsItemNameSkipStakTraceItemIfSourceFileInSystemDirectory]) != null) - UserOptions.SkipStakTraceItemIfSourceFileInSystemDirectory = Convert.ToBoolean(value); + if ((value = (string)Options[OptionsItemNameSkipStackTraceItemIfSourceFileInSystemDirectory]) != null) + UserOptions.SkipStackTraceItemIfSourceFileInSystemDirectory = Convert.ToBoolean(value); if ((value = (string)Options[OptionsItemNameCodeCompletionNamespaceVisibleRange]) != null) UserOptions.CodeCompletionNamespaceVisibleRange = Convert.ToInt32(value); if ((value = (string)Options[OptionsItemNameDockBottomPortion]) != null) @@ -278,7 +286,8 @@ namespace VisualPascalABC Options.Add(OptionsItemNameCodeCompletionNamespaceVisibleRange, UserOptions.CodeCompletionNamespaceVisibleRange); Options.Add(OptionsItemNameSaveSourceFilesIfComilationOk, UserOptions.SaveSourceFilesIfComilationOk); Options.Add(OptionsItemNameShowQuickClassBrowserPanel, UserOptions.ShowQuickClassBrowserPanel); - Options.Add(OptionsItemNameSkipStakTraceItemIfSourceFileInSystemDirectory, UserOptions.SkipStakTraceItemIfSourceFileInSystemDirectory); + Options.Add(OptionsItemNameSkipStackTraceItemIfSourceFileInSystemDirectory, UserOptions.SkipStackTraceItemIfSourceFileInSystemDirectory); + Options.Add(OptionsItemNameAutoInsertCode, UserOptions.AutoInsertCodeIsEnabledOnStartup); Options.Add(OptionsItemNameConvertTabsToSpaces, UserOptions.ConverTabsToSpaces); Options.Add(OptionsItemNameTabIdent, UserOptions.TabIndent); diff --git a/bin/Lng/Eng/VisualPascalABCNET.dat b/bin/Lng/Eng/VisualPascalABCNET.dat index 711f203b2..8e9bbe08b 100644 --- a/bin/Lng/Eng/VisualPascalABCNET.dat +++ b/bin/Lng/Eng/VisualPascalABCNET.dat @@ -364,6 +364,7 @@ EDITOR_OPTIONS=Editor SHOW_DEBUG_PLAY_PAUSE_BUTTONS=Show additional debug buttons PASUSE_IN_RUNMODE_IF_CONSOLE=Make pause after a console program ends execution SAVE_FILES_IF_COMPILATOIN_OK=Save files if compilation was successful +AUTO_INSERT_CODE_IS_ENABLED_ON_STARTUP=Code completion mode is enabled on startup %PREFIX%=VP_OC_EDITOROPTIONS_ NAME=Text Editor diff --git a/bin/Lng/Rus/VisualPascalABCNET.dat b/bin/Lng/Rus/VisualPascalABCNET.dat index c81b77fa2..fd92d2189 100644 --- a/bin/Lng/Rus/VisualPascalABCNET.dat +++ b/bin/Lng/Rus/VisualPascalABCNET.dat @@ -364,6 +364,7 @@ EDITOR_OPTIONS=Редактор SHOW_DEBUG_PLAY_PAUSE_BUTTONS=Показывать дополнительные кнопки управления отладкой PASUSE_IN_RUNMODE_IF_CONSOLE=Делать паузу после завершения консольной программы SAVE_FILES_IF_COMPILATOIN_OK=Сохранять файлы если компиляция прошла успешно +AUTO_INSERT_CODE_IS_ENABLED_ON_STARTUP=Режим автозавершения кода включён при запуске %PREFIX%=VP_OC_EDITOROPTIONS_ NAME=Редактор