-
Notifications
You must be signed in to change notification settings - Fork 73
Expand file tree
/
Copy pathUnityInstallation.cs
More file actions
32 lines (28 loc) · 1.2 KB
/
UnityInstallation.cs
File metadata and controls
32 lines (28 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Windows.Data;
namespace UnityLauncherPro
{
public class UnityInstallation : IValueConverter
{
public string Version { set; get; }
public long VersionCode { set; get; } // version as number, cached for sorting
public string Path { set; get; } // exe path
public DateTime? Installed { set; get; }
public string PlatformsCombined { set; get; }
public string[] Platforms { set; get; }
public int ProjectCount { set; get; }
public bool IsPreferred { set; get; }
public string ReleaseType { set; get; } // Alpha, Beta, LTS.. TODO could be enum
// https://stackoverflow.com/a/5551986/5452781
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
string version = value as string;
if (string.IsNullOrEmpty(version)) return null;
return MainWindow.unityInstalledVersions.ContainsKey(version);
}
public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
{
throw new NotSupportedException();
}
}
}