Skip to content

Commit

Permalink
Merge branch 'struct=redesign' into dev=main
Browse files Browse the repository at this point in the history
  • Loading branch information
Dynesshely committed Jul 26, 2023
2 parents 1cd0795 + 8d31db4 commit fa47fa8
Show file tree
Hide file tree
Showing 182 changed files with 250 additions and 10 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added KitX Dashboard Assets/KitX-Icon-1024x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added KitX Dashboard Assets/KitX-Icon-128x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added KitX Dashboard Assets/KitX-Icon-1920x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added KitX Dashboard Assets/KitX-Icon-256x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added KitX Dashboard Assets/KitX-Icon-256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added KitX Dashboard Assets/KitX-Icon-32x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added KitX Dashboard Assets/KitX-Icon-32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added KitX Dashboard Assets/KitX-Icon-512x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added KitX Dashboard Assets/KitX-Icon-64x64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions KitX Dashboard Assets/KitX.Assets.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<!--Avalonia doesen't support TrimMode=link currently,but we are working on that https://github.com/AvaloniaUI/Avalonia/issues/6892 -->
<TrimMode>copyused</TrimMode>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
</PropertyGroup>
<ItemGroup>
<None Remove="KitX-Icon-1024x-margin-2x.png" />
<None Remove="KitX-Icon-1024x.png" />
<None Remove="KitX-Icon-128x.png" />
<None Remove="KitX-Icon-1920x-margin-1x.png" />
<None Remove="KitX-Icon-1920x-margin-2x.png" />
<None Remove="KitX-Icon-1920x.png" />
<None Remove="KitX-Icon-256x-margin-2x.png" />
<None Remove="KitX-Icon-256x.png" />
<None Remove="KitX-Icon-256x256.png" />
<None Remove="KitX-Icon-32x.png" />
<None Remove="KitX-Icon-32x32.png" />
<None Remove="KitX-Icon-512x-margin-2x.png" />
<None Remove="KitX-Icon-512x.png" />
<None Remove="KitX-Icon-64x64.png" />
</ItemGroup>
<ItemGroup>
<AvaloniaResource Include="KitX-Icon-1024x-margin-2x.png" />
<AvaloniaResource Include="KitX-Icon-1024x.png" />
<AvaloniaResource Include="KitX-Icon-128x.png" />
<AvaloniaResource Include="KitX-Icon-1920x-margin-1x.png" />
<AvaloniaResource Include="KitX-Icon-1920x-margin-2x.png" />
<AvaloniaResource Include="KitX-Icon-1920x.png" />
<AvaloniaResource Include="KitX-Icon-256x-margin-2x.png" />
<AvaloniaResource Include="KitX-Icon-256x.png" />
<AvaloniaResource Include="KitX-Icon-256x256.png" />
<AvaloniaResource Include="KitX-Icon-32x.png" />
<AvaloniaResource Include="KitX-Icon-512x-margin-2x.png" />
<AvaloniaResource Include="KitX-Icon-512x.png" />
</ItemGroup>
<ItemGroup>
<AvaloniaResource Include="KitX-Icon-32x32.png" />
<AvaloniaResource Include="KitX-Icon-64x64.png" />
</ItemGroup>
<ItemGroup>
<!--This helps with theme dll-s trimming.
If you will publish your application in self-contained mode with p:PublishTrimmed=true and it will use Fluent theme Default theme will be trimmed from the output and vice versa.
https://github.com/AvaloniaUI/Avalonia/issues/5593 -->
<TrimmableAssembly Include="Avalonia.Themes.Fluent" />
<TrimmableAssembly Include="Avalonia.Themes.Default" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="0.10.18" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.18" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="0.10.18" />
<PackageReference Include="XamlNameReferenceGenerator" Version="1.5.1" />
</ItemGroup>
</Project>
32 changes: 32 additions & 0 deletions KitX Dashboard Fonts/KitX.Fonts.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<!--Avalonia doesen't support TrimMode=link currently,but we are working on that https://github.com/AvaloniaUI/Avalonia/issues/6892 -->
<TrimMode>copyused</TrimMode>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
</PropertyGroup>
<ItemGroup>
<None Remove="sarasa-mono-cl-regular.ttf" />
<None Remove="SourceHanSans-VF.ttf" />
</ItemGroup>
<ItemGroup>
<AvaloniaResource Include="sarasa-mono-cl-regular.ttf" />
<AvaloniaResource Include="SourceHanSans-VF.ttf" />
</ItemGroup>
<ItemGroup>
<!--This helps with theme dll-s trimming.
If you will publish your application in self-contained mode with p:PublishTrimmed=true and it will use Fluent theme Default theme will be trimmed from the output and vice versa.
https://github.com/AvaloniaUI/Avalonia/issues/5593 -->
<TrimmableAssembly Include="Avalonia.Themes.Fluent" />
<TrimmableAssembly Include="Avalonia.Themes.Default" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Avalonia" Version="0.10.18" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.18" />
<!--Condition below is needed to remove Avalonia.Diagnostics package from build output in Release configuration.-->
<PackageReference Condition="'$(Configuration)' == 'Debug'" Include="Avalonia.Diagnostics" Version="0.10.18" />
<PackageReference Include="XamlNameReferenceGenerator" Version="1.5.1" />
</ItemGroup>
</Project>
Binary file added KitX Dashboard Fonts/SourceHanSans-VF.ttf
Binary file not shown.
Binary file added KitX Dashboard Fonts/sarasa-mono-cl-regular.ttf
Binary file not shown.
11 changes: 11 additions & 0 deletions KitX Dashboard Repair Tool/KitX.RepairTool.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PublishAot>true</PublishAot>
</PropertyGroup>

