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

Commit eb83828

Browse files
committed
make first column smaller, fix tab stop order in main tab controls, press ESC to clear project search, remove 1-2-3 shortcut keys for tabs, don't focus to search field if type in other tabs, disable TAB character appearing to search field, add Refresh button to unity list tab
1 parent 8f9b534 commit eb83828

File tree

3 files changed

+83
-60
lines changed

3 files changed

+83
-60
lines changed

UnityLauncher/Form1.Designer.cs

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

UnityLauncher/Form1.cs

+18-15
Original file line numberDiff line numberDiff line change
@@ -758,23 +758,24 @@ private void unityGridView_KeyDown(object sender, KeyEventArgs e)
758758
/// <param name="e"></param>
759759
private void Form1_KeyPress(object sender, KeyPressEventArgs e)
760760
{
761-
switch (e.KeyChar)
761+
//Console.WriteLine((int)e.KeyChar);
762+
switch ((int)e.KeyChar)
762763
{
763-
case '1':
764-
tabControl1.SelectedIndex = 0;
765-
break;
766-
case '2':
767-
tabControl1.SelectedIndex = 1;
768-
break;
769-
case '3':
770-
tabControl1.SelectedIndex = 2;
771-
break;
772-
case '4':
773-
tabControl1.SelectedIndex = 3;
764+
case 27: // ESC - clear search
765+
if (tabControl1.SelectedIndex == 0 && tbSearchBar.Text != "")
766+
{
767+
tbSearchBar.Text = "";
768+
}
774769
break;
775-
default:
776-
if (!tbSearchBar.Focused)
770+
default: // any key
771+
// activate searchbar if not active and we are in tab#1
772+
if (tabControl1.SelectedIndex == 0 && tbSearchBar.Focused == false)
777773
{
774+
// skip tab key on search field
775+
if ((int)e.KeyChar == 9)
776+
{
777+
break;
778+
}
778779
tbSearchBar.Focus();
779780
tbSearchBar.Text += e.KeyChar;
780781
tbSearchBar.Select(tbSearchBar.Text.Length, 0);
@@ -783,6 +784,8 @@ private void Form1_KeyPress(object sender, KeyPressEventArgs e)
783784
}
784785
}
785786

787+
788+
786789
/// <summary>
787790
/// grid keys
788791
/// </summary>
@@ -1039,6 +1042,6 @@ void DisplayUpgradeDialog(string currentVersion, string projectPath, bool launch
10391042
upgradeDialog.Close();
10401043
}
10411044

1042-
1045+
10431046
}
10441047
}

UnityLauncher/Form1.resx

+3
Original file line numberDiff line numberDiff line change
@@ -1033,6 +1033,9 @@
10331033
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
10341034
<value>374, 17</value>
10351035
</metadata>
1036+
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
1037+
<value>37</value>
1038+
</metadata>
10361039
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
10371040
<value>
10381041
AAABAA0AICAQAAEABADoAgAA1gAAABAQEAABAAQAKAEAAL4DAAAwMAAAAQAIAKgOAADmBAAAICAAAAEA

0 commit comments

Comments
 (0)