Skip to content
This repository was archived by the owner on May 19, 2021. It is now read-only.

Added possibility to search through recent projects #18

Merged
merged 1 commit into from
Nov 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions UnityLauncher/Form1.Designer.cs

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

16 changes: 16 additions & 0 deletions UnityLauncher/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,16 @@ private string GetUnityVersion(string path)
return fvi.ProductName.Replace("(64-bit)", "").Trim();
}

void FilterRecentProject(object sender, EventArgs e)
{
SetStatus("Filtering recent projects list..");
foreach (DataGridViewRow recentProject in gridRecent.Rows)
{
if (recentProject.Cells["_project"].Value.ToString().ToLower().Contains(tbSearchBar.Text.ToLower()))
recentProject.Visible = true;
else recentProject.Visible = false;
}
}

// returns already sorted list of recent entries
void UpdateRecentProjectsList()
Expand Down Expand Up @@ -691,6 +701,12 @@ private void Form1_KeyPress(object sender, KeyPressEventArgs e)
tabControl1.SelectedIndex = 3;
break;
default:
if (!tbSearchBar.Focused)
{
tbSearchBar.Focus();
tbSearchBar.Text += e.KeyChar;
tbSearchBar.Select(tbSearchBar.Text.Length,0);
}
break;
}
}
Expand Down