diff --git a/ShareX.HistoryLib/Forms/HistoryForm.Designer.cs b/ShareX.HistoryLib/Forms/HistoryForm.Designer.cs index 851e9ae38..4b8a44ffb 100644 --- a/ShareX.HistoryLib/Forms/HistoryForm.Designer.cs +++ b/ShareX.HistoryLib/Forms/HistoryForm.Designer.cs @@ -318,7 +318,6 @@ private void InitializeComponent() this.scMain.Panel2.Controls.Add(this.pbThumbnail); this.scMain.SplitterColor = System.Drawing.Color.White; this.scMain.SplitterLineColor = System.Drawing.Color.FromArgb(((int)(((byte)(189)))), ((int)(((byte)(189)))), ((int)(((byte)(189))))); - this.scMain.SplitterMoved += new System.Windows.Forms.SplitterEventHandler(this.scMain_SplitterMoved); // // pbThumbnail // diff --git a/ShareX.HistoryLib/Forms/HistoryForm.cs b/ShareX.HistoryLib/Forms/HistoryForm.cs index 8ddec5003..15412306c 100644 --- a/ShareX.HistoryLib/Forms/HistoryForm.cs +++ b/ShareX.HistoryLib/Forms/HistoryForm.cs @@ -379,6 +379,7 @@ private void HistoryForm_FormClosing(object sender, FormClosingEventArgs e) if (Settings.RememberWindowState) { Settings.WindowState.UpdateFormState(this); + Settings.SplitterDistance = scMain.SplitterDistance; } } @@ -399,11 +400,6 @@ private void HistoryForm_KeyDown(object sender, KeyEventArgs e) } } - private void scMain_SplitterMoved(object sender, SplitterEventArgs e) - { - Settings.SplitterDistance = scMain.SplitterDistance; - } - private void tstbSearch_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) diff --git a/ShareX.HistoryLib/Forms/HistoryForm.resx b/ShareX.HistoryLib/Forms/HistoryForm.resx index b0ca29330..c2aa23eba 100644 --- a/ShareX.HistoryLib/Forms/HistoryForm.resx +++ b/ShareX.HistoryLib/Forms/HistoryForm.resx @@ -129,14 +129,351 @@ 4 + + btnAdvancedSearchReset + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbAdvancedSearch + + + 0 + + + btnAdvancedSearch + + + System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbAdvancedSearch + + + 1 + + + lblURLFilter + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbAdvancedSearch + + + 2 + + + txtURLFilter + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbAdvancedSearch + + + 3 + + + lblFilenameFilter + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbAdvancedSearch + + + 4 + + + cbHostFilterSelection + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbAdvancedSearch + + + 5 + + + cbTypeFilterSelection + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbAdvancedSearch + + + 6 + + + cbHostFilter + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbAdvancedSearch + + + 7 + + + cbTypeFilter + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbAdvancedSearch + + + 8 + + + dtpFilterFrom + + + System.Windows.Forms.DateTimePicker, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbAdvancedSearch + + + 9 + + + lblFilterFrom + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbAdvancedSearch + + + 10 + + + lblFilterTo + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbAdvancedSearch + + + 11 + + + cbDateFilter + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbAdvancedSearch + + + 12 + + + dtpFilterTo + + + System.Windows.Forms.DateTimePicker, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbAdvancedSearch + + + 13 + + + txtFilenameFilter + + + System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + gbAdvancedSearch + + + 14 + + + 71, 3 + + + 409, 213 + + + + 4 + + + Advanced search + + + False + + + gbAdvancedSearch + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tscHistory.ContentPanel + + + 0 + + + + Fill + + + 0, 0 + + + 550, 636 + + + 0 + + + lvHistory + + + ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=13.5.1.0, Culture=neutral, PublicKeyToken=null + + + tscHistory.ContentPanel + + + 1 + + + 550, 636 + + + tscHistory.ContentPanel + + + System.Windows.Forms.ToolStripContentPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tscHistory + + + 0 + + + Fill + + + tscHistory.LeftToolStripPanel + + + System.Windows.Forms.ToolStripPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tscHistory + + + 1 + + + 0, 0 + + + tscHistory.RightToolStripPanel + + + System.Windows.Forms.ToolStripPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tscHistory + + + 2 + + + 550, 661 + + + 2 + + + toolStripContainer1 + + + 17, 17 + + + None + + + 3, 0 + + + 454, 25 + + + 0 + + + tsHistory + + + System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tscHistory.TopToolStripPanel + + + 0 + + + tscHistory.TopToolStripPanel + + + System.Windows.Forms.ToolStripPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tscHistory + + + 3 + + + tscHistory + + + System.Windows.Forms.ToolStripContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + scMain.Panel1 + + + 0 + 272, 176 120, 24 - 22 @@ -155,7 +492,6 @@ 0 - NoControl @@ -519,33 +855,6 @@ 14 - - 71, 3 - - - 409, 213 - - - 4 - - - Advanced search - - - False - - - gbAdvancedSearch - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tscHistory.ContentPanel - - - 0 - @@ -570,90 +879,6 @@ 230 - - Fill - - - 0, 0 - - - 550, 636 - - - 0 - - - lvHistory - - - ShareX.HelpersLib.MyListView, ShareX.HelpersLib, Version=13.5.1.0, Culture=neutral, PublicKeyToken=null - - - tscHistory.ContentPanel - - - 1 - - - 550, 636 - - - tscHistory.ContentPanel - - - System.Windows.Forms.ToolStripContentPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tscHistory - - - 0 - - - Fill - - - tscHistory.LeftToolStripPanel - - - System.Windows.Forms.ToolStripPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tscHistory - - - 1 - - - 0, 0 - - - tscHistory.RightToolStripPanel - - - System.Windows.Forms.ToolStripPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tscHistory - - - 2 - - - 550, 661 - - - 2 - - - toolStripContainer1 - - - 17, 17 - - - None - 45, 22 @@ -708,51 +933,6 @@ Settings... - - 3, 0 - - - 454, 25 - - - 0 - - - tsHistory - - - System.Windows.Forms.ToolStrip, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tscHistory.TopToolStripPanel - - - 0 - - - tscHistory.TopToolStripPanel - - - System.Windows.Forms.ToolStripPanel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tscHistory - - - 3 - - - tscHistory - - - System.Windows.Forms.ToolStripContainer, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - scMain.Panel1 - - - 0 - Fill @@ -781,7 +961,7 @@ 0, 0 - 428, 661 + 628, 661 3 @@ -814,7 +994,7 @@ 100 - 984, 661 + 1184, 661 550 @@ -844,7 +1024,7 @@ 96, 96 - 984, 661 + 1184, 661 500, 500 diff --git a/ShareX.HistoryLib/Forms/HistorySettingsForm.Designer.cs b/ShareX.HistoryLib/Forms/HistorySettingsForm.Designer.cs index 77f46478e..2fc1f66ac 100644 --- a/ShareX.HistoryLib/Forms/HistorySettingsForm.Designer.cs +++ b/ShareX.HistoryLib/Forms/HistorySettingsForm.Designer.cs @@ -33,6 +33,7 @@ private void InitializeComponent() this.lblMaximumItemLimit = new System.Windows.Forms.Label(); this.nudMaximumItemLimit = new System.Windows.Forms.NumericUpDown(); this.cbRememberSearchText = new System.Windows.Forms.CheckBox(); + this.cbRememberWindowState = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.nudMaximumItemLimit)).BeginInit(); this.SuspendLayout(); // @@ -59,10 +60,19 @@ private void InitializeComponent() this.cbRememberSearchText.UseVisualStyleBackColor = true; this.cbRememberSearchText.CheckedChanged += new System.EventHandler(this.cbRememberSearchText_CheckedChanged); // + // cbRememberWindowState + // + resources.ApplyResources(this.cbRememberWindowState, "cbRememberWindowState"); + this.cbRememberWindowState.Name = "cbRememberWindowState"; + this.cbRememberWindowState.UseVisualStyleBackColor = true; + this.cbRememberWindowState.CheckedChanged += new System.EventHandler(this.cbRememberWindowState_CheckedChanged); + // // HistorySettingsForm // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; + this.BackColor = System.Drawing.SystemColors.Window; + this.Controls.Add(this.cbRememberWindowState); this.Controls.Add(this.cbRememberSearchText); this.Controls.Add(this.nudMaximumItemLimit); this.Controls.Add(this.lblMaximumItemLimit); @@ -80,5 +90,6 @@ private void InitializeComponent() private System.Windows.Forms.Label lblMaximumItemLimit; private System.Windows.Forms.NumericUpDown nudMaximumItemLimit; private System.Windows.Forms.CheckBox cbRememberSearchText; + private System.Windows.Forms.CheckBox cbRememberWindowState; } } \ No newline at end of file diff --git a/ShareX.HistoryLib/Forms/HistorySettingsForm.cs b/ShareX.HistoryLib/Forms/HistorySettingsForm.cs index 299fc6c69..63b03900e 100644 --- a/ShareX.HistoryLib/Forms/HistorySettingsForm.cs +++ b/ShareX.HistoryLib/Forms/HistorySettingsForm.cs @@ -41,6 +41,7 @@ public HistorySettingsForm(HistorySettings settings) Settings = settings; nudMaximumItemLimit.SetValue(Settings.MaxItemCount); cbRememberSearchText.Checked = Settings.RememberSearchText; + cbRememberWindowState.Checked = Settings.RememberWindowState; } private void nudMaximumItemLimit_ValueChanged(object sender, EventArgs e) @@ -52,5 +53,10 @@ private void cbRememberSearchText_CheckedChanged(object sender, EventArgs e) { Settings.RememberSearchText = cbRememberSearchText.Checked; } + + private void cbRememberWindowState_CheckedChanged(object sender, EventArgs e) + { + Settings.RememberWindowState = cbRememberWindowState.Checked; + } } } \ No newline at end of file diff --git a/ShareX.HistoryLib/Forms/HistorySettingsForm.resx b/ShareX.HistoryLib/Forms/HistorySettingsForm.resx index a76dfaa9f..0ada9d67b 100644 --- a/ShareX.HistoryLib/Forms/HistorySettingsForm.resx +++ b/ShareX.HistoryLib/Forms/HistorySettingsForm.resx @@ -144,7 +144,7 @@ $this - 2 + 3 16, 32 @@ -169,7 +169,7 @@ $this - 1 + 2 True @@ -196,6 +196,33 @@ $this + 1 + + + True + + + 16, 88 + + + 142, 17 + + + 3 + + + Remember window state + + + cbRememberWindowState + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + 0 diff --git a/ShareX.HistoryLib/Forms/ImageHistoryForm.resx b/ShareX.HistoryLib/Forms/ImageHistoryForm.resx index 9cbeca178..b438e967c 100644 --- a/ShareX.HistoryLib/Forms/ImageHistoryForm.resx +++ b/ShareX.HistoryLib/Forms/ImageHistoryForm.resx @@ -138,7 +138,7 @@ 0, 0 - 884, 636 + 994, 636 @@ -157,7 +157,7 @@ 0 - 884, 636 + 994, 636 tscMain.ContentPanel @@ -202,7 +202,7 @@ 2 - 884, 661 + 994, 661 0 @@ -301,7 +301,7 @@ 96, 96 - 884, 661 + 994, 661 CenterScreen diff --git a/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.Designer.cs b/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.Designer.cs index 936dfec07..ba6d72942 100644 --- a/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.Designer.cs +++ b/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.Designer.cs @@ -38,6 +38,7 @@ private void InitializeComponent() this.lblThumbnailSizeUnit = new System.Windows.Forms.Label(); this.cbRememberSearchText = new System.Windows.Forms.CheckBox(); this.cbFilterMissingFiles = new System.Windows.Forms.CheckBox(); + this.cbRememberWindowState = new System.Windows.Forms.CheckBox(); ((System.ComponentModel.ISupportInitialize)(this.nudThumbnailSize)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.nudMaximumImageLimit)).BeginInit(); this.SuspendLayout(); @@ -116,11 +117,19 @@ private void InitializeComponent() this.cbFilterMissingFiles.UseVisualStyleBackColor = true; this.cbFilterMissingFiles.CheckedChanged += new System.EventHandler(this.cbFilterMissingFiles_CheckedChanged); // + // cbRememberWindowState + // + resources.ApplyResources(this.cbRememberWindowState, "cbRememberWindowState"); + this.cbRememberWindowState.Name = "cbRememberWindowState"; + this.cbRememberWindowState.UseVisualStyleBackColor = true; + this.cbRememberWindowState.CheckedChanged += new System.EventHandler(this.cbRememberWindowState_CheckedChanged); + // // ImageHistorySettingsForm // resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi; this.BackColor = System.Drawing.SystemColors.Window; + this.Controls.Add(this.cbRememberWindowState); this.Controls.Add(this.cbFilterMissingFiles); this.Controls.Add(this.cbRememberSearchText); this.Controls.Add(this.lblThumbnailSizeUnit); @@ -151,5 +160,6 @@ private void InitializeComponent() private System.Windows.Forms.Label lblThumbnailSizeUnit; private System.Windows.Forms.CheckBox cbRememberSearchText; private System.Windows.Forms.CheckBox cbFilterMissingFiles; + private System.Windows.Forms.CheckBox cbRememberWindowState; } } \ No newline at end of file diff --git a/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.cs b/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.cs index 701ba83b3..be9c62c7e 100644 --- a/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.cs +++ b/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.cs @@ -46,6 +46,7 @@ public ImageHistorySettingsForm(ImageHistorySettings settings) nudMaximumImageLimit.SetValue(Settings.MaxItemCount); cbFilterMissingFiles.Checked = Settings.FilterMissingFiles; cbRememberSearchText.Checked = Settings.RememberSearchText; + cbRememberWindowState.Checked = Settings.RememberWindowState; } private void cbViewMode_SelectedIndexChanged(object sender, EventArgs e) @@ -72,5 +73,10 @@ private void cbRememberSearchText_CheckedChanged(object sender, EventArgs e) { Settings.RememberSearchText = cbRememberSearchText.Checked; } + + private void cbRememberWindowState_CheckedChanged(object sender, EventArgs e) + { + Settings.RememberWindowState = cbRememberWindowState.Checked; + } } } \ No newline at end of file diff --git a/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.resx b/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.resx index 08fbb17f8..a00830bcf 100644 --- a/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.resx +++ b/ShareX.HistoryLib/Forms/ImageHistorySettingsForm.resx @@ -144,7 +144,7 @@ $this - 8 + 9 True @@ -171,7 +171,7 @@ $this - 7 + 8 True @@ -198,7 +198,7 @@ $this - 6 + 7 16, 32 @@ -219,7 +219,7 @@ $this - 5 + 6 16, 80 @@ -244,7 +244,7 @@ $this - 4 + 5 16, 128 @@ -268,7 +268,7 @@ $this - 3 + 4 True @@ -295,7 +295,7 @@ $this - 2 + 3 True @@ -325,7 +325,7 @@ $this - 1 + 2 True @@ -352,6 +352,33 @@ $this + 1 + + + True + + + 16, 208 + + + 142, 17 + + + 9 + + + Remember window state + + + cbRememberWindowState + + + System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + $this + + 0 @@ -361,7 +388,7 @@ 96, 96 - 344, 218 + 344, 237 CenterScreen