From b475ba9931824ccd01d07536b5af4fba25b11cd9 Mon Sep 17 00:00:00 2001 From: Alexander Date: Sun, 20 Oct 2019 23:05:43 +0300 Subject: [PATCH] Re-arrangement of the Settings navigation --- Crypto Notepad/SettingsForm.Designer.cs | 36 ++++++++++++------------- Crypto Notepad/SettingsForm.cs | 20 +++++++------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Crypto Notepad/SettingsForm.Designer.cs b/Crypto Notepad/SettingsForm.Designer.cs index cf343bd..239d4ff 100644 --- a/Crypto Notepad/SettingsForm.Designer.cs +++ b/Crypto Notepad/SettingsForm.Designer.cs @@ -46,6 +46,7 @@ private void InitializeComponent() this.editorBackColor = new System.Windows.Forms.Panel(); this.editorFontColor = new System.Windows.Forms.Panel(); this.applicationTabPage = new System.Windows.Forms.TabPage(); + this.singleInstanceCheckBox = new System.Windows.Forms.CheckBox(); this.closeToTrayCheckBox = new System.Windows.Forms.CheckBox(); this.minimizeToTrayCheckBox = new System.Windows.Forms.CheckBox(); this.mainMenuCheckBox = new System.Windows.Forms.CheckBox(); @@ -116,7 +117,6 @@ 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.singleInstanceCheckBox = new System.Windows.Forms.CheckBox(); this.settingsTabControl.SuspendLayout(); this.editorTabPage.SuspendLayout(); this.applicationTabPage.SuspendLayout(); @@ -337,6 +337,17 @@ private void InitializeComponent() this.applicationTabPage.TabIndex = 2; this.applicationTabPage.Text = "app"; // + // singleInstanceCheckBox + // + this.singleInstanceCheckBox.AutoSize = true; + this.singleInstanceCheckBox.Location = new System.Drawing.Point(7, 155); + this.singleInstanceCheckBox.Name = "singleInstanceCheckBox"; + this.singleInstanceCheckBox.Size = new System.Drawing.Size(105, 19); + this.singleInstanceCheckBox.TabIndex = 6; + this.singleInstanceCheckBox.Text = "Single instance"; + this.singleInstanceCheckBox.UseVisualStyleBackColor = true; + this.singleInstanceCheckBox.Click += new System.EventHandler(this.SingleInstanceCheckBox_Click); + // // closeToTrayCheckBox // this.closeToTrayCheckBox.AutoSize = true; @@ -1140,14 +1151,14 @@ private void InitializeComponent() this.settingsNavigation.FormattingEnabled = true; this.settingsNavigation.ItemHeight = 17; this.settingsNavigation.Items.AddRange(new object[] { + "Application", + "Toolbar", + "Status Panel", + "Search Panel", "Editor", "Line Numbers", - "Status Panel", - "Toolbar", - "Application", - "Search Panel", - "Integration", - "Encryption"}); + "Encryption", + "Integration"}); this.settingsNavigation.Location = new System.Drawing.Point(3, 3); this.settingsNavigation.Name = "settingsNavigation"; this.settingsNavigation.Size = new System.Drawing.Size(102, 276); @@ -1169,17 +1180,6 @@ private void InitializeComponent() this.fontDialog.ShowEffects = false; this.fontDialog.Apply += new System.EventHandler(this.FontDialog_Apply); // - // singleInstanceCheckBox - // - this.singleInstanceCheckBox.AutoSize = true; - this.singleInstanceCheckBox.Location = new System.Drawing.Point(7, 155); - this.singleInstanceCheckBox.Name = "singleInstanceCheckBox"; - this.singleInstanceCheckBox.Size = new System.Drawing.Size(105, 19); - this.singleInstanceCheckBox.TabIndex = 6; - this.singleInstanceCheckBox.Text = "Single instance"; - this.singleInstanceCheckBox.UseVisualStyleBackColor = true; - this.singleInstanceCheckBox.Click += new System.EventHandler(this.SingleInstanceCheckBox_Click); - // // SettingsForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/Crypto Notepad/SettingsForm.cs b/Crypto Notepad/SettingsForm.cs index ca82c55..c691b5b 100644 --- a/Crypto Notepad/SettingsForm.cs +++ b/Crypto Notepad/SettingsForm.cs @@ -296,28 +296,28 @@ private void SettingsNavigation_Click(object sender, EventArgs e) switch (settingsNavigation.SelectedIndex) { case 0: - settingsTabControl.SelectedTab = editorTabPage; + settingsTabControl.SelectedTab = applicationTabPage; break; case 1: - settingsTabControl.SelectedTab = lineNumbersTabPage; + settingsTabControl.SelectedTab = toolbarTabPage; break; case 2: settingsTabControl.SelectedTab = statusPanelTabPage; break; case 3: - settingsTabControl.SelectedTab = toolbarTabPage; - break; - case 4: - settingsTabControl.SelectedTab = applicationTabPage; - break; - case 5: settingsTabControl.SelectedTab = searchPanelTabPage; break; + case 4: + settingsTabControl.SelectedTab = editorTabPage; + break; + case 5: + settingsTabControl.SelectedTab = lineNumbersTabPage; + break; case 6: - settingsTabControl.SelectedTab = integrationTabPage; + settingsTabControl.SelectedTab = encryptionTabPage; break; case 7: - settingsTabControl.SelectedTab = encryptionTabPage; + settingsTabControl.SelectedTab = integrationTabPage; break; }