diff --git a/App.axaml b/App.axaml new file mode 100644 index 0000000..79d46df --- /dev/null +++ b/App.axaml @@ -0,0 +1,16 @@ + + + + + + + + + avares://wheel_mcl/Assets/Fonts/LXGWWenKai.ttf#LXGW WenKai + + \ No newline at end of file diff --git a/App.axaml.cs b/App.axaml.cs new file mode 100644 index 0000000..cfc3dc2 --- /dev/null +++ b/App.axaml.cs @@ -0,0 +1,26 @@ +using Avalonia; +using Avalonia.Controls.ApplicationLifetimes; +using Avalonia.Markup.Xaml; +using Avalonia.Media; + +namespace wheel_mcl +{ + public partial class App : Application + { + public override void Initialize() + { + AvaloniaXamlLoader.Load(this); + base.Initialize(); + } + + public override void OnFrameworkInitializationCompleted() + { + if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop) + { + desktop.MainWindow = new MainWindow(); + } + + base.OnFrameworkInitializationCompleted(); + } + } +} \ No newline at end of file diff --git a/AppBuilderExtension.cs b/AppBuilderExtension.cs new file mode 100644 index 0000000..931e44d --- /dev/null +++ b/AppBuilderExtension.cs @@ -0,0 +1,16 @@ +using Avalonia.Media; + +namespace Avalonia; + +public static class AppBuilderExtension +{ + public static AppBuilder WithFont_LXGWWenKai(this AppBuilder appBuilder) + { + var uri = "avares://wheel_mcl/Assets/Fonts/LXGWWenKai.ttf#LXGW WenKai"; + return appBuilder.With(new FontManagerOptions() + { + DefaultFamilyName = uri, + FontFallbacks = new[] { new FontFallback { FontFamily = new FontFamily(uri) } } + }); + } +} \ No newline at end of file diff --git a/Assets/Fonts/LXGWWenKai.ttf b/Assets/Fonts/LXGWWenKai.ttf new file mode 100644 index 0000000..bf8a99b Binary files /dev/null and b/Assets/Fonts/LXGWWenKai.ttf differ diff --git a/Assets/Fonts/LXGWWenKaiMono.ttf b/Assets/Fonts/LXGWWenKaiMono.ttf new file mode 100644 index 0000000..d16339a Binary files /dev/null and b/Assets/Fonts/LXGWWenKaiMono.ttf differ diff --git a/MainWindow.axaml b/MainWindow.axaml new file mode 100644 index 0000000..d91bb8a --- /dev/null +++ b/MainWindow.axaml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/MainWindow.axaml.cs b/MainWindow.axaml.cs new file mode 100644 index 0000000..1e733bf --- /dev/null +++ b/MainWindow.axaml.cs @@ -0,0 +1,12 @@ +using Avalonia.Controls; + +namespace wheel_mcl +{ + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + } +} \ No newline at end of file diff --git a/Pages/About.axaml b/Pages/About.axaml new file mode 100644 index 0000000..c4fa4f7 --- /dev/null +++ b/Pages/About.axaml @@ -0,0 +1,5 @@ + + This is About + diff --git a/Pages/About.axaml.cs b/Pages/About.axaml.cs new file mode 100644 index 0000000..d024431 --- /dev/null +++ b/Pages/About.axaml.cs @@ -0,0 +1,13 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace wheel_mcl; + +public partial class About : UserControl +{ + public About() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/Pages/Downloads.axaml b/Pages/Downloads.axaml new file mode 100644 index 0000000..cba1879 --- /dev/null +++ b/Pages/Downloads.axaml @@ -0,0 +1,5 @@ + + This is Downloads! + diff --git a/Pages/Downloads.axaml.cs b/Pages/Downloads.axaml.cs new file mode 100644 index 0000000..d5b5030 --- /dev/null +++ b/Pages/Downloads.axaml.cs @@ -0,0 +1,13 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace wheel_mcl; + +public partial class Downloads : UserControl +{ + public Downloads() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/Pages/Home.axaml b/Pages/Home.axaml new file mode 100644 index 0000000..5bcdfb4 --- /dev/null +++ b/Pages/Home.axaml @@ -0,0 +1,5 @@ + + This is Home + diff --git a/Pages/Home.axaml.cs b/Pages/Home.axaml.cs new file mode 100644 index 0000000..2303bf6 --- /dev/null +++ b/Pages/Home.axaml.cs @@ -0,0 +1,13 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace wheel_mcl; + +public partial class Home : UserControl +{ + public Home() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/Pages/Settings.axaml b/Pages/Settings.axaml new file mode 100644 index 0000000..b855ee2 --- /dev/null +++ b/Pages/Settings.axaml @@ -0,0 +1,5 @@ + + This is Settings + diff --git a/Pages/Settings.axaml.cs b/Pages/Settings.axaml.cs new file mode 100644 index 0000000..2ffc22a --- /dev/null +++ b/Pages/Settings.axaml.cs @@ -0,0 +1,13 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace wheel_mcl; + +public partial class Settings : UserControl +{ + public Settings() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/Pages/Tools.axaml b/Pages/Tools.axaml new file mode 100644 index 0000000..6b80429 --- /dev/null +++ b/Pages/Tools.axaml @@ -0,0 +1,5 @@ + + This is Tools! + diff --git a/Pages/Tools.axaml.cs b/Pages/Tools.axaml.cs new file mode 100644 index 0000000..b6abd72 --- /dev/null +++ b/Pages/Tools.axaml.cs @@ -0,0 +1,13 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Markup.Xaml; + +namespace wheel_mcl; + +public partial class Tools : UserControl +{ + public Tools() + { + InitializeComponent(); + } +} \ No newline at end of file diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..36adc76 --- /dev/null +++ b/Program.cs @@ -0,0 +1,23 @@ +using Avalonia; +using System; +using System.Runtime.InteropServices; + +namespace wheel_mcl +{ + internal class Program + { + // Initialization code. Don't use any Avalonia, third-party APIs or any + // SynchronizationContext-reliant code before AppMain is called: things aren't initialized + // yet and stuff might break. + [STAThread] + public static void Main(string[] args) => BuildAvaloniaApp() + .StartWithClassicDesktopLifetime(args); + + // Avalonia configuration, don't remove; also used by visual designer. + public static AppBuilder BuildAvaloniaApp() + => AppBuilder.Configure() + .UsePlatformDetect() + .WithFont_LXGWWenKai() + .LogToTrace(); + } +} diff --git a/app.manifest b/app.manifest new file mode 100644 index 0000000..42a93c6 --- /dev/null +++ b/app.manifest @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + diff --git a/wheel_mcl.csproj b/wheel_mcl.csproj new file mode 100644 index 0000000..a9ce5a8 --- /dev/null +++ b/wheel_mcl.csproj @@ -0,0 +1,29 @@ + + + WinExe + net8.0 + enable + true + app.manifest + true + true + + + + + + + + + + + + + + + + + + + + diff --git a/wheel_mcl.sln b/wheel_mcl.sln new file mode 100644 index 0000000..ea04d5f --- /dev/null +++ b/wheel_mcl.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34525.116 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "wheel_mcl", "wheel_mcl.csproj", "{CD9E6832-7FE8-4DF8-8B47-D836EA1DF961}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {CD9E6832-7FE8-4DF8-8B47-D836EA1DF961}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CD9E6832-7FE8-4DF8-8B47-D836EA1DF961}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CD9E6832-7FE8-4DF8-8B47-D836EA1DF961}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CD9E6832-7FE8-4DF8-8B47-D836EA1DF961}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C40DBB04-7731-40B9-B632-26B18A60954B} + EndGlobalSection +EndGlobal