diff --git a/ShareX.HistoryLib/Forms/HistoryForm.cs b/ShareX.HistoryLib/Forms/HistoryForm.cs
index 00789b7b5..e20e3268f 100644
--- a/ShareX.HistoryLib/Forms/HistoryForm.cs
+++ b/ShareX.HistoryLib/Forms/HistoryForm.cs
@@ -191,8 +191,7 @@ private void ApplyFilterSimple()
HistoryFilter filter = new HistoryFilter()
{
- Filename = searchText,
- MaxItemCount = Settings.MaxItemCount
+ Filename = searchText
};
ApplyFilter(filter);
@@ -208,8 +207,7 @@ private void ApplyFilterAdvanced()
FromDate = dtpFilterFrom.Value.Date,
ToDate = dtpFilterTo.Value.Date,
FilterHost = cbHostFilter.Checked,
- Host = cbHostFilterSelection.Text,
- MaxItemCount = Settings.MaxItemCount
+ Host = cbHostFilterSelection.Text
};
if (cbTypeFilter.Checked && allTypeNames.IsValidIndex(cbTypeFilterSelection.SelectedIndex))
@@ -450,17 +448,10 @@ private void tsbShowStats_Click(object sender, EventArgs e)
private void tsbSettings_Click(object sender, EventArgs e)
{
- int maxItemCount = Settings.MaxItemCount;
-
using (HistorySettingsForm form = new HistorySettingsForm(Settings))
{
form.ShowDialog();
}
-
- if (maxItemCount != Settings.MaxItemCount)
- {
- RefreshHistoryItems();
- }
}
private void txtFilenameFilter_KeyDown(object sender, KeyEventArgs e)
diff --git a/ShareX.HistoryLib/Forms/HistorySettingsForm.Designer.cs b/ShareX.HistoryLib/Forms/HistorySettingsForm.Designer.cs
index 2fc1f66ac..f6bb96a68 100644
--- a/ShareX.HistoryLib/Forms/HistorySettingsForm.Designer.cs
+++ b/ShareX.HistoryLib/Forms/HistorySettingsForm.Designer.cs
@@ -30,29 +30,10 @@ protected override void Dispose(bool disposing)
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(HistorySettingsForm));
- 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();
//
- // lblMaximumItemLimit
- //
- resources.ApplyResources(this.lblMaximumItemLimit, "lblMaximumItemLimit");
- this.lblMaximumItemLimit.Name = "lblMaximumItemLimit";
- //
- // nudMaximumItemLimit
- //
- resources.ApplyResources(this.nudMaximumItemLimit, "nudMaximumItemLimit");
- this.nudMaximumItemLimit.Maximum = new decimal(new int[] {
- 10000,
- 0,
- 0,
- 0});
- this.nudMaximumItemLimit.Name = "nudMaximumItemLimit";
- this.nudMaximumItemLimit.ValueChanged += new System.EventHandler(this.nudMaximumItemLimit_ValueChanged);
- //
// cbRememberSearchText
//
resources.ApplyResources(this.cbRememberSearchText, "cbRememberSearchText");
@@ -74,21 +55,15 @@ private void InitializeComponent()
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);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.MaximizeBox = false;
this.Name = "HistorySettingsForm";
- ((System.ComponentModel.ISupportInitialize)(this.nudMaximumItemLimit)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
-
- private System.Windows.Forms.Label lblMaximumItemLimit;
- private System.Windows.Forms.NumericUpDown nudMaximumItemLimit;
private System.Windows.Forms.CheckBox cbRememberSearchText;
private System.Windows.Forms.CheckBox cbRememberWindowState;
}
diff --git a/ShareX.HistoryLib/Forms/HistorySettingsForm.cs b/ShareX.HistoryLib/Forms/HistorySettingsForm.cs
index 63b03900e..cc26eddca 100644
--- a/ShareX.HistoryLib/Forms/HistorySettingsForm.cs
+++ b/ShareX.HistoryLib/Forms/HistorySettingsForm.cs
@@ -39,16 +39,10 @@ public HistorySettingsForm(HistorySettings settings)
ShareXResources.ApplyTheme(this);
Settings = settings;
- nudMaximumItemLimit.SetValue(Settings.MaxItemCount);
cbRememberSearchText.Checked = Settings.RememberSearchText;
cbRememberWindowState.Checked = Settings.RememberWindowState;
}
- private void nudMaximumItemLimit_ValueChanged(object sender, EventArgs e)
- {
- Settings.MaxItemCount = (int)nudMaximumItemLimit.Value;
- }
-
private void cbRememberSearchText_CheckedChanged(object sender, EventArgs e)
{
Settings.RememberSearchText = cbRememberSearchText.Checked;
diff --git a/ShareX.HistoryLib/Forms/HistorySettingsForm.resx b/ShareX.HistoryLib/Forms/HistorySettingsForm.resx
index 8729fa400..ef80e3104 100644
--- a/ShareX.HistoryLib/Forms/HistorySettingsForm.resx
+++ b/ShareX.HistoryLib/Forms/HistorySettingsForm.resx
@@ -118,70 +118,18 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- True
-
-
-
- 13, 16
-
-
- 96, 13
-
-
- 0
-
-
- Maximum item limit:
-
-
- lblMaximumItemLimit
-
-
- System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- $this
-
-
- 3
-
-
- 16, 32
-
-
- 64, 20
-
-
- 1
-
-
-
- Center
-
-
- nudMaximumItemLimit
-
-
- System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- $this
-
-
- 2
-
True
+
- 16, 64
+ 16, 16
138, 17
- 2
+ 0
Remember search input
@@ -202,13 +150,13 @@
True
- 16, 88
+ 16, 40
142, 17
- 3
+ 1
Remember window state
@@ -234,6 +182,7 @@
334, 211
+
CenterScreen
diff --git a/ShareX.HistoryLib/HistorySettings.cs b/ShareX.HistoryLib/HistorySettings.cs
index 46f6166c3..a01393daf 100644
--- a/ShareX.HistoryLib/HistorySettings.cs
+++ b/ShareX.HistoryLib/HistorySettings.cs
@@ -32,7 +32,6 @@ public class HistorySettings
public bool RememberWindowState { get; set; } = true;
public WindowState WindowState { get; set; } = new WindowState();
public int SplitterDistance { get; set; } = 550;
- public int MaxItemCount { get; set; } = 0;
public bool RememberSearchText { get; set; } = false;
public string SearchText { get; set; } = "";
}