Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
mastersign committed Jul 6, 2018
2 parents 76428c2 + 4397324 commit a38e4df
Show file tree
Hide file tree
Showing 11 changed files with 284 additions and 238 deletions.
4 changes: 2 additions & 2 deletions BenchManager/BenchCLI/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
// übernehmen, indem Sie "*" eingeben:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.20.2.0")]
[assembly: AssemblyFileVersion("0.20.2.0")]
[assembly: AssemblyVersion("0.20.3.0")]
[assembly: AssemblyFileVersion("0.20.3.0")]
24 changes: 16 additions & 8 deletions BenchManager/BenchDashboard/AppList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,24 +115,20 @@ private void InitializeAppList()
AsyncManager.StartTask(() =>
{
appLookup.Clear();
var list = new List<AppWrapper>();
var cnt = 0;
foreach (var app in core.Config.Apps)
{
cnt++;
app.LoadCachedValues();
var wrapper = new AppWrapper(app, cnt);
list.Add(wrapper);
appLookup[app.ID] = wrapper;
}
var bindingList = new SortedBindingList<AppWrapper>(list);
BeginInvoke((ThreadStart)(() =>
{
var selectedRow = gridApps.SelectedRows.Count > 0 ? gridApps.SelectedRows[0].Index : -10;
gridApps.SuspendLayout();
gridApps.DataSource = bindingList;
UpdateAppGridView();
if (sortedColumn != null)
{
gridApps.Sort(sortedColumn, sortDirection);
Expand Down Expand Up @@ -387,10 +383,12 @@ private void gridApps_CellDoubleClick(object sender, DataGridViewCellEventArgs e

#region Search

private void txtSearch_TextChanged(object sender, EventArgs e)
public bool HasSearchFilter => !string.IsNullOrWhiteSpace(txtSearch.Text);

private void UpdateAppGridView()
{
var apps = appLookup.Values;
if (!string.IsNullOrWhiteSpace(txtSearch.Text))
if (HasSearchFilter)
{
var searchWords = AppSearch.TokenizeSearchString(txtSearch.Text).Select(AppSearch.NormalizeForSearch).ToArray();
var sortedList = new SortedBindingList<AppWrapper>(apps
Expand All @@ -405,11 +403,21 @@ private void txtSearch_TextChanged(object sender, EventArgs e)
}
}

private void btnClearSearch_Click(object sender, EventArgs e)
public void ResetSearchFilter()
{
txtSearch.Text = string.Empty;
}

private void txtSearch_TextChanged(object sender, EventArgs e)
{
UpdateAppGridView();
}

private void btnClearSearch_Click(object sender, EventArgs e)
{
ResetSearchFilter();
}

#endregion
}

Expand Down
4 changes: 2 additions & 2 deletions BenchManager/BenchDashboard/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.20.2.0")]
[assembly: AssemblyFileVersion("0.20.2.0")]
[assembly: AssemblyVersion("0.20.3.0")]
[assembly: AssemblyFileVersion("0.20.3.0")]
98 changes: 54 additions & 44 deletions BenchManager/BenchDashboard/SetupForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 13 additions & 3 deletions BenchManager/BenchDashboard/SetupForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ private void SetupForm_Load(object sender, EventArgs e)
InitializeAppListColumnsMenu();
InitializeAppList();
UpdatePendingCounts();
CoreBusyChangedHandler(core, EventArgs.Empty);

if (core.SetupOnStartup)
{
Expand Down Expand Up @@ -208,6 +209,7 @@ private void CoreBusyChangedHandler(object sender, EventArgs e)
{
tsmi.Enabled = !busy;
}
tsmiShowLastLogfile.Enabled = !busy && core.LastActionResult?.LogFile != null;
btnAuto.Image = !busy
? Resources.do_32
: Resources.stop_32;
Expand Down Expand Up @@ -651,11 +653,19 @@ private async void KeyDownDownHandler(object sender, KeyEventArgs e)
{
var cancelation = core.Cancelation;
if (cancelation != null) cancelation.Cancel();
return;
}
else
if (BusyPanelVisible)
{
BusyPanelVisible = false;
return;
}
if (appList.HasSearchFilter)
{
Close();
appList.ResetSearchFilter();
return;
}
Close();
}
else if (e.KeyCode == Keys.F && e.Modifiers == Keys.Control)
appList.FocusSearchBox();
Expand Down Expand Up @@ -702,7 +712,7 @@ private void CloseHandler(object sender, EventArgs e)

private void ShowLastLogHandler(object sender, EventArgs e)
{
var logFile = core?.LastActionResult?.LogFile;
var logFile = core.LastActionResult?.LogFile;
if (string.IsNullOrWhiteSpace(logFile)) return;
if (File.Exists(logFile))
{
Expand Down
12 changes: 6 additions & 6 deletions BenchManager/BenchDashboard/SetupForm.resx
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,6 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>266, 17</value>
</metadata>
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="toolStripSeparator4.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
Expand All @@ -135,6 +129,12 @@
<metadata name="toolStripSeparator1.GenerateMember" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>False</value>
</metadata>
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>266, 17</value>
</metadata>
<metadata name="menuStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>62</value>
</metadata>
Expand Down
4 changes: 2 additions & 2 deletions BenchManager/BenchLib/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.20.2.0")]
[assembly: AssemblyFileVersion("0.20.2.0")]
[assembly: AssemblyVersion("0.20.3.0")]
[assembly: AssemblyFileVersion("0.20.3.0")]
Loading

0 comments on commit a38e4df

Please sign in to comment.