</Project>
57 changes: 57 additions & 0 deletions KitX Dashboard Repair Tool/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@

var tip_copyright = () =>
{
Console.WriteLine(
$"""
KitX Repair Tool (C) Crequency
Environment: {Environment.Version}
OS Version: {Environment.OSVersion}
""");
};

var log_exception = (Exception e) =>
{
Console.WriteLine(e.Message);
Console.WriteLine(e.StackTrace);
};

T? ask<T>(string tip = "Input: ", Func<string?, T>? parse = null)
{
Console.Write(tip);
string? input = Console.ReadLine();
if (input is null) return default(T);
if (parse is not null) return parse(input);
else throw new Exception(input);
};

var menu = () =>
{
Console.WriteLine(
"""
1. (root) Linux wayland repair (add `LC_ALL=C` to environment variables)
""");
return ask("Your select: ", x => int.TryParse(x, out int y) ? y : -1);
};

tip_copyright();
switch (menu())
{
case 1:
if (!OperatingSystem.IsLinux())
{
Console.WriteLine("Only on linux.");
break;
}
try
{
File.AppendAllLines("/etc/environment", new string[] { "LC_ALL=C" });
}
catch (Exception e)
{
log_exception(e);
}
break;
default:
break;
}

14 changes: 14 additions & 0 deletions KitX Dashboard Updater/KitX.Updater.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Common.Update.Replacer" Version="1.0.1.2" />
</ItemGroup>

</Project>
65 changes: 65 additions & 0 deletions KitX Dashboard Updater/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
using Common.Update.Replacer;

namespace KitX.Updater
{
public class Updater
{
/// <summary>
/// 换个颜色执行
/// </summary>
/// <param name="cc">新颜色</param>
/// <param name="action">动作</param>
private static void DoColor(ConsoleColor cc, Action action)
{
ConsoleColor now = Console.ForegroundColor;
Console.ForegroundColor = cc;
action();
Console.ForegroundColor = now;
}

public static void Main(string[] args)
{
try
{
string _rootDir = string.Empty;
string _newFilesDir = string.Empty;

for (int i = 0; i < args.Length; i++)
{
switch (args[i])
{
case "--source-dir":
if (i != args.Length - 1)
{
++i;
_rootDir = args[i];
}
else throw new Exception("参数 --source-dir 缺少值");
break;
case "--update-from":
if (i != args.Length - 1)
{
++i;
_newFilesDir = args[i];
}
else throw new Exception("参数 --update-from 缺少值");
break;
}
}

Replacer replacer = new Replacer()
.SetSourceDir(_newFilesDir)
.SetRootDir(_rootDir);
replacer.Replace();
}
catch (Exception e)
{
DoColor(ConsoleColor.Red, new(() =>
{
Console.WriteLine(e.Message);
}));
}
}
}
}

