Created the Avalonia MVVM template, split the CLI into Avalonia.UI and Avalonia.Core

This commit is contained in:
2023-08-07 20:37:02 +05:30
parent 6b989db91b
commit 1e6ac3b1fc
22 changed files with 464 additions and 20 deletions

View 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;
}
}