From 80750ea84dc2c9d399942b51cd1f9a96f3ea8434 Mon Sep 17 00:00:00 2001 From: Dan Weinert Date: Tue, 3 Mar 2015 19:18:08 +1100 Subject: [PATCH] #532: Filename text length will now check/uncheck 'Filename filter' checkbox. 'Apply filters' button now default accept button. --- ShareX.HistoryLib/HistoryForm.Designer.cs | 2 ++ ShareX.HistoryLib/HistoryForm.cs | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/ShareX.HistoryLib/HistoryForm.Designer.cs b/ShareX.HistoryLib/HistoryForm.Designer.cs index 3c0858081..05305391b 100644 --- a/ShareX.HistoryLib/HistoryForm.Designer.cs +++ b/ShareX.HistoryLib/HistoryForm.Designer.cs @@ -97,6 +97,7 @@ private void InitializeComponent() // resources.ApplyResources(this.txtFilenameFilter, "txtFilenameFilter"); this.txtFilenameFilter.Name = "txtFilenameFilter"; + this.txtFilenameFilter.TextChanged += new System.EventHandler(this.txtFilenameFilter_TextChanged); // // cbFilenameFilterMethod // @@ -253,6 +254,7 @@ private void InitializeComponent() // // HistoryForm // + this.AcceptButton = this.btnApplyFilters; resources.ApplyResources(this, "$this"); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.lvHistory); diff --git a/ShareX.HistoryLib/HistoryForm.cs b/ShareX.HistoryLib/HistoryForm.cs index 2002eddcb..37a1bb6ce 100644 --- a/ShareX.HistoryLib/HistoryForm.cs +++ b/ShareX.HistoryLib/HistoryForm.cs @@ -330,6 +330,11 @@ private void lvHistory_KeyDown(object sender, KeyEventArgs e) e.Handled = true; } + private void txtFilenameFilter_TextChanged(object sender, EventArgs e) + { + cbFilenameFilter.Checked = txtFilenameFilter.TextLength > 0; + } + #endregion Form events } } \ No newline at end of file