首次提交:本地项目同步到Gitea

This commit is contained in:
zhusenlin
2026-03-02 09:08:20 +08:00
commit 1fb681fb34
371 changed files with 31868 additions and 0 deletions

View File

@@ -0,0 +1,54 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\Directory.Version.props" />
<!-- 路径根据实际位置调整 -->
<PropertyGroup>
<OutputType>WinExe</OutputType>
<!--If you are willing to use Windows/MacOS native APIs you will need to create 3 projects.
One for Windows with net8.0-windows TFM, one for MacOS with net8.0-macos and one with net8.0 TFM for Linux.-->
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<Company>Cowain Zhusenlin</Company>
<Product>Cowain WCS</Product>
<!-- 主程序发布为单文件 -->
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<!-- 避免自动添加 git 修订号(.NET 8+ 需注意) -->
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
<ApplicationIcon>CowainLogo.ico</ApplicationIcon>
<AssemblyName>CowainWcs6180</AssemblyName>
</PropertyGroup>
<ItemGroup>
<Content Include="CowainLogo.ico" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia.Desktop" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Include="Avalonia.Diagnostics">
<IncludeAssets Condition="'$(Configuration)' != 'Debug'">None</IncludeAssets>
<PrivateAssets Condition="'$(Configuration)' != 'Debug'">All</PrivateAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Cowain.TestProject\Cowain.TestProject.csproj"/>
</ItemGroup>
<!-- 发布完成后, Plugins / Configs 原样复制到 publish 目录 -->
<Target Name="CopyPluginsAndConfigs" AfterTargets="Publish">
<ItemGroup>
<_PluginFiles Include="..\Cowain.TestProject\Plugins\**\*" />
<_ConfigFiles Include="..\Cowain.TestProject\Configs\**\*" />
</ItemGroup>
<Copy SourceFiles="@(_PluginFiles)" DestinationFiles="@(_PluginFiles->'$(PublishDir)Plugins\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
<Copy SourceFiles="@(_ConfigFiles)" DestinationFiles="@(_ConfigFiles->'$(PublishDir)Configs\%(RecursiveDir)%(Filename)%(Extension)')" SkipUnchangedFiles="true" />
</Target>
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

View File

@@ -0,0 +1,32 @@
using System;
using Avalonia;
using Avalonia.Media;
using Cowain.TestProject.Services;
using Serilog;
namespace Cowain.TestProject.Desktop;
sealed 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()
.ConfigureFonts(fontManager =>
{
fontManager.AddFontCollection(new HarmonyOSFontCollection());
})
.With(new FontManagerOptions()
{
DefaultFamilyName = "fonts:HarmonyOS Sans#HarmonyOS Sans SC"
})
.LogToTrace();
}

View 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 embedded controls.
For more details visit https://learn.microsoft.com/en-us/windows/win32/sbscs/application-manifests -->
<assemblyIdentity version="1.0.0.0" name="Cowain.TestProject.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>