Basic Avalonia
This commit is contained in:
@@ -4,6 +4,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SolutionParityChecker.CLI",
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SolutionParityChecker", "SolutionParityChecker\SolutionParityChecker.csproj", "{2635CBAC-0CEF-4BEE-A6FD-154796A4F467}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SolutionParityChecker", "SolutionParityChecker\SolutionParityChecker.csproj", "{2635CBAC-0CEF-4BEE-A6FD-154796A4F467}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SolutionParityChecker.App", "SolutionParityChecker.App\SolutionParityChecker.App.csproj", "{A7F46873-C8EC-4C2E-86F5-B9F2472C8036}"
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -18,5 +20,9 @@ Global
|
|||||||
{2635CBAC-0CEF-4BEE-A6FD-154796A4F467}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{2635CBAC-0CEF-4BEE-A6FD-154796A4F467}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{2635CBAC-0CEF-4BEE-A6FD-154796A4F467}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{2635CBAC-0CEF-4BEE-A6FD-154796A4F467}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{2635CBAC-0CEF-4BEE-A6FD-154796A4F467}.Release|Any CPU.Build.0 = Release|Any CPU
|
{2635CBAC-0CEF-4BEE-A6FD-154796A4F467}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{A7F46873-C8EC-4C2E-86F5-B9F2472C8036}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{A7F46873-C8EC-4C2E-86F5-B9F2472C8036}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{A7F46873-C8EC-4C2E-86F5-B9F2472C8036}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{A7F46873-C8EC-4C2E-86F5-B9F2472C8036}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
|||||||
10
SolutionParityChecker.App/App.axaml
Normal file
10
SolutionParityChecker.App/App.axaml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<Application xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
x:Class="SolutionParityChecker.App.App"
|
||||||
|
RequestedThemeVariant="Default">
|
||||||
|
<!-- "Default" ThemeVariant follows system theme variant. "Dark" or "Light" are other available options. -->
|
||||||
|
|
||||||
|
<Application.Styles>
|
||||||
|
<FluentTheme />
|
||||||
|
</Application.Styles>
|
||||||
|
</Application>
|
||||||
23
SolutionParityChecker.App/App.axaml.cs
Normal file
23
SolutionParityChecker.App/App.axaml.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using Avalonia.Controls.ApplicationLifetimes;
|
||||||
|
using Avalonia.Markup.Xaml;
|
||||||
|
|
||||||
|
namespace SolutionParityChecker.App;
|
||||||
|
|
||||||
|
public partial class App : Application
|
||||||
|
{
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
AvaloniaXamlLoader.Load(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnFrameworkInitializationCompleted()
|
||||||
|
{
|
||||||
|
if (ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||||
|
{
|
||||||
|
desktop.MainWindow = new MainWindow() { DataContext = new MainWindowViewModel() };
|
||||||
|
}
|
||||||
|
|
||||||
|
base.OnFrameworkInitializationCompleted();
|
||||||
|
}
|
||||||
|
}
|
||||||
24
SolutionParityChecker.App/MainWindow.axaml
Normal file
24
SolutionParityChecker.App/MainWindow.axaml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<Window xmlns="https://github.com/avaloniaui"
|
||||||
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
|
xmlns:app="clr-namespace:SolutionParityChecker.App"
|
||||||
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
|
x:Class="SolutionParityChecker.App.MainWindow"
|
||||||
|
Title="SolutionParityChecker.App"
|
||||||
|
x:DataType="app:MainWindowViewModel">
|
||||||
|
|
||||||
|
<Window.DataContext>
|
||||||
|
<app:MainWindowViewModel />
|
||||||
|
</Window.DataContext>
|
||||||
|
|
||||||
|
<Panel>
|
||||||
|
<StackPanel>
|
||||||
|
<TextBlock>Welcome to Avalonia!</TextBlock>
|
||||||
|
<Button Click="LoadSolutionFolder">Select Solution Folder</Button>
|
||||||
|
<Button Click="LoadSolutionFile">Select Solution File</Button>
|
||||||
|
<TextBlock Name="SolutionFilePath" Text="{Binding SolutionFilePath}" />
|
||||||
|
<TextBlock Name="SolutionFolderPath" Text="{Binding SolutionFolderPath}" />
|
||||||
|
</StackPanel>
|
||||||
|
</Panel>
|
||||||
|
</Window>
|
||||||
22
SolutionParityChecker.App/MainWindow.axaml.cs
Normal file
22
SolutionParityChecker.App/MainWindow.axaml.cs
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Interactivity;
|
||||||
|
|
||||||
|
namespace SolutionParityChecker.App;
|
||||||
|
|
||||||
|
public partial class MainWindow : Window
|
||||||
|
{
|
||||||
|
public MainWindow()
|
||||||
|
{
|
||||||
|
InitializeComponent();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadSolutionFolder(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
SolutionFolderPath.Text = "Solution folder path";
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadSolutionFile(object? sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
SolutionFilePath.Text = "Solution file path";
|
||||||
|
}
|
||||||
|
}
|
||||||
7
SolutionParityChecker.App/MainWindowViewModel.cs
Normal file
7
SolutionParityChecker.App/MainWindowViewModel.cs
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
namespace SolutionParityChecker.App;
|
||||||
|
|
||||||
|
public class MainWindowViewModel
|
||||||
|
{
|
||||||
|
public string SolutionFolderPath { get; set; } = string.Empty;
|
||||||
|
public string SolutionFilePath { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
6
SolutionParityChecker.App/Models/AppState.cs
Normal file
6
SolutionParityChecker.App/Models/AppState.cs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
namespace SolutionParityChecker.App.Models;
|
||||||
|
|
||||||
|
public class AppState
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
21
SolutionParityChecker.App/Program.cs
Normal file
21
SolutionParityChecker.App/Program.cs
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
using Avalonia;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
namespace SolutionParityChecker.App;
|
||||||
|
|
||||||
|
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<App>()
|
||||||
|
.UsePlatformDetect()
|
||||||
|
.WithInterFont()
|
||||||
|
.LogToTrace();
|
||||||
|
}
|
||||||
6
SolutionParityChecker.App/Services/DialogService.cs
Normal file
6
SolutionParityChecker.App/Services/DialogService.cs
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
namespace SolutionParityChecker.App.Services;
|
||||||
|
|
||||||
|
public class DialogService
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
20
SolutionParityChecker.App/SolutionParityChecker.App.csproj
Normal file
20
SolutionParityChecker.App/SolutionParityChecker.App.csproj
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
<PropertyGroup>
|
||||||
|
<OutputType>WinExe</OutputType>
|
||||||
|
<TargetFramework>net7.0</TargetFramework>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
|
||||||
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
|
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Avalonia" Version="11.0.4" />
|
||||||
|
<PackageReference Include="Avalonia.Desktop" Version="11.0.4" />
|
||||||
|
<PackageReference Include="Avalonia.Themes.Fluent" Version="11.0.4" />
|
||||||
|
<PackageReference Include="Avalonia.Fonts.Inter" Version="11.0.4" />
|
||||||
|
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
|
||||||
|
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="11.0.4" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
18
SolutionParityChecker.App/app.manifest
Normal file
18
SolutionParityChecker.App/app.manifest
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<!-- This manifest is used on Windows only.
|
||||||
|
Don't remove it as it might cause problems with window transparency and embeded controls.
|
||||||
|
For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests -->
|
||||||
|
<assemblyIdentity version="1.0.0.0" name="SolutionParityChecker.App.Desktop"/>
|
||||||
|
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!-- A list of the Windows versions that this application has been tested on
|
||||||
|
and is designed to work with. Uncomment the appropriate elements
|
||||||
|
and Windows will automatically select the most compatible environment. -->
|
||||||
|
|
||||||
|
<!-- Windows 10 -->
|
||||||
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
</assembly>
|
||||||
Reference in New Issue
Block a user