Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on May 19, 2021. It is now read-only.

Commit 84b4242

Browse files
add searchbox in updates tab (to filter unity versions), update release url fixes #66, project list is refreshed after unity list is refreshed manually closes issue #19
1 parent 87e7ad7 commit 84b4242

File tree

6 files changed

+114
-56
lines changed

6 files changed

+114
-56
lines changed

‎UnityLauncher/Form1.Designer.cs‎

Lines changed: 49 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎UnityLauncher/Form1.cs‎

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,15 +237,33 @@ bool ScanUnityInstallations()
237237
void FilterRecentProject(object sender, EventArgs e)
238238
{
239239
SetStatus("Filtering recent projects list ...");
240-
foreach (DataGridViewRow recentProject in gridRecent.Rows)
240+
string searchString = tbSearchBar.Text;
241+
foreach (DataGridViewRow row in gridRecent.Rows)
241242
{
242-
if (recentProject.Cells["_project"].Value.ToString().IndexOf(tbSearchBar.Text, StringComparison.OrdinalIgnoreCase) > -1)
243+
if (row.Cells["_project"].Value.ToString().IndexOf(searchString, StringComparison.OrdinalIgnoreCase) > -1)
243244
{
244-
recentProject.Visible = true;
245+
row.Visible = true;
245246
}
246247
else
247248
{
248-
recentProject.Visible = false;
249+
row.Visible = false;
250+
}
251+
}
252+
}
253+
254+
void FilterUnityUpdates(object sender, EventArgs e)
255+
{
256+
SetStatus("Filtering Unity updates list ...");
257+
string searchString = tbSearchUpdates.Text;
258+
foreach (DataGridViewRow row in gridUnityUpdates.Rows)
259+
{
260+
if (row.Cells["_UnityUpdateVersion"].Value.ToString().IndexOf(searchString, StringComparison.OrdinalIgnoreCase) > -1)
261+
{
262+
row.Visible = true;
263+
}
264+
else
265+
{
266+
row.Visible = false;
249267
}
250268
}
251269
}
@@ -666,6 +684,7 @@ private void btnAddUnityFolder_Click(object sender, EventArgs e)
666684
{
667685
AddUnityInstallationRootFolder();
668686
ScanUnityInstallations();
687+
UpdateRecentProjectsList();
669688
}
670689

671690
private void btnRemoveInstallFolder_Click(object sender, EventArgs e)
@@ -694,6 +713,7 @@ private void unityGridView_KeyDown(object sender, KeyEventArgs e)
694713
break;
695714
case Keys.F5: // refresh installed Unity versions list
696715
ScanUnityInstallations();
716+
UpdateRecentProjectsList();
697717
break;
698718
default:
699719
break;
@@ -712,11 +732,15 @@ private void Form1_KeyPress(object sender, KeyPressEventArgs e)
712732