File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
20 changes: 10 additions & 10 deletions KitX Dashboard.csproj → KitX Dashboard/KitX Dashboard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@
<PackageReference Include="XamlNameReferenceGenerator" Version="1.5.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\KitX Dashboard Helper\KitX.Assets\KitX.Assets.csproj" />
<ProjectReference Include="..\KitX Dashboard Helper\KitX.Fonts\KitX.Fonts.csproj" />
<ProjectReference Include="..\KitX File Format Helper\KitX.KXP.Helper\KitX.KXP.Helper.csproj" />
<ProjectReference Include="..\KitX Rules\KitX.Web.Rules\KitX.Web.Rules.csproj" />
<ProjectReference Include="..\Reference\Common.Activity\Common.Activity\Common.Activity.csproj" />
<ProjectReference Include="..\Reference\Common.Algorithm\Common.Algorithm.Interop\Common.Algorithm.Interop.csproj" />
<ProjectReference Include="..\Reference\Common.BasicHelper\Common.BasicHelper\Common.BasicHelper.csproj" />
<ProjectReference Include="..\Reference\Common.ExternalConsole\Common.ExternalConsole\Common.ExternalConsole.csproj" />
<ProjectReference Include="..\Reference\Common.ExternalConsole\Common.ExternalConsole.ExternalConsole\Common.ExternalConsole.ExternalConsole.csproj" Condition="$(Is2Publish) == 'False'" />
<ProjectReference Include="..\Reference\Common.Update\Common.Update.Checker\Common.Update.Checker.csproj" />
<ProjectReference Include="..\KitX Dashboard Assets\KitX.Assets.csproj" />
<ProjectReference Include="..\KitX Dashboard Fonts\KitX.Fonts.csproj" />
<ProjectReference Include="..\..\..\KitX Standard\KitX File Formats\KitX.KXP.Helper\KitX.KXP.Helper.csproj" />
<ProjectReference Include="..\..\..\KitX Standard\KitX Rules\KitX.Web.Rules\KitX.Web.Rules.csproj" />
<ProjectReference Include="..\..\..\Reference\Common.Activity\Common.Activity\Common.Activity.csproj" />
<ProjectReference Include="..\..\..\Reference\Common.Algorithm\Common.Algorithm.Interop\Common.Algorithm.Interop.csproj" />
<ProjectReference Include="..\..\..\Reference\Common.BasicHelper\Common.BasicHelper\Common.BasicHelper.csproj" />
<ProjectReference Include="..\..\..\Reference\Common.ExternalConsole\Common.ExternalConsole\Common.ExternalConsole.csproj" />
<ProjectReference Include="..\..\..\Reference\Common.ExternalConsole\Common.ExternalConsole.ExternalConsole\Common.ExternalConsole.ExternalConsole.csproj" Condition="$(Is2Publish) == 'False'" />
<ProjectReference Include="..\..\..\Reference\Common.Update\Common.Update.Checker\Common.Update.Checker.csproj" />
</ItemGroup>
</Project>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Make sure you have `dotnet 6` sdk installed on your maching and added to `PATH`
Then,

```shell
cd 'KitX Dashboard'
dotnet build
```

Expand All @@ -30,6 +31,8 @@ dotnet run

this will build and run in current folder.

suggest using `dotnet run --project ../../..` command in `KitX Dashboard/bin/Debug/net6.0` folder.

# Dependencies

`KitX Dashboard` rely on a lot of other projects.
Expand Down

0 comments on commit fa47fa8

Please sign in to comment.