diff --git a/Crypto Notepad/App.config b/Crypto Notepad/App.config index e31a2d9..cfc1b69 100644 --- a/Crypto Notepad/App.config +++ b/Crypto Notepad/App.config @@ -159,6 +159,9 @@ None + + Single + diff --git a/Crypto Notepad/MainForm.cs b/Crypto Notepad/MainForm.cs index fd9a25a..f59d350 100644 --- a/Crypto Notepad/MainForm.cs +++ b/Crypto Notepad/MainForm.cs @@ -555,6 +555,7 @@ private void LoadSettings() searchWholeWordCheckBox.ForeColor = settings.searchPanelForeColor; searchFindNextButton.ForeColor = settings.searchPanelForeColor; searchCloseButton.ForeColor = settings.searchPanelForeColor; + searchPanel.CellBorderStyle = (TableLayoutPanelCellBorderStyle)Enum.Parse(typeof(TableLayoutPanelCellBorderStyle), settings.searchPanelBorder); lineNumbers.Visible = bool.Parse(settings.lineNumbersVisible); lineNumbers.Show_BorderLines = bool.Parse(settings.borderLinesVisible); lineNumbers.Show_GridLines = bool.Parse(settings.gridLinesVisible); @@ -753,7 +754,6 @@ private void MainForm_Shown(object sender, EventArgs e) private void MainWindow_Load(object sender, EventArgs e) { Visible = false; - searchPanel.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single; LoadSettings(); DeleteUpdateFiles(); MenuIcons(settings.menuIcons); diff --git a/Crypto Notepad/Properties/Settings.Designer.cs b/Crypto Notepad/Properties/Settings.Designer.cs index 4d204c0..109edd2 100644 --- a/Crypto Notepad/Properties/Settings.Designer.cs +++ b/Crypto Notepad/Properties/Settings.Designer.cs @@ -660,5 +660,18 @@ public string editorBorder { this["editorBorder"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Configuration.SettingsProviderAttribute(typeof(PortableSettingsProvider))] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("Single")] + public string searchPanelBorder { + get { + return ((string)(this["searchPanelBorder"])); + } + set { + this["searchPanelBorder"] = value; + } + } } } diff --git a/Crypto Notepad/Properties/Settings.settings b/Crypto Notepad/Properties/Settings.settings index ef6050e..ac8d4eb 100644 --- a/Crypto Notepad/Properties/Settings.settings +++ b/Crypto Notepad/Properties/Settings.settings @@ -149,5 +149,8 @@ None + + Single + \ No newline at end of file diff --git a/Crypto Notepad/SettingsForm.Designer.cs b/Crypto Notepad/SettingsForm.Designer.cs index 5ab9f85..f50896f 100644 --- a/Crypto Notepad/SettingsForm.Designer.cs +++ b/Crypto Notepad/SettingsForm.Designer.cs @@ -113,6 +113,8 @@ private void InitializeComponent() this.searchBackColorLabel = new System.Windows.Forms.Label(); this.settingsNavigation = new System.Windows.Forms.ListBox(); this.fontDialog = new System.Windows.Forms.FontDialog(); + this.searchBorderLabel = new System.Windows.Forms.Label(); + this.searchBorderComboBox = new System.Windows.Forms.ComboBox(); this.settingsTabControl.SuspendLayout(); this.editorTabPage.SuspendLayout(); this.applicationTabPage.SuspendLayout(); @@ -1042,6 +1044,8 @@ private void InitializeComponent() // this.searchPanelTabPage.BackColor = System.Drawing.SystemColors.Window; this.searchPanelTabPage.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.searchPanelTabPage.Controls.Add(this.searchBorderComboBox); + this.searchPanelTabPage.Controls.Add(this.searchBorderLabel); this.searchPanelTabPage.Controls.Add(this.searchFontColor); this.searchPanelTabPage.Controls.Add(this.searchBackColor); this.searchPanelTabPage.Controls.Add(this.searchFontColorLabel); @@ -1128,6 +1132,28 @@ private void InitializeComponent() this.fontDialog.ShowEffects = false; this.fontDialog.Apply += new System.EventHandler(this.FontDialog_Apply); // + // searchBorderLabel + // + this.searchBorderLabel.AutoSize = true; + this.searchBorderLabel.Location = new System.Drawing.Point(6, 61); + this.searchBorderLabel.Name = "searchBorderLabel"; + this.searchBorderLabel.Size = new System.Drawing.Size(42, 15); + this.searchBorderLabel.TabIndex = 4; + this.searchBorderLabel.Text = "Border"; + // + // searchBorderComboBox + // + this.searchBorderComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.searchBorderComboBox.FormattingEnabled = true; + this.searchBorderComboBox.Items.AddRange(new object[] { + "None", + "Single"}); + this.searchBorderComboBox.Location = new System.Drawing.Point(132, 58); + this.searchBorderComboBox.Name = "searchBorderComboBox"; + this.searchBorderComboBox.Size = new System.Drawing.Size(100, 23); + this.searchBorderComboBox.TabIndex = 5; + this.searchBorderComboBox.DropDownClosed += new System.EventHandler(this.SearchBorderComboBox_DropDownClosed); + // // SettingsForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -1168,6 +1194,7 @@ private void InitializeComponent() this.toolbarTabPage.ResumeLayout(false); this.toolbarTabPage.PerformLayout(); this.searchPanelTabPage.ResumeLayout(false); + this.searchPanelTabPage.PerformLayout(); this.ResumeLayout(false); } @@ -1258,5 +1285,7 @@ private void InitializeComponent() private System.Windows.Forms.CheckBox minimizeToTrayCheckBox; private System.Windows.Forms.ComboBox editorBorderComboBox; private System.Windows.Forms.Label editorBorderLabel; + private System.Windows.Forms.ComboBox searchBorderComboBox; + private System.Windows.Forms.Label searchBorderLabel; } } \ No newline at end of file diff --git a/Crypto Notepad/SettingsForm.cs b/Crypto Notepad/SettingsForm.cs index 7016f32..35e9364 100644 --- a/Crypto Notepad/SettingsForm.cs +++ b/Crypto Notepad/SettingsForm.cs @@ -47,6 +47,7 @@ private void LoadSettings() searchBackColor.BackColor = settings.searchPanelBackColor; searchFontColor.BackColor = settings.searchPanelForeColor; + searchBorderComboBox.Text = settings.searchPanelBorder; toolbarBackColor.BackColor = settings.toolbarBackColor; toolbarBorderCheckBox.Checked = settings.toolbarBorder; @@ -822,6 +823,13 @@ private void EditorBorderComboBox_DropDownClosed(object sender, EventArgs e) settings.editorBorder = editorBorderComboBox.Text; } + private void SearchBorderComboBox_DropDownClosed(object sender, EventArgs e) + { + MainForm main = Owner as MainForm; + main.searchPanel.CellBorderStyle = (TableLayoutPanelCellBorderStyle)Enum.Parse(typeof(TableLayoutPanelCellBorderStyle), searchBorderComboBox.Text); + settings.searchPanelBorder = searchBorderComboBox.Text; + } + /*Settings Section*/