Skip to content

Commit 0a91658

Browse files
committed
add rootfolders settings, add rootfolder scanning, cleanup, add arrowkey up/down for upgrade search box,
1 parent 62bc04a commit 0a91658

File tree

8 files changed

+395
-321
lines changed

8 files changed

+395
-321
lines changed

UnityLauncherPro/App.config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@
1616
<setting name="windowHeight" serializeAs="String">
1717
<value>650</value>
1818
</setting>
19+
<setting name="rootFolders" serializeAs="Xml">
20+
<value>
21+
<ArrayOfString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22+
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
23+
<string>C:\Program Files\</string>
24+
</ArrayOfString>
25+
</value>
26+
</setting>
1927
</UnityLauncherPro.Properties.Settings>
2028
</userSettings>
2129
</configuration>

UnityLauncherPro/GetUnityInstallations.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
using System;
22
using System.Collections.Generic;
33
using System.IO;
4-
using System.Text.RegularExpressions;
54

65
namespace UnityLauncherPro
76
{
@@ -10,8 +9,12 @@ namespace UnityLauncherPro
109
/// </summary>
1110
public static class GetUnityInstallations
1211
{
13-
public static UnityInstallation[] Scan(string[] rootFolders)
12+
//public static UnityInstallation[] Scan(string[] rootFolders)
13+
public static UnityInstallation[] Scan()
1414
{
15+
// convert settings list to string array
16+
var rootFolders = Properties.Settings.Default.rootFolders;
17+
1518
// unityversion, exe_path
1619
//Dictionary<string, UnityInstallation> results = new ictionary<string, UnityInstallation>();
1720
List<UnityInstallation> results = new List<UnityInstallation>();

UnityLauncherPro/GetUnityUpdates.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Globalization;
4-
using System.Linq;
54
using System.Net;
6-
using System.Text;
75
using System.Threading.Tasks;
8-
using System.Windows.Controls;
96

107
namespace UnityLauncherPro
118
{
@@ -29,12 +26,6 @@ public static async Task<string> Scan()
2926
// download list of Unity versions
3027
using (WebClient webClient = new WebClient())
3128
{
32-
/*
33-
webClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(UnityVersionsListDownloaded);
34-
var unityVersionsURL = @"http://symbolserver.unity3d.com/000Admin/history.txt";
35-
webClient.DownloadStringAsync(new Uri(unityVersionsURL));
36-
*/
37-
3829
var unityVersionsURL = @"http://symbolserver.unity3d.com/000Admin/history.txt";
3930
Task<string> downloadStringTask = webClient.DownloadStringTaskAsync(new Uri(unityVersionsURL));
4031
result = await downloadStringTask;

UnityLauncherPro/MainWindow.xaml

Lines changed: 62 additions & 61 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)