This commit is contained in:
Wiesław Šoltés 2022-02-04 13:48:34 +01:00
Родитель 69a8ec446e
Коммит ec6b2490b2
15 изменённых файлов: 161 добавлений и 36 удалений

Просмотреть файл

@ -15,7 +15,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SpiroNet.ViewModels", "src\
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{14839D79-4183-4D13-A0C3-6E396D51FA9B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SpiroNet.Avalonia", "samples\SpiroNet.Avalonia\SpiroNet.Avalonia.csproj", "{B8DB18EB-3BE1-4344-812E-5B3B22D969A3}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SpiroNet.Base", "samples\SpiroNet.Base\SpiroNet.Base.csproj", "{B8DB18EB-3BE1-4344-812E-5B3B22D969A3}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{945E10EB-994A-4B19-884C-35B203D1991B}"
EndProject
@ -49,6 +49,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "props", "props", "{F98068A0
build\System.IO.FileSystem.props = build\System.IO.FileSystem.props
build\XUnit.props = build\XUnit.props
build\SourceLink.props = build\SourceLink.props
build\Avalonia.Web.Blazor.props = build\Avalonia.Web.Blazor.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{C782659E-9532-475B-B746-38FFC9015978}"
@ -64,6 +65,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{ED6682CD
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SpiroNet.UnitTests", "tests\SpiroNet.UnitTests\SpiroNet.UnitTests.csproj", "{03158CCE-BDC1-4580-BA29-ADF4DABBBF30}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SpiroNet.Desktop", "samples\SpiroNet.Desktop\SpiroNet.Desktop.csproj", "{A13E2B90-DED3-4951-8507-D9707D31013C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -102,6 +105,10 @@ Global
{03158CCE-BDC1-4580-BA29-ADF4DABBBF30}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03158CCE-BDC1-4580-BA29-ADF4DABBBF30}.Release|Any CPU.ActiveCfg = Release|Any CPU
{03158CCE-BDC1-4580-BA29-ADF4DABBBF30}.Release|Any CPU.Build.0 = Release|Any CPU
{A13E2B90-DED3-4951-8507-D9707D31013C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A13E2B90-DED3-4951-8507-D9707D31013C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A13E2B90-DED3-4951-8507-D9707D31013C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A13E2B90-DED3-4951-8507-D9707D31013C}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -118,6 +125,7 @@ Global
{F98068A0-9210-4A55-86B8-25C8E4B686AF} = {FE0DAB01-63F2-42B5-9F81-3B85B33E264B}
{D04F8768-26EC-4EE3-B036-8DABF0DA8C82} = {FE0DAB01-63F2-42B5-9F81-3B85B33E264B}
{03158CCE-BDC1-4580-BA29-ADF4DABBBF30} = {ED6682CD-E4DD-484E-B048-D3BF427657C1}
{A13E2B90-DED3-4951-8507-D9707D31013C} = {945E10EB-994A-4B19-884C-35B203D1991B}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B48691C4-67D7-4C5B-B8ED-2C7C56A09D72}

Просмотреть файл

@ -12,7 +12,7 @@ variables:
BuildConfiguration: 'Release'
BuildPlatform: 'Any CPU'
PublishFramework: 'net6.0'
PublishProject: 'SpiroNet.Avalonia'
PublishProject: 'SpiroNet.Desktop'
PublishRuntime: ''
jobs:

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.Desktop" Version="0.10.7" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.12" />
</ItemGroup>
</Project>

Просмотреть файл

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia.Web.Blazor" Version="0.10.12" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<PackageReference Include="Avalonia" Version="0.10.7" />
<PackageReference Include="Avalonia" Version="0.10.12" />
</ItemGroup>
</Project>

Просмотреть файл

@ -1,10 +1,10 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VersionPrefix>0.10.7</VersionPrefix>
<VersionPrefix>0.10.12</VersionPrefix>
<VersionSuffix></VersionSuffix>
<Authors>Wiesław Šoltés</Authors>
<Company>Wiesław Šoltés</Company>
<Copyright>Copyright © Wiesław Šoltés 2021</Copyright>
<Copyright>Copyright © Wiesław Šoltés 2022</Copyright>
<PackageLicenseExpression>GPL-3.0-or-later</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/wieslawsoltes/SpiroNet</PackageProjectUrl>
</PropertyGroup>

Просмотреть файл

@ -2,7 +2,7 @@
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Application.Styles>
<StyleInclude Source="avares://Avalonia.Themes.Fluent/FluentDark.xaml" />
<StyleInclude Source="avares://Avalonia.Themes.Fluent/FluentLight.xaml" />
<StyleInclude Source="avares://Avalonia.Themes.Fluent/DensityStyles/Compact.xaml" />
<Style Selector="Expander /template/ ToggleButton#PART_toggle">
<Setter Property="HorizontalAlignment" Value="Stretch" />

Просмотреть файл

@ -26,24 +26,6 @@ namespace SpiroNet.Avalonia
{
public class App : Application
{
/// <summary>
/// Program entry point.
/// </summary>
/// <param name="args">The program arguments.</param>
static void Main(string[] args)
{
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
}
/// <summary>
/// Build Avalonia app.
/// </summary>
/// <returns>The Avalonia app builder.</returns>
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
.LogToTrace();
/// <inheritdoc/>
public override void Initialize()
{
@ -58,7 +40,7 @@ namespace SpiroNet.Avalonia
}
else if (ApplicationLifetime is ISingleViewApplicationLifetime singleViewLifetime)
{
//singleViewLifetime.MainView = new MainView();
singleViewLifetime.MainView = new MainView();
}
base.OnFrameworkInitializationCompleted();
}

Просмотреть файл

@ -0,0 +1,10 @@
<UserControl 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:views="clr-namespace:SpiroNet.Editor.Avalonia.Views;assembly=SpiroNet.Editor.Avalonia"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="SpiroNet.Avalonia.MainView">
<views:EditorView/>
</UserControl>

Просмотреть файл

@ -0,0 +1,38 @@
/*
SpiroNet.Avalonia
Copyright (C) 2019 Wiesław Šoltés
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 3
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
using Avalonia.Controls;
using Avalonia.Markup.Xaml;
namespace SpiroNet.Avalonia;
public class MainView : UserControl
{
public MainView()
{
InitializeComponent();
}
private void InitializeComponent()
{
AvaloniaXamlLoader.Load(this);
}
}

Просмотреть файл

@ -1,10 +1,10 @@
<Window x:Class="SpiroNet.Avalonia.MainWindow"
xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:views="clr-namespace:SpiroNet.Editor.Avalonia.Views;assembly=SpiroNet.Editor.Avalonia"
xmlns:local="clr-namespace:SpiroNet.Avalonia"
Title="SpiroNet.Avalonia" Height="730" Width="1040"
Background="Black"
Background="White"
Foreground="{DynamicResource SystemBaseHighColor}"
UseLayoutRounding="True">
<views:EditorView/>
<local:MainView />
</Window>

Просмотреть файл

@ -2,11 +2,12 @@
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<OutputType>WinExe</OutputType>
<OutputType>Library</OutputType>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<EnableDefaultCompileItems>False</EnableDefaultCompileItems>
<IsPackable>False</IsPackable>
<Nullable>enable</Nullable>
<RootNamespace>SpiroNet.Avalonia</RootNamespace>
</PropertyGroup>
<PropertyGroup>
@ -14,12 +15,6 @@
<PackageTags>Spiro;LibSpiro;SpiroNet;Graphics;Bezier;Spline;Splines;Curve;Path;Geometry;Editor;Design;Avalonia</PackageTags>
</PropertyGroup>
<PropertyGroup>
<PublishTrimmed>False</PublishTrimmed>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun>True</PublishReadyToRun>
</PropertyGroup>
<Import Project="..\..\build\Base.props" />
<Import Project="..\..\build\ReferenceAssemblies.props" />
<Import Project="..\..\build\Avalonia.props" />

Просмотреть файл

@ -0,0 +1,48 @@
/*
SpiroNet.Avalonia
Copyright (C) 2019 Wiesław Šoltés
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 3
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
*/
using Avalonia;
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Markup.Xaml;
using SpiroNet.Avalonia;
namespace SpiroNet.Desktop
{
class Program
{
/// <summary>
/// Program entry point.
/// </summary>
/// <param name="args">The program arguments.</param>
static void Main(string[] args)
{
BuildAvaloniaApp().StartWithClassicDesktopLifetime(args);
}
/// <summary>
/// Build Avalonia app.
/// </summary>
/// <returns>The Avalonia app builder.</returns>
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
.UsePlatformDetect()
.LogToTrace();
}
}

Просмотреть файл

@ -0,0 +1,38 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<OutputType>WinExe</OutputType>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
<EnableDefaultCompileItems>False</EnableDefaultCompileItems>
<IsPackable>False</IsPackable>
<Nullable>enable</Nullable>
<RootNamespace>SpiroNet.Desktop</RootNamespace>
</PropertyGroup>
<PropertyGroup>
<Description>The .NET C# port of libspiro - conversion between spiro control points and bezier's.</Description>
<PackageTags>Spiro;LibSpiro;SpiroNet;Graphics;Bezier;Spline;Splines;Curve;Path;Geometry;Editor;Design;Avalonia</PackageTags>
</PropertyGroup>
<PropertyGroup>
<PublishTrimmed>False</PublishTrimmed>
<PublishSingleFile>False</PublishSingleFile>
<PublishReadyToRun>True</PublishReadyToRun>
</PropertyGroup>
<Import Project="..\..\build\Base.props" />
<Import Project="..\..\build\ReferenceAssemblies.props" />
<Import Project="..\..\build\Avalonia.props" />
<Import Project="..\..\build\Avalonia.Desktop.props" />
<Import Project="..\..\build\Avalonia.Diagnostics.props" />
<ItemGroup>
<Compile Include="**\*.cs" Exclude="obj\**" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SpiroNet.Base\SpiroNet.Base.csproj" />
</ItemGroup>
</Project>