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

Commit 49c38eb

Browse files
authored
Merge pull request #18 from 1youri/master
Added possibility to search through recent projects
2 parents d835ca2 + c093775 commit 49c38eb

File tree

2 files changed

+30
-5
lines changed

2 files changed

+30
-5
lines changed

Diff for: UnityLauncher/Form1.Designer.cs

+14-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: UnityLauncher/Form1.cs

+16
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,16 @@ private string GetUnityVersion(string path)
228228
return fvi.ProductName.Replace("(64-bit)", "").Trim();
229229
}
230230

231+
void FilterRecentProject(object sender, EventArgs e)
232+
{
233+
SetStatus("Filtering recent projects list..");
234+
foreach (DataGridViewRow recentProject in gridRecent.Rows)
235+
{
236+
if (recentProject.Cells["_project"].Value.ToString().ToLower().Contains(tbSearchBar.Text.ToLower()))
237+
recentProject.Visible = true;
238+
else recentProject.Visible = false;
239+
}
240+
}
231241

232242
// returns already sorted list of recent entries
233243
void UpdateRecentProjectsList()
@@ -691,6 +701,12 @@ private void Form1_KeyPress(object sender, KeyPressEventArgs e)
691701
tabControl1.SelectedIndex = 3;
692702
break;
693703
default:
704+
if (!tbSearchBar.Focused)
705+
{
706+
tbSearchBar.Focus();
707+
tbSearchBar.Text += e.KeyChar;
708+
tbSearchBar.Select(tbSearchBar.Text.Length,0);
709+
}
694710
break;
695711
}
696712
}

0 commit comments

Comments
 (0)