diff --git a/Crypto Notepad/App.config b/Crypto Notepad/App.config index cfc1b69..3009abf 100644 --- a/Crypto Notepad/App.config +++ b/Crypto Notepad/App.config @@ -162,6 +162,9 @@ Single + + True + diff --git a/Crypto Notepad/MainForm.Designer.cs b/Crypto Notepad/MainForm.Designer.cs index 3256681..e304f9c 100644 --- a/Crypto Notepad/MainForm.Designer.cs +++ b/Crypto Notepad/MainForm.Designer.cs @@ -1359,7 +1359,7 @@ public void InitializeComponent() protected internal System.Windows.Forms.TextBox fileLockedKeyTextBox; protected internal System.Windows.Forms.Panel richTextBoxPanel; protected internal System.Windows.Forms.Label searchFindNextButton; - private System.Windows.Forms.Label closeToolbarButton; protected internal System.Windows.Forms.Label searchCloseButton; + protected internal System.Windows.Forms.Label closeToolbarButton; } } diff --git a/Crypto Notepad/MainForm.cs b/Crypto Notepad/MainForm.cs index f59d350..cc32d4d 100644 --- a/Crypto Notepad/MainForm.cs +++ b/Crypto Notepad/MainForm.cs @@ -534,6 +534,7 @@ private void LoadSettings() wordWrapMainMenu.Checked = settings.editorWrap; toolbarPanel.BackColor = settings.toolbarBackColor; toolbarPanel.Visible = settings.toolbarVisible; + closeToolbarButton.Visible = settings.toolbarCloseButton; mainMenu.Visible = settings.mainMenuVisible; rightToLeftContextMenu.Checked = settings.editorRightToLeft; lineNumbers.BackColor = settings.lineNumbersBackColor; diff --git a/Crypto Notepad/Properties/Settings.Designer.cs b/Crypto Notepad/Properties/Settings.Designer.cs index 109edd2..06b8e56 100644 --- a/Crypto Notepad/Properties/Settings.Designer.cs +++ b/Crypto Notepad/Properties/Settings.Designer.cs @@ -673,5 +673,18 @@ public string searchPanelBorder { this["searchPanelBorder"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("True")] + public bool toolbarCloseButton { + get { + return ((bool)(this["toolbarCloseButton"])); + } + set { + this["toolbarCloseButton"] = value; + } + } } } diff --git a/Crypto Notepad/Properties/Settings.settings b/Crypto Notepad/Properties/Settings.settings index ac8d4eb..5bfb94a 100644 --- a/Crypto Notepad/Properties/Settings.settings +++ b/Crypto Notepad/Properties/Settings.settings @@ -152,5 +152,8 @@ Single + + True + \ No newline at end of file diff --git a/Crypto Notepad/SettingsForm.Designer.cs b/Crypto Notepad/SettingsForm.Designer.cs index f50896f..302f33a 100644 --- a/Crypto Notepad/SettingsForm.Designer.cs +++ b/Crypto Notepad/SettingsForm.Designer.cs @@ -115,6 +115,7 @@ private void InitializeComponent() this.fontDialog = new System.Windows.Forms.FontDialog(); this.searchBorderLabel = new System.Windows.Forms.Label(); this.searchBorderComboBox = new System.Windows.Forms.ComboBox(); + this.toolbarCloseButtonCheckBox = new System.Windows.Forms.CheckBox(); this.settingsTabControl.SuspendLayout(); this.editorTabPage.SuspendLayout(); this.applicationTabPage.SuspendLayout(); @@ -975,6 +976,7 @@ private void InitializeComponent() // this.toolbarTabPage.BackColor = System.Drawing.SystemColors.Window; this.toolbarTabPage.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.toolbarTabPage.Controls.Add(this.toolbarCloseButtonCheckBox); this.toolbarTabPage.Controls.Add(this.toolbarOldIconsCheckBox); this.toolbarTabPage.Controls.Add(this.toolbarBorderCheckBox); this.toolbarTabPage.Controls.Add(this.toolbarBackColor); @@ -1154,6 +1156,17 @@ private void InitializeComponent() this.searchBorderComboBox.TabIndex = 5; this.searchBorderComboBox.DropDownClosed += new System.EventHandler(this.SearchBorderComboBox_DropDownClosed); // + // toolbarCloseButtonCheckBox + // + this.toolbarCloseButtonCheckBox.AutoSize = true; + this.toolbarCloseButtonCheckBox.Location = new System.Drawing.Point(9, 116); + this.toolbarCloseButtonCheckBox.Name = "toolbarCloseButtonCheckBox"; + this.toolbarCloseButtonCheckBox.Size = new System.Drawing.Size(94, 19); + this.toolbarCloseButtonCheckBox.TabIndex = 12; + this.toolbarCloseButtonCheckBox.Text = "Close button"; + this.toolbarCloseButtonCheckBox.UseVisualStyleBackColor = true; + this.toolbarCloseButtonCheckBox.Click += new System.EventHandler(this.ToolbarCloseButtonCheckBox_Click); + // // SettingsForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1287,5 +1300,6 @@ private void InitializeComponent() private System.Windows.Forms.Label editorBorderLabel; private System.Windows.Forms.ComboBox searchBorderComboBox; private System.Windows.Forms.Label searchBorderLabel; + private System.Windows.Forms.CheckBox toolbarCloseButtonCheckBox; } } \ No newline at end of file diff --git a/Crypto Notepad/SettingsForm.cs b/Crypto Notepad/SettingsForm.cs index 35e9364..da04512 100644 --- a/Crypto Notepad/SettingsForm.cs +++ b/Crypto Notepad/SettingsForm.cs @@ -53,6 +53,7 @@ private void LoadSettings() toolbarBorderCheckBox.Checked = settings.toolbarBorder; toolbarVisibleCheckBox.Checked = settings.toolbarVisible; toolbarOldIconsCheckBox.Checked = settings.oldToolbarIcons; + toolbarCloseButtonCheckBox.Checked = settings.toolbarCloseButton; statusPanelBackColor.BackColor = settings.statusPanelBackColor; statusPanelFontColor.BackColor = settings.statusPanelFontColor; @@ -830,6 +831,12 @@ private void SearchBorderComboBox_DropDownClosed(object sender, EventArgs e) settings.searchPanelBorder = searchBorderComboBox.Text; } + private void ToolbarCloseButtonCheckBox_Click(object sender, EventArgs e) + { + MainForm main = Owner as MainForm; + main.closeToolbarButton.Visible = toolbarCloseButtonCheckBox.Checked; + settings.toolbarCloseButton = toolbarCloseButtonCheckBox.Checked; + } /*Settings Section*/