增加AvaloniaUI版,PC下可用,树莓派失败,原因是Mono的SkiaSharp未支持Linux32大石头 authored at 2019-10-07 22:49:39
diff --git a/XCoderAv/App.xaml b/XCoderAv/App.xaml
new file mode 100644
index 0000000..bacd61f
--- /dev/null
+++ b/XCoderAv/App.xaml
@@ -0,0 +1,8 @@
+<Application xmlns="https://github.com/avaloniaui"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ x:Class="XCoderAv.App">
+ <Application.Styles>
+ <StyleInclude Source="avares://Avalonia.Themes.Default/DefaultTheme.xaml"/>
+ <StyleInclude Source="avares://Avalonia.Themes.Default/Accents/BaseLight.xaml"/>
+ </Application.Styles>
+</Application>
diff --git a/XCoderAv/App.xaml.cs b/XCoderAv/App.xaml.cs
new file mode 100644
index 0000000..bbf8579
--- /dev/null
+++ b/XCoderAv/App.xaml.cs
@@ -0,0 +1,13 @@
+using Avalonia;
+using Avalonia.Markup.Xaml;
+
+namespace XCoderAv
+{
+ public class App : Application
+ {
+ public override void Initialize()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+ }
+}
diff --git a/XCoderAv/MainWindow.xaml b/XCoderAv/MainWindow.xaml
new file mode 100644
index 0000000..d721e61
--- /dev/null
+++ b/XCoderAv/MainWindow.xaml
@@ -0,0 +1,9 @@
+<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"
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
+ x:Class="XCoderAv.MainWindow"
+ Title="XCoderAv">
+ 学无先后达者为师!
+</Window>
diff --git a/XCoderAv/MainWindow.xaml.cs b/XCoderAv/MainWindow.xaml.cs
new file mode 100644
index 0000000..760a86f
--- /dev/null
+++ b/XCoderAv/MainWindow.xaml.cs
@@ -0,0 +1,22 @@
+using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace XCoderAv
+{
+ public class MainWindow : Window
+ {
+ public MainWindow()
+ {
+ InitializeComponent();
+#if DEBUG
+ this.AttachDevTools();
+#endif
+ }
+
+ private void InitializeComponent()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+ }
+}
diff --git a/XCoderAv/nuget.config b/XCoderAv/nuget.config
new file mode 100644
index 0000000..6c273ab
--- /dev/null
+++ b/XCoderAv/nuget.config
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<!--
+ To use the Avalonia CI feed to get unstable packages, move this file to the root of your solution.
+-->
+
+<configuration>
+ <packageSources>
+ <add key="AvaloniaCI" value="https://www.myget.org/F/avalonia-ci/api/v2" />
+ </packageSources>
+</configuration>
diff --git a/XCoderAv/Program.cs b/XCoderAv/Program.cs
new file mode 100644
index 0000000..cea434d
--- /dev/null
+++ b/XCoderAv/Program.cs
@@ -0,0 +1,27 @@
+using System;
+using Avalonia;
+using Avalonia.Logging.Serilog;
+
+namespace XCoderAv
+{
+ 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.
+ public static void Main(string[] args) => BuildAvaloniaApp().Start(AppMain, args);
+
+ // Avalonia configuration, don't remove; also used by visual designer.
+ public static AppBuilder BuildAvaloniaApp()
+ => AppBuilder.Configure<App>()
+ .UsePlatformDetect()
+ .LogToDebug();
+
+ // Your application's entry point. Here you can initialize your MVVM framework, DI
+ // container, etc.
+ private static void AppMain(Application app, string[] args)
+ {
+ app.Run(new MainWindow());
+ }
+ }
+}
diff --git a/XCoderAv/Properties/PublishProfiles/FolderProfile.pubxml b/XCoderAv/Properties/PublishProfiles/FolderProfile.pubxml
new file mode 100644
index 0000000..b9b1182
--- /dev/null
+++ b/XCoderAv/Properties/PublishProfiles/FolderProfile.pubxml
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+https://go.microsoft.com/fwlink/?LinkID=208121.
+-->
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <PublishProtocol>FileSystem</PublishProtocol>
+ <Configuration>Release</Configuration>
+ <Platform>Any CPU</Platform>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <PublishDir>..\..\XCoder\publish\</PublishDir>
+ </PropertyGroup>
+</Project>
\ No newline at end of file
diff --git a/XCoderAv/XCoderAv.csproj b/XCoderAv/XCoderAv.csproj
new file mode 100644
index 0000000..c6f2d5b
--- /dev/null
+++ b/XCoderAv/XCoderAv.csproj
@@ -0,0 +1,41 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>netcoreapp2.1</TargetFramework>
+ <RootNamespace>XCoder</RootNamespace>
+ <AssemblyName>XCoder</AssemblyName>
+ <AssemblyTitle>新生命码神工具</AssemblyTitle>
+ <Description>众多开发者工具</Description>
+ <Company>新生命开发团队</Company>
+ <Copyright>©2002-2019 新生命开发团队</Copyright>
+ <Version>8.0.2019.1007</Version>
+ <FileVersion>8.0.2019.1007</FileVersion>
+ <AssemblyVersion>8.0.*</AssemblyVersion>
+ <Deterministic>false</Deterministic>
+ <ApplicationIcon>..\XCoder\leaf.ico</ApplicationIcon>
+ <OutputPath>..\..\XCoder\</OutputPath>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <DefineConstants>TRACE;NC30;__CORE__</DefineConstants>
+ </PropertyGroup>
+
+ <PropertyGroup Condition="'$(Configuration)'=='Debug'">
+ <DefineConstants>$(DefineConstants);DEBUG</DefineConstants>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Update="**\*.xaml.cs">
+ <DependentUpon>%(Filename)</DependentUpon>
+ </Compile>
+ <AvaloniaResource Include="**\*.xaml">
+ <SubType>Designer</SubType>
+ </AvaloniaResource>
+ </ItemGroup>
+ <ItemGroup>
+ <PackageReference Include="Avalonia" Version="0.8.2" />
+ <PackageReference Include="Avalonia.Desktop" Version="0.8.2" />
+ <PackageReference Include="NewLife.Core" Version="8.4.2019.1007" />
+ <PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="1.68.0" />
+ </ItemGroup>
+</Project>
diff --git "a/\347\240\201\347\245\236\345\267\245\345\205\267.sln" "b/\347\240\201\347\245\236\345\267\245\345\205\267.sln"
index f190c76..22e604e 100644
--- "a/\347\240\201\347\245\236\345\267\245\345\205\267.sln"
+++ "b/\347\240\201\347\245\236\345\267\245\345\205\267.sln"
@@ -14,7 +14,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XCoder", "XCoder\XCoder.csp
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XCoder40", "XCoder40\XCoder40.csproj", "{A4A7E1BD-9E53-4D60-A0E0-122E5441DDBF}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XCoder30", "XCoder30\XCoder30.csproj", "{604666BC-BB6C-426F-BE8F-A68592155698}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XCoder30", "XCoder30\XCoder30.csproj", "{604666BC-BB6C-426F-BE8F-A68592155698}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XCoderAv", "XCoderAv\XCoderAv.csproj", "{66991C0D-D3A6-40E9-8BE1-C11F1F0D8894}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -34,6 +36,10 @@ Global
{604666BC-BB6C-426F-BE8F-A68592155698}.Debug|Any CPU.Build.0 = Debug|Any CPU
{604666BC-BB6C-426F-BE8F-A68592155698}.Release|Any CPU.ActiveCfg = Release|Any CPU
{604666BC-BB6C-426F-BE8F-A68592155698}.Release|Any CPU.Build.0 = Release|Any CPU
+ {66991C0D-D3A6-40E9-8BE1-C11F1F0D8894}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {66991C0D-D3A6-40E9-8BE1-C11F1F0D8894}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {66991C0D-D3A6-40E9-8BE1-C11F1F0D8894}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {66991C0D-D3A6-40E9-8BE1-C11F1F0D8894}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE