-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from seionmoya/main
Move from Avalonia to WPF
- Loading branch information
Showing
19 changed files
with
94 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ on: | |
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
runs-on: windows-latest | ||
|
||
env: | ||
DOTNET_NOLOGO: true | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Application x:Class="Fuyu.Launcher.App" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:local="clr-namespace:Fuyu.Launcher" | ||
StartupUri="MainWindow.xaml"> | ||
<Application.Resources> | ||
|
||
</Application.Resources> | ||
</Application> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System.Configuration; | ||
using System.Data; | ||
using System.Windows; | ||
|
||
namespace Fuyu.Launcher | ||
{ | ||
public partial class App : Application | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System.Windows; | ||
|
||
[assembly:ThemeInfo( | ||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located | ||
//(used if a resource is not found in the page, | ||
// or application resource dictionaries) | ||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located | ||
//(used if a resource is not found in the page, | ||
// app, or any theme specific resource dictionaries) | ||
)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,30 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<Project Sdk="Microsoft.NET.Sdk.Razor"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net8.0</TargetFramework> | ||
<TargetFramework>net8.0-windows</TargetFramework> | ||
<OutputType>WinExe</OutputType> | ||
<UseWPF>true</UseWPF> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<OutputType>WinExe</OutputType> | ||
<ApplicationIcon>Resources\icon.ico</ApplicationIcon> | ||
<PublishSingleFile>true</PublishSingleFile> | ||
<SelfContained>true</SelfContained> | ||
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract> | ||
<RuntimeIdentifier>win-x64</RuntimeIdentifier> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<ApplicationManifest>app.manifest</ApplicationManifest> | ||
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Avalonia" Version="11.1.0" /> | ||
<PackageReference Include="Avalonia.Desktop" Version="11.1.0" /> | ||
<PackageReference Include="BlazorWebView.Avalonia" Version="11.0.0.1" /> | ||
<PackageReference Include="WebView.Avalonia.Desktop" Version="11.0.0.1" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup Condition="'$(Configuration)' == 'Debug'"> | ||
<PackageReference Include="Avalonia.Diagnostics" Version="11.1.0" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Components.WebView.Wpf" Version="8.0.80" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="../Fuyu.Platform.Launcher/Fuyu.Platform.Launcher.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<Content Update="wwwroot\**"> | ||
<CopyToOutputDirectory>Always</CopyToOutputDirectory> | ||
</Content> | ||
</ItemGroup> | ||
|
||
</Project> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<Window x:Class="Fuyu.Launcher.MainWindow" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
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:blazor="clr-namespace:Microsoft.AspNetCore.Components.WebView.Wpf;assembly=Microsoft.AspNetCore.Components.WebView.Wpf" | ||
xmlns:local="clr-namespace:Fuyu.Launcher" | ||
mc:Ignorable="d" | ||
Title="MainWindow" Height="450" Width="800"> | ||
<Grid> | ||
<blazor:BlazorWebView HostPage="wwwroot\index.html" Services="{DynamicResource services}"> | ||
<blazor:BlazorWebView.RootComponents> | ||
<blazor:RootComponent Selector="#app" ComponentType="{x:Type local:Routes}" /> | ||
</blazor:BlazorWebView.RootComponents> | ||
</blazor:BlazorWebView> | ||
</Grid> | ||
</Window> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System.Windows; | ||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
namespace Fuyu.Launcher | ||
{ | ||
public partial class MainWindow : Window | ||
{ | ||
public MainWindow() | ||
{ | ||
InitializeComponent(); | ||
|
||
ServiceCollection serviceCollection = new ServiceCollection(); | ||
serviceCollection.AddWpfBlazorWebView(); | ||
#if DEBUG | ||
serviceCollection.AddBlazorWebViewDeveloperTools(); | ||
#endif | ||
Resources.Add("services", serviceCollection.BuildServiceProvider()); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
8 changes: 4 additions & 4 deletions
8
Fuyu.Platform.Launcher/Routes.razor → Fuyu.Launcher/Routes.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
@namespace Fuyu.Platform.Launcher | ||
@namespace Fuyu.Launcher | ||
|
||
@using Fuyu.Platform.Launcher.Layout | ||
@using Microsoft.AspNetCore.Components.Routing | ||
@using Fuyu.Platform.Launcher.Layout | ||
|
||
<Router AppAssembly="typeof(Layout.MainLayout).Assembly"> | ||
<Router AppAssembly="typeof(MainLayout).Assembly"> | ||
<Found Context="routeData"> | ||
<RouteView RouteData="routeData" DefaultLayout="typeof(Layout.MainLayout)" /> | ||
<RouteView RouteData="routeData" DefaultLayout="typeof(MainLayout)" /> | ||
<FocusOnNavigate RouteData="routeData" Selector="h1" /> | ||
</Found> | ||
</Router> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters