mirror of
https://github.com/Crypto-Notepad/Crypto-Notepad.git
synced 2026-03-11 08:55:25 +00:00
Able to change visibility of all labels in status panel (except Ready label)
This commit is contained in:
parent
fe26894aff
commit
8708bf007f
6 changed files with 191 additions and 3 deletions
|
|
@ -129,6 +129,18 @@
|
|||
<setting name="singleInstance" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="statusPanelLength" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="statusPanelLines" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="statusPanelModified" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
<setting name="statusPanelSize" serializeAs="String">
|
||||
<value>True</value>
|
||||
</setting>
|
||||
</Crypto_Notepad.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
|
|
|
|||
|
|
@ -585,6 +585,10 @@ private void LoadSettings()
|
|||
statusPanel.ForeColor = settings.statusPanelFontColor;
|
||||
statusPanel.BackColor = settings.statusPanelBackColor;
|
||||
statusPanel.Visible = settings.statusPanelVisible;
|
||||
statusPanelLengthLabel.Visible = settings.statusPanelLength;
|
||||
statusPanelLinesLabel.Visible = settings.statusPanelLines;
|
||||
statusPanelModifiedLabel.Visible = settings.statusPanelModified;
|
||||
statusPanelSizeLabel.Visible = settings.statusPanelSize;
|
||||
richTextBox.WordWrap = settings.editorWrap;
|
||||
richTextBox.ForeColor = settings.editroForeColor;
|
||||
richTextBox.BackColor = settings.editorBackColor;
|
||||
|
|
|
|||
52
Crypto Notepad/Properties/Settings.Designer.cs
generated
52
Crypto Notepad/Properties/Settings.Designer.cs
generated
|
|
@ -530,5 +530,57 @@ public bool singleInstance {
|
|||
this["singleInstance"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool statusPanelLength {
|
||||
get {
|
||||
return ((bool)(this["statusPanelLength"]));
|
||||
}
|
||||
set {
|
||||
this["statusPanelLength"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool statusPanelLines {
|
||||
get {
|
||||
return ((bool)(this["statusPanelLines"]));
|
||||
}
|
||||
set {
|
||||
this["statusPanelLines"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool statusPanelModified {
|
||||
get {
|
||||
return ((bool)(this["statusPanelModified"]));
|
||||
}
|
||||
set {
|
||||
this["statusPanelModified"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Configuration.UserScopedSettingAttribute()]
|
||||
[global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("True")]
|
||||
public bool statusPanelSize {
|
||||
get {
|
||||
return ((bool)(this["statusPanelSize"]));
|
||||
}
|
||||
set {
|
||||
this["statusPanelSize"] = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -119,5 +119,17 @@
|
|||
<Setting Name="singleInstance" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="statusPanelLength" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="statusPanelLines" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="statusPanelModified" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
<Setting Name="statusPanelSize" Provider="PortableSettingsProvider" Type="System.Boolean" Scope="User">
|
||||
<Value Profile="(Default)">True</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
</SettingsFile>
|
||||
71
Crypto Notepad/SettingsForm.Designer.cs
generated
71
Crypto Notepad/SettingsForm.Designer.cs
generated
|
|
@ -65,6 +65,11 @@ private void InitializeComponent()
|
|||
this.hashAlgorithmLabel = new System.Windows.Forms.Label();
|
||||
this.keySizeComboBox = new System.Windows.Forms.ComboBox();
|
||||
this.statusPanelTabPage = new System.Windows.Forms.TabPage();
|
||||
this.statusPanelLabelsGroupBox = new System.Windows.Forms.GroupBox();
|
||||
this.statusPanelLengthCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.statusPanelSizeCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.statusPanelLinesCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.statusPanelModifiedCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.statusPanelVisibleCheckBox = new System.Windows.Forms.CheckBox();
|
||||
this.statusPanelBackColor = new System.Windows.Forms.Panel();
|
||||
this.statusPanelFontColor = new System.Windows.Forms.Panel();
|
||||
|
|
@ -92,6 +97,7 @@ private void InitializeComponent()
|
|||
this.integrationTabPage.SuspendLayout();
|
||||
this.encryptionTabPage.SuspendLayout();
|
||||
this.statusPanelTabPage.SuspendLayout();
|
||||
this.statusPanelLabelsGroupBox.SuspendLayout();
|
||||
this.toolbarTabPage.SuspendLayout();
|
||||
this.searchPanelTabPage.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
|
|
@ -513,6 +519,7 @@ private void InitializeComponent()
|
|||
//
|
||||
this.statusPanelTabPage.BackColor = System.Drawing.SystemColors.Window;
|
||||
this.statusPanelTabPage.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
|
||||
this.statusPanelTabPage.Controls.Add(this.statusPanelLabelsGroupBox);
|
||||
this.statusPanelTabPage.Controls.Add(this.statusPanelVisibleCheckBox);
|
||||
this.statusPanelTabPage.Controls.Add(this.statusPanelBackColor);
|
||||
this.statusPanelTabPage.Controls.Add(this.statusPanelFontColor);
|
||||
|
|
@ -525,6 +532,63 @@ private void InitializeComponent()
|
|||
this.statusPanelTabPage.TabIndex = 5;
|
||||
this.statusPanelTabPage.Text = "stat";
|
||||
//
|
||||
// statusPanelLabelsGroupBox
|
||||
//
|
||||
this.statusPanelLabelsGroupBox.Controls.Add(this.statusPanelLengthCheckBox);
|
||||
this.statusPanelLabelsGroupBox.Controls.Add(this.statusPanelSizeCheckBox);
|
||||
this.statusPanelLabelsGroupBox.Controls.Add(this.statusPanelLinesCheckBox);
|
||||
this.statusPanelLabelsGroupBox.Controls.Add(this.statusPanelModifiedCheckBox);
|
||||
this.statusPanelLabelsGroupBox.Location = new System.Drawing.Point(9, 96);
|
||||
this.statusPanelLabelsGroupBox.Name = "statusPanelLabelsGroupBox";
|
||||
this.statusPanelLabelsGroupBox.Size = new System.Drawing.Size(223, 129);
|
||||
this.statusPanelLabelsGroupBox.TabIndex = 8;
|
||||
this.statusPanelLabelsGroupBox.TabStop = false;
|
||||
this.statusPanelLabelsGroupBox.Text = "Status panel labels";
|
||||
//
|
||||
// statusPanelLengthCheckBox
|
||||
//
|
||||
this.statusPanelLengthCheckBox.AutoSize = true;
|
||||
this.statusPanelLengthCheckBox.Location = new System.Drawing.Point(6, 22);
|
||||
this.statusPanelLengthCheckBox.Name = "statusPanelLengthCheckBox";
|
||||
this.statusPanelLengthCheckBox.Size = new System.Drawing.Size(63, 19);
|
||||
this.statusPanelLengthCheckBox.TabIndex = 4;
|
||||
this.statusPanelLengthCheckBox.Text = "Length";
|
||||
this.statusPanelLengthCheckBox.UseVisualStyleBackColor = true;
|
||||
this.statusPanelLengthCheckBox.Click += new System.EventHandler(this.StatusPanelLengthCheckBox_Click);
|
||||
//
|
||||
// statusPanelSizeCheckBox
|
||||
//
|
||||
this.statusPanelSizeCheckBox.AutoSize = true;
|
||||
this.statusPanelSizeCheckBox.Location = new System.Drawing.Point(6, 97);
|
||||
this.statusPanelSizeCheckBox.Name = "statusPanelSizeCheckBox";
|
||||
this.statusPanelSizeCheckBox.Size = new System.Drawing.Size(46, 19);
|
||||
this.statusPanelSizeCheckBox.TabIndex = 7;
|
||||
this.statusPanelSizeCheckBox.Text = "Size";
|
||||
this.statusPanelSizeCheckBox.UseVisualStyleBackColor = true;
|
||||
this.statusPanelSizeCheckBox.Click += new System.EventHandler(this.statusPanelSizeCheckBox_Click);
|
||||
//
|
||||
// statusPanelLinesCheckBox
|
||||
//
|
||||
this.statusPanelLinesCheckBox.AutoSize = true;
|
||||
this.statusPanelLinesCheckBox.Location = new System.Drawing.Point(6, 47);
|
||||
this.statusPanelLinesCheckBox.Name = "statusPanelLinesCheckBox";
|
||||
this.statusPanelLinesCheckBox.Size = new System.Drawing.Size(53, 19);
|
||||
this.statusPanelLinesCheckBox.TabIndex = 5;
|
||||
this.statusPanelLinesCheckBox.Text = "Lines";
|
||||
this.statusPanelLinesCheckBox.UseVisualStyleBackColor = true;
|
||||
this.statusPanelLinesCheckBox.Click += new System.EventHandler(this.StatusPanelLinesCheckBox_Click);
|
||||
//
|
||||
// statusPanelModifiedCheckBox
|
||||
//
|
||||
this.statusPanelModifiedCheckBox.AutoSize = true;
|
||||
this.statusPanelModifiedCheckBox.Location = new System.Drawing.Point(6, 72);
|
||||
this.statusPanelModifiedCheckBox.Name = "statusPanelModifiedCheckBox";
|
||||
this.statusPanelModifiedCheckBox.Size = new System.Drawing.Size(74, 19);
|
||||
this.statusPanelModifiedCheckBox.TabIndex = 6;
|
||||
this.statusPanelModifiedCheckBox.Text = "Modified";
|
||||
this.statusPanelModifiedCheckBox.UseVisualStyleBackColor = true;
|
||||
this.statusPanelModifiedCheckBox.Click += new System.EventHandler(this.StatusPanelModifiedCheckBox_Click);
|
||||
//
|
||||
// statusPanelVisibleCheckBox
|
||||
//
|
||||
this.statusPanelVisibleCheckBox.AutoSize = true;
|
||||
|
|
@ -798,6 +862,8 @@ private void InitializeComponent()
|
|||
this.encryptionTabPage.PerformLayout();
|
||||
this.statusPanelTabPage.ResumeLayout(false);
|
||||
this.statusPanelTabPage.PerformLayout();
|
||||
this.statusPanelLabelsGroupBox.ResumeLayout(false);
|
||||
this.statusPanelLabelsGroupBox.PerformLayout();
|
||||
this.toolbarTabPage.ResumeLayout(false);
|
||||
this.toolbarTabPage.PerformLayout();
|
||||
this.searchPanelTabPage.ResumeLayout(false);
|
||||
|
|
@ -865,5 +931,10 @@ private void InitializeComponent()
|
|||
private System.Windows.Forms.Label searchBorderLabel;
|
||||
private System.Windows.Forms.CheckBox toolbarCloseButtonCheckBox;
|
||||
private System.Windows.Forms.CheckBox singleInstanceCheckBox;
|
||||
private System.Windows.Forms.CheckBox statusPanelLengthCheckBox;
|
||||
private System.Windows.Forms.CheckBox statusPanelLinesCheckBox;
|
||||
private System.Windows.Forms.CheckBox statusPanelModifiedCheckBox;
|
||||
private System.Windows.Forms.CheckBox statusPanelSizeCheckBox;
|
||||
private System.Windows.Forms.GroupBox statusPanelLabelsGroupBox;
|
||||
}
|
||||
}
|
||||
|
|
@ -52,6 +52,11 @@ private void LoadSettings()
|
|||
statusPanelBackColor.BackColor = settings.statusPanelBackColor;
|
||||
statusPanelFontColor.BackColor = settings.statusPanelFontColor;
|
||||
statusPanelVisibleCheckBox.Checked = settings.statusPanelVisible;
|
||||
statusPanelLengthCheckBox.Checked = settings.statusPanelLength;
|
||||
statusPanelLinesCheckBox.Checked = settings.statusPanelLines;
|
||||
statusPanelModifiedCheckBox.Checked = settings.statusPanelModified;
|
||||
statusPanelSizeCheckBox.Checked = settings.statusPanelSize;
|
||||
statusPanelLabelsGroupBox.Visible = settings.statusPanelVisible;
|
||||
}
|
||||
|
||||
private static void AssociateExtension(string applicationExecutablePath, string extension)
|
||||
|
|
@ -137,7 +142,7 @@ private void SendToShortcut()
|
|||
#endregion
|
||||
|
||||
|
||||
#region Form Events
|
||||
#region Event Handlers
|
||||
private void SettingsForm_Load(object sender, EventArgs e)
|
||||
{
|
||||
string custom_colors = settings.customColor;
|
||||
|
|
@ -191,7 +196,7 @@ private void PasswordIterationsTextBox_KeyPress(object sender, KeyPressEventArgs
|
|||
#endregion
|
||||
|
||||
|
||||
#region Settings Section
|
||||
#region Settings Events
|
||||
private void EditorFontColor_Click(object sender, EventArgs e)
|
||||
{
|
||||
colorDialog.Color = editorFontColor.BackColor;
|
||||
|
|
@ -385,9 +390,11 @@ private void FontDialog_Apply(object sender, EventArgs e)
|
|||
|
||||
private void StatusPanelVisibleCheckBox_Click(object sender, EventArgs e)
|
||||
{
|
||||
statusPanelLabelsGroupBox.Visible = statusPanelVisibleCheckBox.Checked;
|
||||
Application.DoEvents();
|
||||
MainForm main = Owner as MainForm;
|
||||
main.statusPanel.Visible = statusPanelVisibleCheckBox.Checked;
|
||||
main.richTextBox.SetInnerMargins(Convert.ToInt32(editorPaddingLeftTextBox.Text), 0, 0, 0);
|
||||
//main.richTextBox.SetInnerMargins(Convert.ToInt32(editorPaddingLeftTextBox.Text), 0, 0, 0);
|
||||
settings.statusPanelVisible = statusPanelVisibleCheckBox.Checked;
|
||||
}
|
||||
|
||||
|
|
@ -587,6 +594,36 @@ private void SingleInstanceCheckBox_Click(object sender, EventArgs e)
|
|||
{
|
||||
settings.singleInstance = singleInstanceCheckBox.Checked;
|
||||
}
|
||||
|
||||
private void StatusPanelLengthCheckBox_Click(object sender, EventArgs e)
|
||||
{
|
||||
MainForm main = Owner as MainForm;
|
||||
main.statusPanelLengthLabel.Visible = statusPanelLengthCheckBox.Checked;
|
||||
settings.statusPanelLength = statusPanelLengthCheckBox.Checked;
|
||||
}
|
||||
|
||||
private void StatusPanelLinesCheckBox_Click(object sender, EventArgs e)
|
||||
{
|
||||
MainForm main = Owner as MainForm;
|
||||
main.statusPanelLinesLabel.Visible = statusPanelLinesCheckBox.Checked;
|
||||
settings.statusPanelLines = statusPanelLinesCheckBox.Checked;
|
||||
}
|
||||
|
||||
private void StatusPanelModifiedCheckBox_Click(object sender, EventArgs e)
|
||||
{
|
||||
MainForm main = Owner as MainForm;
|
||||
main.statusPanelModifiedLabel.Visible = statusPanelModifiedCheckBox.Checked;
|
||||
settings.statusPanelModified = statusPanelModifiedCheckBox.Checked;
|
||||
main.StatusPanelFileInfo();
|
||||
}
|
||||
|
||||
private void statusPanelSizeCheckBox_Click(object sender, EventArgs e)
|
||||
{
|
||||
MainForm main = Owner as MainForm;
|
||||
main.statusPanelSizeLabel.Visible = statusPanelSizeCheckBox.Checked;
|
||||
settings.statusPanelSize = statusPanelSizeCheckBox.Checked;
|
||||
main.StatusPanelFileInfo();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue