Created the Avalonia MVVM template, split the CLI into Avalonia.UI and Avalonia.Core
This commit is contained in:
25
AutumnLauncher.Core/Configuration.cs
Normal file
25
AutumnLauncher.Core/Configuration.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace AutumnLauncher;
|
||||
|
||||
public static class Configuration
|
||||
{
|
||||
public static string DataDir { get; set; } = Path.Combine(Environment.GetFolderPath(
|
||||
Environment.SpecialFolder.LocalApplicationData,
|
||||
Environment.SpecialFolderOption.Create), "AutumnLauncher");
|
||||
|
||||
public static string ConfigDir { get; set; } = Path.Combine(Environment.GetFolderPath(
|
||||
Environment.SpecialFolder.ApplicationData,
|
||||
Environment.SpecialFolderOption.Create), "AutumnLauncher");
|
||||
|
||||
public static LauncherPlatform Platform { get; set; } = GetPlatform();
|
||||
|
||||
private static LauncherPlatform GetPlatform()
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) return LauncherPlatform.Windows;
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) return LauncherPlatform.Linux;
|
||||
|
||||
return LauncherPlatform.Unsupported;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user