This commit is contained in:
Alexander 2019-08-21 12:09:05 +03:00
parent 9bdec6b7ca
commit e0184d76db
6 changed files with 74 additions and 4 deletions

View file

@ -84,6 +84,9 @@
<setting name="ColoredToolbar" serializeAs="String">
<value>False</value>
</setting>
<setting name="InserKey" serializeAs="String">
<value>Enable</value>
</setting>
</Crypto_Notepad.Properties.Settings>
<EncryptPad.Properties.Settings>
<setting name="TopPosition" serializeAs="String">

View file

@ -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;

View file

@ -1,4 +1,4 @@
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
// <auto-generated>
// Этот код создан программой.
// Исполняемая версия: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;
}
}
}
}

View file

@ -1,4 +1,4 @@
<?xml version='1.0' encoding='utf-8'?>
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Crypto_Notepad.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
@ -77,5 +77,8 @@
<Setting Name="ColoredToolbar" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="InserKey" Provider="PortableSettingsProvider" Type="System.String" Scope="User">
<Value Profile="(Default)">Enable</Value>
</Setting>
</Settings>
</SettingsFile>

View file

@ -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;
}
}

View file

@ -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)
{