From 36c7a87f101ff502fa9bfe41ffe3f923cca20f78 Mon Sep 17 00:00:00 2001 From: Jaex Date: Sat, 6 Dec 2014 18:48:49 +0200 Subject: [PATCH] Application settings window using tree tab navigation too --- .../Forms/ApplicationSettingsForm.Designer.cs | 41 +-- ShareX/Forms/ApplicationSettingsForm.cs | 2 + ShareX/Forms/ApplicationSettingsForm.resx | 263 +++++++++--------- 3 files changed, 159 insertions(+), 147 deletions(-) diff --git a/ShareX/Forms/ApplicationSettingsForm.Designer.cs b/ShareX/Forms/ApplicationSettingsForm.Designer.cs index c6e64552b..c158954f7 100644 --- a/ShareX/Forms/ApplicationSettingsForm.Designer.cs +++ b/ShareX/Forms/ApplicationSettingsForm.Designer.cs @@ -72,7 +72,6 @@ private void InitializeComponent() this.tpUpload = new System.Windows.Forms.TabPage(); this.tcUpload = new System.Windows.Forms.TabControl(); this.tpPerformance = new System.Windows.Forms.TabPage(); - this.gbBandwidth = new System.Windows.Forms.GroupBox(); this.lblUploadLimit = new System.Windows.Forms.Label(); this.nudUploadLimit = new System.Windows.Forms.NumericUpDown(); this.lblUploadLimitHint = new System.Windows.Forms.Label(); @@ -106,6 +105,7 @@ private void InitializeComponent() this.btnShowImagePrintSettings = new System.Windows.Forms.Button(); this.tpAdvanced = new System.Windows.Forms.TabPage(); this.pgSettings = new System.Windows.Forms.PropertyGrid(); + this.tttvMain = new HelpersLib.TabToTreeView(); this.tcSettings.SuspendLayout(); this.tpGeneral.SuspendLayout(); this.tpPaths.SuspendLayout(); @@ -114,7 +114,6 @@ private void InitializeComponent() this.tpUpload.SuspendLayout(); this.tcUpload.SuspendLayout(); this.tpPerformance.SuspendLayout(); - this.gbBandwidth.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudUploadLimit)).BeginInit(); this.tpUploadResults.SuspendLayout(); this.gbClipboardFormats.SuspendLayout(); @@ -130,13 +129,13 @@ private void InitializeComponent() // // tcSettings // + resources.ApplyResources(this.tcSettings, "tcSettings"); this.tcSettings.Controls.Add(this.tpGeneral); this.tcSettings.Controls.Add(this.tpPaths); this.tcSettings.Controls.Add(this.tpProxy); this.tcSettings.Controls.Add(this.tpUpload); this.tcSettings.Controls.Add(this.tpPrint); this.tcSettings.Controls.Add(this.tpAdvanced); - resources.ApplyResources(this.tcSettings, "tcSettings"); this.tcSettings.Name = "tcSettings"; this.tcSettings.SelectedIndex = 0; // @@ -435,22 +434,15 @@ private void InitializeComponent() // // tpPerformance // - this.tpPerformance.Controls.Add(this.gbBandwidth); + this.tpPerformance.Controls.Add(this.lblUploadLimit); + this.tpPerformance.Controls.Add(this.nudUploadLimit); + this.tpPerformance.Controls.Add(this.lblUploadLimitHint); + this.tpPerformance.Controls.Add(this.cbBufferSize); + this.tpPerformance.Controls.Add(this.lblBufferSize); resources.ApplyResources(this.tpPerformance, "tpPerformance"); this.tpPerformance.Name = "tpPerformance"; this.tpPerformance.UseVisualStyleBackColor = true; // - // gbBandwidth - // - this.gbBandwidth.Controls.Add(this.lblUploadLimit); - this.gbBandwidth.Controls.Add(this.nudUploadLimit); - this.gbBandwidth.Controls.Add(this.lblUploadLimitHint); - this.gbBandwidth.Controls.Add(this.lblBufferSize); - this.gbBandwidth.Controls.Add(this.cbBufferSize); - resources.ApplyResources(this.gbBandwidth, "gbBandwidth"); - this.gbBandwidth.Name = "gbBandwidth"; - this.gbBandwidth.TabStop = false; - // // lblUploadLimit // resources.ApplyResources(this.lblUploadLimit, "lblUploadLimit"); @@ -499,11 +491,11 @@ private void InitializeComponent() // // gbClipboardFormats // + resources.ApplyResources(this.gbClipboardFormats, "gbClipboardFormats"); this.gbClipboardFormats.Controls.Add(this.btnClipboardFormatEdit); this.gbClipboardFormats.Controls.Add(this.btnClipboardFormatRemove); this.gbClipboardFormats.Controls.Add(this.btnClipboardFormatAdd); this.gbClipboardFormats.Controls.Add(this.lvClipboardFormats); - resources.ApplyResources(this.gbClipboardFormats, "gbClipboardFormats"); this.gbClipboardFormats.Name = "gbClipboardFormats"; this.gbClipboardFormats.TabStop = false; // @@ -530,12 +522,12 @@ private void InitializeComponent() // // lvClipboardFormats // + resources.ApplyResources(this.lvClipboardFormats, "lvClipboardFormats"); this.lvClipboardFormats.AutoFillColumn = true; this.lvClipboardFormats.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { this.chDescription, this.chFormat}); this.lvClipboardFormats.FullRowSelect = true; - resources.ApplyResources(this.lvClipboardFormats, "lvClipboardFormats"); this.lvClipboardFormats.Name = "lvClipboardFormats"; this.lvClipboardFormats.UseCompatibleStateImageBehavior = false; this.lvClipboardFormats.View = System.Windows.Forms.View.Details; @@ -704,12 +696,22 @@ private void InitializeComponent() this.pgSettings.PropertySort = System.Windows.Forms.PropertySort.Categorized; this.pgSettings.ToolbarVisible = false; // + // tttvMain + // + resources.ApplyResources(this.tttvMain, "tttvMain"); + this.tttvMain.ImageList = null; + this.tttvMain.MainTabControl = null; + this.tttvMain.Name = "tttvMain"; + this.tttvMain.TreeViewFont = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(162))); + this.tttvMain.TreeViewSize = 150; + // // ApplicationSettingsForm // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.White; this.Controls.Add(this.tcSettings); + this.Controls.Add(this.tttvMain); this.Name = "ApplicationSettingsForm"; this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.SettingsForm_FormClosed); @@ -726,8 +728,7 @@ private void InitializeComponent() this.tpUpload.ResumeLayout(false); this.tcUpload.ResumeLayout(false); this.tpPerformance.ResumeLayout(false); - this.gbBandwidth.ResumeLayout(false); - this.gbBandwidth.PerformLayout(); + this.tpPerformance.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.nudUploadLimit)).EndInit(); this.tpUploadResults.ResumeLayout(false); this.gbClipboardFormats.ResumeLayout(false); @@ -781,7 +782,6 @@ private void InitializeComponent() private System.Windows.Forms.Label lblUploadLimitHint; private System.Windows.Forms.Label lblBufferSize; private System.Windows.Forms.NumericUpDown nudUploadLimit; - private System.Windows.Forms.GroupBox gbBandwidth; private System.Windows.Forms.GroupBox gbClipboardFormats; private System.Windows.Forms.Button btnClipboardFormatRemove; private System.Windows.Forms.Button btnClipboardFormatAdd; @@ -825,5 +825,6 @@ private void InitializeComponent() private System.Windows.Forms.ComboBox cbLanguage; private System.Windows.Forms.Label lblLanguage; private System.Windows.Forms.LinkLabel llTranslators; + private TabToTreeView tttvMain; } } \ No newline at end of file diff --git a/ShareX/Forms/ApplicationSettingsForm.cs b/ShareX/Forms/ApplicationSettingsForm.cs index 9393160a5..bd205537c 100644 --- a/ShareX/Forms/ApplicationSettingsForm.cs +++ b/ShareX/Forms/ApplicationSettingsForm.cs @@ -122,6 +122,8 @@ private void LoadSettings() // Advanced pgSettings.SelectedObject = Program.Settings; + + tttvMain.MainTabControl = tcSettings; } private void SettingsForm_Shown(object sender, EventArgs e) diff --git a/ShareX/Forms/ApplicationSettingsForm.resx b/ShareX/Forms/ApplicationSettingsForm.resx index 18b1ed4ac..1c151c6c0 100644 --- a/ShareX/Forms/ApplicationSettingsForm.resx +++ b/ShareX/Forms/ApplicationSettingsForm.resx @@ -117,13 +117,17 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + Top, Bottom, Left, Right + True - 192, 36 + 184, 28 206, 13 @@ -147,7 +151,7 @@ 0 - 16, 32 + 8, 24 168, 21 @@ -171,7 +175,7 @@ True - 13, 16 + 5, 8 58, 13 @@ -198,7 +202,7 @@ True - 16, 232 + 8, 224 180, 17 @@ -225,7 +229,7 @@ True - 16, 88 + 8, 80 137, 17 @@ -252,7 +256,7 @@ True - 16, 256 + 8, 248 162, 17 @@ -279,7 +283,7 @@ True - 16, 208 + 8, 200 178, 17 @@ -306,7 +310,7 @@ True - 16, 184 + 8, 176 150, 17 @@ -333,7 +337,7 @@ True - 16, 160 + 8, 152 301, 17 @@ -360,7 +364,7 @@ True - 16, 112 + 8, 104 188, 17 @@ -387,7 +391,7 @@ True - 16, 64 + 8, 56 96, 17 @@ -414,7 +418,7 @@ True - 16, 136 + 8, 128 181, 17 @@ -440,12 +444,11 @@ 4, 22 - 3, 3, 3, 3 - 610, 370 + 541, 370 0 @@ -469,7 +472,7 @@ True - 13, 96 + 5, 80 354, 13 @@ -493,7 +496,7 @@ 0 - 16, 220 + 8, 204 96, 23 @@ -520,7 +523,7 @@ True - 120, 69 + 112, 53 16, 13 @@ -530,7 +533,7 @@ ... - @Invariant + lblPreviewPersonalFolderPath @@ -544,7 +547,7 @@ 2 - 432, 39 + 424, 23 96, 23 @@ -571,7 +574,7 @@ True - 13, 24 + 5, 8 117, 13 @@ -595,7 +598,7 @@ 4 - 16, 40 + 8, 24 408, 20 @@ -616,7 +619,7 @@ 5 - 432, 147 + 424, 131 96, 23 @@ -640,7 +643,7 @@ 6 - 16, 64 + 8, 48 96, 23 @@ -664,7 +667,7 @@ 7 - 16, 148 + 8, 132 408, 20 @@ -688,7 +691,7 @@ True - 16, 124 + 8, 108 174, 17 @@ -715,7 +718,7 @@ True - 13, 180 + 5, 164 94, 13 @@ -742,7 +745,7 @@ True - 120, 225 + 112, 209 16, 13 @@ -752,7 +755,7 @@ ... - @Invariant + lblSaveImageSubFolderPatternPreview @@ -766,7 +769,7 @@ 11 - 16, 196 + 8, 180 408, 20 @@ -793,7 +796,7 @@ 3, 3, 3, 3 - 610, 370 + 541, 370 1 @@ -814,7 +817,7 @@ 1 - 16, 32 + 8, 24 136, 21 @@ -838,7 +841,7 @@ True - 13, 16 + 5, 8 100, 13 @@ -865,7 +868,7 @@ True - 13, 64 + 5, 56 32, 13 @@ -889,7 +892,7 @@ 2 - 16, 80 + 8, 72 232, 20 @@ -910,7 +913,7 @@ 3 - 256, 80 + 248, 72 64, 20 @@ -937,7 +940,7 @@ True - 253, 64 + 245, 56 29, 13 @@ -964,7 +967,7 @@ True - 13, 160 + 5, 152 56, 13 @@ -988,7 +991,7 @@ 6 - 16, 176 + 8, 168 232, 20 @@ -1012,7 +1015,7 @@ True - 13, 112 + 5, 104 58, 13 @@ -1036,7 +1039,7 @@ 8 - 16, 128 + 8, 120 232, 20 @@ -1063,7 +1066,7 @@ 5, 5, 5, 5 - 610, 370 + 541, 370 2 @@ -1087,7 +1090,7 @@ True - 13, 24 + 5, 8 128, 13 @@ -1105,13 +1108,13 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - gbBandwidth + tpPerformance 0 - 16, 40 + 8, 24 56, 20 @@ -1129,7 +1132,7 @@ System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - gbBandwidth + tpPerformance 1 @@ -1138,7 +1141,7 @@ True - 80, 44 + 72, 28 90, 13 @@ -1156,16 +1159,37 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - gbBandwidth + tpPerformance 2 + + 8, 72 + + + 76, 21 + + + 4 + + + cbBufferSize + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tpPerformance + + + 3 + True - 13, 72 + 5, 56 59, 13 @@ -1183,55 +1207,10 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - gbBandwidth - - - 3 - - - 16, 88 - - - 76, 21 - - - 4 - - - cbBufferSize - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - gbBandwidth - - - 4 - - - 8, 8 - - - 576, 120 - - - 0 - - - Bandwidth - - - gbBandwidth - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - tpPerformance - - 0 + + 4 4, 22 @@ -1240,14 +1219,11 @@ 3, 3, 3, 3 - 596, 338 + 527, 338 0 - - Performance - tpPerformance @@ -1260,6 +1236,9 @@ 0 + + Top, Bottom, Left, Right + 112, 16 @@ -1332,6 +1311,9 @@ 2 + + Top, Bottom, Left, Right + Description @@ -1348,7 +1330,7 @@ 8, 48 - 560, 264 + 496, 264 3 @@ -1369,7 +1351,7 @@ 8, 8 - 576, 320 + 512, 320 0 @@ -1396,7 +1378,7 @@ 3, 3, 3, 3 - 596, 338 + 527, 338 1 @@ -1456,7 +1438,7 @@ 3, 18 - 179, 234 + 156, 242 0 @@ -1483,7 +1465,7 @@ 3, 5, 3, 3 - 185, 255 + 162, 263 0 @@ -1510,7 +1492,7 @@ 3, 18 - 180, 234 + 158, 242 0 @@ -1531,13 +1513,13 @@ Fill - 396, 8 + 349, 8 3, 5, 3, 3 - 186, 255 + 164, 263 2 @@ -1564,7 +1546,7 @@ 3, 18 - 185, 234 + 161, 242 0 @@ -1585,13 +1567,13 @@ Fill - 199, 8 + 176, 8 3, 5, 3, 3 - 191, 255 + 167, 263 1 @@ -1612,7 +1594,7 @@ 2 - 3, 64 + 3, 56 5, 5, 5, 5 @@ -1621,7 +1603,7 @@ 1 - 590, 271 + 521, 279 3 @@ -1699,7 +1681,7 @@ 3, 3, 3, 3 - 596, 338 + 527, 338 2 @@ -1726,7 +1708,7 @@ 3, 3 - 604, 364 + 535, 364 0 @@ -1750,7 +1732,7 @@ 3, 3, 3, 3 - 610, 370 + 541, 370 3 @@ -1774,7 +1756,7 @@ True - 16, 72 + 8, 64 180, 17 @@ -1801,7 +1783,7 @@ True - 16, 48 + 8, 40 203, 17 @@ -1825,7 +1807,7 @@ 1 - 16, 16 + 8, 8 208, 23 @@ -1855,7 +1837,7 @@ 3, 3, 3, 3 - 610, 370 + 541, 370 4 @@ -1882,7 +1864,7 @@ 3, 3 - 604, 364 + 535, 364 0 @@ -1906,7 +1888,7 @@ 3, 3, 3, 3 - 610, 370 + 541, 370 5 @@ -1926,18 +1908,18 @@ 5 - - Fill - - 3, 3 + 152, 3 - 618, 396 + 549, 396 0 + + False + tcSettings @@ -1950,6 +1932,33 @@ 0 + + Fill + + + 3, 3 + + + 0, 0, 0, 0 + + + 698, 396 + + + 13 + + + tttvMain + + + HelpersLib.TabToTreeView, HelpersLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null + + + $this + + + 1 + True @@ -1957,7 +1966,7 @@ 6, 13 - 624, 402 + 704, 402 640, 440