713733
switch ((int)e.KeyChar)
714734
{
715-
case 27: // ESC - clear search
735+
case 27: // ESCAPE - clear search
716736
if (tabControl1.SelectedIndex == 0 && tbSearchBar.Text != "")
717737
{
718738
tbSearchBar.Text = "";
719739
}
740+
else if (tabControl1.SelectedIndex == 3 && tbSearchUpdates.Text != "")
741+
{
742+
tbSearchUpdates.Text = "";
743+
}
720744
break;
721745
default: // any key
722746
// activate searchbar if not active and we are in tab#1
@@ -800,6 +824,7 @@ private void Form1_Resize(object sender, EventArgs e)
800824
private void btnRefresh_Click(object sender, EventArgs e)
801825
{
802826
ScanUnityInstallations();
827+
UpdateRecentProjectsList();
803828
}
804829

805830
private void notifyIcon_MouseClick(object sender, MouseEventArgs e)

‎UnityLauncher/Form1.resx‎

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,16 +117,10 @@
117117
<resheader name="writer">
118118
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120-
<metadata name="_unityVersion.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
121-
<value>True</value>
122-
</metadata>
123-
<metadata name="_unityPath.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
124-
<value>True</value>
125-
</metadata>
126-
<metadata name="_unityInstallDate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
120+
<metadata name="_Date.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
127121
<value>True</value>
128122
</metadata>
129-
<metadata name="_Platforms.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
123+
<metadata name="_UnityUpdateVersion.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
130124
<value>True</value>
131125
</metadata>
132126
<metadata name="toolTip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
@@ -168,10 +162,28 @@
168162
<metadata name="_gitBranch.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
169163
<value>True</value>
170164
</metadata>
171-
<metadata name="_Date.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
165+
<metadata name="_unityVersion.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
172166
<value>True</value>
173167
</metadata>
174-
<metadata name="_UnityUpdateVersion.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
168+
<metadata name="_unityPath.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
169+
<value>True</value>
170+
</metadata>
171+
<metadata name="_unityInstallDate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
172+
<value>True</value>
173+
</metadata>
174+
<metadata name="_Platforms.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
175+
<value>True</value>
176+
</metadata>
177+
<metadata name="_unityVersion.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
178+
<value>True</value>
179+
</metadata>
180+
<metadata name="_unityPath.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
181+
<value>True</value>
182+
</metadata>
183+
<metadata name="_unityInstallDate.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
184+
<value>True</value>
185+
</metadata>
186+
<metadata name="_Platforms.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
175187
<value>True</value>
176188
</metadata>
177189
<metadata name="_Date.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
@@ -1078,6 +1090,9 @@
10781090
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
10791091
<value>374, 17</value>
10801092
</metadata>
1093+
<metadata name="backgroundWorker1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
1094+
<value>17, 56</value>
1095+
</metadata>
10811096
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
10821097
<value>25</value>
10831098
</metadata>

‎UnityLauncher/PreviousVersion.txt‎

0 Bytes
Binary file not shown.

‎UnityLauncher/Tools.cs‎

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public static string ReadGitBranchInfo(string projectPath)
3131
{
3232
string results = null;
3333
DirectoryInfo gitDirectory = FindDir(".git", projectPath);
34-
if (gitDirectory != null)
34+
if (gitDirectory != null)
3535
{
3636
string branchFile = Path.Combine(gitDirectory.FullName, "HEAD");
3737
if (File.Exists(branchFile))
@@ -57,9 +57,9 @@ public static string ReadGitBranchInfo(string projectPath)
5757
public static DirectoryInfo FindDir(string dirName, string startPath)
5858
{
5959
DirectoryInfo dirInfo = new DirectoryInfo(Path.Combine(startPath, dirName));
60-
while (!dirInfo.Exists)
60+
while (!dirInfo.Exists)
6161
{
62-
if(dirInfo.Parent.Parent == null)
62+
if(dirInfo.Parent.Parent == null)
6363
{
6464
return null;
6565
}
@@ -111,6 +111,10 @@ public static string ReadCustomLaunchArguments(string projectPath, string launch
111111
/// <returns></returns>
112112
public static string FindNearestVersion(string currentVersion, List<string> allAvailable)
113113
{
114+
if (currentVersion.Contains("2018"))
115+
{
116+
return FindNearestVersionFromSimilarVersions(currentVersion, allAvailable.Where(x => x.Contains("2018")));
117+
}
114118
if (currentVersion.Contains("2017"))
115119
{
116120
return FindNearestVersionFromSimilarVersions(currentVersion, allAvailable.Where(x => x.Contains("2017")));
@@ -173,7 +177,7 @@ public static string GetUnityReleaseURL(string version)
173177
if (version.Contains("f")) // archived
174178
{
175179
version = Regex.Replace(version, @"f.", "", RegexOptions.IgnoreCase);
176-
url = "https://unity3d.com/unity/whats-new/unity-" + version;
180+
url = "https://unity3d.com/unity/whatsnew/unity-" + version;
177181
}
178182
if (version.Contains("p")) // patch version
179183
{
@@ -252,7 +256,7 @@ public static string GetProjectVersion(string path)
252256
{
253257
var version = "";
254258

255-
if(File.Exists(Path.Combine(path, "ProjectVersionOverride.txt")))
259+
if(File.Exists(Path.Combine(path, "ProjectVersionOverride.txt")))
256260
{
257261
version = File.ReadAllText(Path.Combine(path, "ProjectVersionOverride.txt"));
258262
}

‎UnityLauncher/UnityLauncher.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
<GenerateManifests>true</GenerateManifests>
5757
</PropertyGroup>
5858
<PropertyGroup>
59-
<SignManifests>true</SignManifests>
59+
<SignManifests>false</SignManifests>
6060
</PropertyGroup>
6161
<PropertyGroup>
6262
<ApplicationIcon>unitylauncher.ico</ApplicationIcon>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /