diff --git a/Crypto Notepad/App.config b/Crypto Notepad/App.config index e079acc..af4c303 100644 --- a/Crypto Notepad/App.config +++ b/Crypto Notepad/App.config @@ -84,6 +84,9 @@ False + + Enable + diff --git a/Crypto Notepad/MainForm.cs b/Crypto Notepad/MainForm.cs index 978907a..cc87b8b 100644 --- a/Crypto Notepad/MainForm.cs +++ b/Crypto Notepad/MainForm.cs @@ -591,6 +591,14 @@ private void MainWindow_Activated(object sender, EventArgs e) CustomRTB.BackColor = ps.RichBackColor; BackColor = ps.RichBackColor; + if (ps.InserKey == "Disable") + { + insertToolStripMenuItem.ShortcutKeys = Keys.Insert; + } + else + { + insertToolStripMenuItem.ShortcutKeys = Keys.None; + } if (ps.SendTo) { SendToShortcut(); @@ -698,6 +706,14 @@ private void MainWindow_Load(object sender, EventArgs e) CustomRTB.WordWrap = ps.RichWrap; ToolbarPanel.Visible = ps.ShowToolbar; + if (ps.InserKey == "Disable") + { + insertToolStripMenuItem.ShortcutKeys = Keys.Insert; + } + else + { + insertToolStripMenuItem.ShortcutKeys = Keys.None; + } if (ps.ColoredToolbar) { ToolbarPanel.BackColor = ps.RichBackColor; diff --git a/Crypto Notepad/Properties/Settings.Designer.cs b/Crypto Notepad/Properties/Settings.Designer.cs index 061ca8f..5d67073 100644 --- a/Crypto Notepad/Properties/Settings.Designer.cs +++ b/Crypto Notepad/Properties/Settings.Designer.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // Этот код создан программой. // Исполняемая версия:4.0.30319.42000 @@ -346,5 +346,27 @@ public bool ColoredToolbar { this["ColoredToolbar"] = value; } } + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))] + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + set { + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("Enable")] + public string InserKey { + get { + return ((string)(this["InserKey"])); + } + set { + this["InserKey"] = value; + } + } } } diff --git a/Crypto Notepad/Properties/Settings.settings b/Crypto Notepad/Properties/Settings.settings index 2746c6c..1717c44 100644 --- a/Crypto Notepad/Properties/Settings.settings +++ b/Crypto Notepad/Properties/Settings.settings @@ -1,4 +1,4 @@ - + @@ -77,5 +77,8 @@ False + + Enable + \ No newline at end of file diff --git a/Crypto Notepad/SettingsForm.Designer.cs b/Crypto Notepad/SettingsForm.Designer.cs index 3c29ee8..fb54b8a 100644 --- a/Crypto Notepad/SettingsForm.Designer.cs +++ b/Crypto Notepad/SettingsForm.Designer.cs @@ -1,4 +1,4 @@ -namespace Crypto_Notepad +namespace Crypto_Notepad { partial class SettingsForm { @@ -66,6 +66,8 @@ private void InitializeComponent() this.HashLabel = new System.Windows.Forms.Label(); this.ResetSettingsButton = new System.Windows.Forms.Button(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.InsertKeyLabel = new System.Windows.Forms.Label(); + this.InserKeyComboBox = new System.Windows.Forms.ComboBox(); this.SettingsTabControl.SuspendLayout(); this.EditorTabPage.SuspendLayout(); this.ApplicationTabPage.SuspendLayout(); @@ -468,6 +470,26 @@ private void InitializeComponent() this.ResetSettingsButton.UseVisualStyleBackColor = true; this.ResetSettingsButton.Click += new System.EventHandler(this.ResetSettingsButton_Click); // + // InsertKeyLabel + // + this.InsertKeyLabel.AutoSize = true; + this.InsertKeyLabel.Location = new System.Drawing.Point(9, 165); + this.InsertKeyLabel.Name = "InsertKeyLabel"; + this.InsertKeyLabel.Size = new System.Drawing.Size(58, 15); + this.InsertKeyLabel.TabIndex = 13; + this.InsertKeyLabel.Text = "Insert key"; + // + // InserKeyComboBox + // + this.InserKeyComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.InserKeyComboBox.FormattingEnabled = true; + this.InserKeyComboBox.Items.AddRange(new object[] { + "Enable", + "Disable"}); + this.InserKeyComboBox.Location = new System.Drawing.Point(137, 165); + this.InserKeyComboBox.Name = "InserKeyComboBox"; + this.InserKeyComboBox.Size = new System.Drawing.Size(100, 23); + this.InserKeyComboBox.TabIndex = 14; // SettingsForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -535,5 +557,6 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox MenuIconsCheckBox; private System.Windows.Forms.TabPage IntegrationTabPage; private System.Windows.Forms.CheckBox ToolbarColorCheckBox; + private System.Windows.Forms.Label InsertKeyLabel; } } \ No newline at end of file diff --git a/Crypto Notepad/SettingsForm.cs b/Crypto Notepad/SettingsForm.cs index 98a7f34..a9e10d4 100644 --- a/Crypto Notepad/SettingsForm.cs +++ b/Crypto Notepad/SettingsForm.cs @@ -1,4 +1,4 @@ -using Microsoft.Win32; +using Microsoft.Win32; using System; using System.Drawing; using System.Reflection; @@ -55,6 +55,7 @@ private void SetSettings(string value) ps.MenuIntegrate = IntegrateCheckBox.Checked; ps.MenuIcons = MenuIconsCheckBox.Checked; ps.ColoredToolbar = ToolbarColorCheckBox.Checked; + ps.InserKey = InserKeyComboBox.Text; ps.Save(); PublicVar.settingsChanged = true; @@ -77,6 +78,7 @@ private void SetSettings(string value) IntegrateCheckBox.Checked = false; MenuIconsCheckBox.Checked = false; ToolbarColorCheckBox.Checked = false; + InserKeyComboBox.Text = "Enable"; } } @@ -175,6 +177,7 @@ private void SettingsForm_Load(object sender, EventArgs e) IntegrateCheckBox.Checked = ps.MenuIntegrate; MenuIconsCheckBox.Checked = ps.MenuIcons; ToolbarColorCheckBox.Checked = ps.ColoredToolbar; + InserKeyComboBox.Text = ps.InserKey; if (!ps.ShowToolbar) {