Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ee4a12e9b5 | ||
|
|
5e815ac0d3 | ||
|
|
96a14d69bd | ||
|
|
c79fba98d3 | ||
|
|
4160bb43c5 |
@@ -68,19 +68,19 @@ jobs:
|
|||||||
run: dotnet --info
|
run: dotnet --info
|
||||||
|
|
||||||
- name: Build BD.WTTS.Client.AppHost
|
- name: Build BD.WTTS.Client.AppHost
|
||||||
run: dotnet build -c Release src\BD.WTTS.Client.AppHost\BD.WTTS.Client.AppHost.csproj --nologo -v q --property:WarningLevel=1 --property:DebugType=pdbonly
|
run: dotnet build -c Release src\BD.WTTS.Client.AppHost\BD.WTTS.Client.AppHost.csproj --nologo -v q --property:WarningLevel=1;DebugType=pdbonly
|
||||||
|
|
||||||
- name: Build BD.WTTS.Client.Plugins.Accelerator.ReverseProxy
|
- name: Build BD.WTTS.Client.Plugins.Accelerator.ReverseProxy
|
||||||
run: dotnet build -c Release src\BD.WTTS.Client.Plugins.Accelerator.ReverseProxy\BD.WTTS.Client.Plugins.Accelerator.ReverseProxy.csproj --nologo -v q --property:WarningLevel=1 --property:DebugType=pdbonly
|
run: dotnet build -c Release src\BD.WTTS.Client.Plugins.Accelerator.ReverseProxy\BD.WTTS.Client.Plugins.Accelerator.ReverseProxy.csproj --nologo -v q --property:WarningLevel=1;DebugType=pdbonly
|
||||||
|
|
||||||
- name: Build BD.WTTS.Client.Avalonia.App
|
- name: Build BD.WTTS.Client.Avalonia.App
|
||||||
run: dotnet build -c Release src\BD.WTTS.Client.Avalonia.App\BD.WTTS.Client.Avalonia.App.csproj --nologo -v q --property:WarningLevel=1 --property:DebugType=pdbonly
|
run: dotnet build -c Release src\BD.WTTS.Client.Avalonia.App\BD.WTTS.Client.Avalonia.App.csproj --nologo -v q --property:WarningLevel=1;DebugType=pdbonly
|
||||||
|
|
||||||
- name: Build BD.WTTS.Client.Avalonia.Designer.HostApp
|
- name: Build BD.WTTS.Client.Avalonia.Designer.HostApp
|
||||||
run: dotnet build -c Release src\BD.WTTS.Client.Avalonia.Designer.HostApp\BD.WTTS.Client.Avalonia.Designer.HostApp.csproj --nologo -v q --property:WarningLevel=1 --property:DebugType=pdbonly
|
run: dotnet build -c Release src\BD.WTTS.Client.Avalonia.Designer.HostApp\BD.WTTS.Client.Avalonia.Designer.HostApp.csproj --nologo -v q --property:WarningLevel=1;DebugType=pdbonly
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: dotnet test src/BD.WTTS.UnitTest/BD.WTTS.UnitTest.csproj -c Release -p:GeneratePackageOnBuild=false --nologo -v q --property:WarningLevel=1 --property:DebugType=pdbonly
|
run: dotnet test src/BD.WTTS.UnitTest/BD.WTTS.UnitTest.csproj -c Release -p:GeneratePackageOnBuild=false --nologo -v q --property:WarningLevel=1;DebugType=pdbonly
|
||||||
|
|
||||||
# release:
|
# release:
|
||||||
# name: Release
|
# name: Release
|
||||||
|
|||||||
@@ -37,6 +37,3 @@
|
|||||||
[submodule "ref/Facepunch.Steamworks"]
|
[submodule "ref/Facepunch.Steamworks"]
|
||||||
path = ref/Facepunch.Steamworks
|
path = ref/Facepunch.Steamworks
|
||||||
url = https://github.com/BeyondDimension/Facepunch.Steamworks.git
|
url = https://github.com/BeyondDimension/Facepunch.Steamworks.git
|
||||||
[submodule "ref/appcenter-sdk-dotnet"]
|
|
||||||
path = ref/appcenter-sdk-dotnet
|
|
||||||
url = https://github.com/BeyondDimension/appcenter-sdk-dotnet.git
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
[](https://learn.microsoft.com/zh-cn/dotnet/core/whats-new/dotnet-7)
|
[](https://learn.microsoft.com/zh-cn/dotnet/core/whats-new/dotnet-7)
|
||||||
[](https://learn.microsoft.com/zh-cn/dotnet/csharp/whats-new/csharp-11)
|
[](https://learn.microsoft.com/zh-cn/dotnet/csharp/whats-new/csharp-11)
|
||||||
|
|
||||||
[](https://afdian.com/@rmbgame)
|
[](https://afdian.net/@rmbgame)
|
||||||
[](https://ko-fi.com/rmbgame)
|
[](https://ko-fi.com/rmbgame)
|
||||||
[](https://www.patreon.com/rmbgame)
|
[](https://www.patreon.com/rmbgame)
|
||||||
|
|
||||||
|
|||||||
@@ -214,14 +214,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Facepunch.Steamworks.Posix"
|
|||||||
EndProject
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Steam++", "src\BD.WTTS.Client.AppHost.Bridge\Steam++.csproj", "{26D8AA24-2ACE-4167-BC2B-117B9BB76AA4}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Steam++", "src\BD.WTTS.Client.AppHost.Bridge\Steam++.csproj", "{26D8AA24-2ACE-4167-BC2B-117B9BB76AA4}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "BD.WTTS.Client.AppHost.Bridge.Package", "src\BD.WTTS.Client.AppHost.Bridge.Package\BD.WTTS.Client.AppHost.Bridge.Package.wapproj", "{27795C79-2994-4514-8656-BA34FCEE8901}"
|
||||||
|
EndProject
|
||||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ArchiSteamFarm", "ref\ArchiSteamFarm\ArchiSteamFarm\ArchiSteamFarm.csproj", "{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}"
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ArchiSteamFarm", "ref\ArchiSteamFarm\ArchiSteamFarm\ArchiSteamFarm.csproj", "{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "AppCenter", "AppCenter", "{02EA681E-C7D8-13C7-8484-4AC65E1B71E8}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BD.AppCenter.Any", "ref\appcenter-sdk-dotnet\SDK\AppCenter\BD.AppCenter.Any\BD.AppCenter.Any.csproj", "{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}"
|
|
||||||
EndProject
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BD.AppCenter.Analytics.Any", "ref\appcenter-sdk-dotnet\SDK\AppCenterAnalytics\BD.AppCenter.Analytics.Any\BD.AppCenter.Analytics.Any.csproj", "{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}"
|
|
||||||
EndProject
|
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
@@ -1236,6 +1232,36 @@ Global
|
|||||||
{26D8AA24-2ACE-4167-BC2B-117B9BB76AA4}.Release|x64.Build.0 = Release|Any CPU
|
{26D8AA24-2ACE-4167-BC2B-117B9BB76AA4}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{26D8AA24-2ACE-4167-BC2B-117B9BB76AA4}.Release|x86.ActiveCfg = Release|Any CPU
|
{26D8AA24-2ACE-4167-BC2B-117B9BB76AA4}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{26D8AA24-2ACE-4167-BC2B-117B9BB76AA4}.Release|x86.Build.0 = Release|Any CPU
|
{26D8AA24-2ACE-4167-BC2B-117B9BB76AA4}.Release|x86.Build.0 = Release|Any CPU
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|ARM.ActiveCfg = Debug|ARM
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|ARM.Build.0 = Debug|ARM
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|ARM.Deploy.0 = Debug|ARM
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|ARM64.ActiveCfg = Debug|ARM64
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|ARM64.Build.0 = Debug|ARM64
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|ARM64.Deploy.0 = Debug|ARM64
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|x64.ActiveCfg = Debug|x64
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|x64.Build.0 = Debug|x64
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|x64.Deploy.0 = Debug|x64
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|x86.ActiveCfg = Debug|x86
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|x86.Build.0 = Debug|x86
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Debug|x86.Deploy.0 = Debug|x86
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|Any CPU.Deploy.0 = Release|Any CPU
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|ARM.ActiveCfg = Release|ARM
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|ARM.Build.0 = Release|ARM
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|ARM.Deploy.0 = Release|ARM
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|ARM64.ActiveCfg = Release|ARM64
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|ARM64.Build.0 = Release|ARM64
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|ARM64.Deploy.0 = Release|ARM64
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|x64.ActiveCfg = Release|x64
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|x64.Build.0 = Release|x64
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|x64.Deploy.0 = Release|x64
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|x86.ActiveCfg = Release|x86
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|x86.Build.0 = Release|x86
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901}.Release|x86.Deploy.0 = Release|x86
|
||||||
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||||
@@ -1256,46 +1282,6 @@ Global
|
|||||||
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}.Release|x64.Build.0 = Release|Any CPU
|
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}.Release|x64.Build.0 = Release|Any CPU
|
||||||
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}.Release|x86.ActiveCfg = Release|Any CPU
|
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}.Release|x86.ActiveCfg = Release|Any CPU
|
||||||
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}.Release|x86.Build.0 = Release|Any CPU
|
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B}.Release|x86.Build.0 = Release|Any CPU
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|ARM.Build.0 = Debug|Any CPU
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|ARM64.Build.0 = Debug|Any CPU
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|ARM.ActiveCfg = Release|Any CPU
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|ARM.Build.0 = Release|Any CPU
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|ARM64.ActiveCfg = Release|Any CPU
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|ARM64.Build.0 = Release|Any CPU
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|ARM.Build.0 = Debug|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|ARM64.Build.0 = Debug|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|x64.ActiveCfg = Debug|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|x64.Build.0 = Debug|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Debug|x86.Build.0 = Debug|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|ARM.ActiveCfg = Release|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|ARM.Build.0 = Release|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|ARM64.ActiveCfg = Release|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|ARM64.Build.0 = Release|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|x64.ActiveCfg = Release|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|x64.Build.0 = Release|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|x86.ActiveCfg = Release|Any CPU
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F}.Release|x86.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
@@ -1361,10 +1347,8 @@ Global
|
|||||||
{638745C0-B699-4009-9764-05434C511403} = {99D97BD4-3F51-48BC-8BD2-647F6D268BB0}
|
{638745C0-B699-4009-9764-05434C511403} = {99D97BD4-3F51-48BC-8BD2-647F6D268BB0}
|
||||||
{35676E23-8E54-4785-A75B-98EB0650596B} = {99D97BD4-3F51-48BC-8BD2-647F6D268BB0}
|
{35676E23-8E54-4785-A75B-98EB0650596B} = {99D97BD4-3F51-48BC-8BD2-647F6D268BB0}
|
||||||
{26D8AA24-2ACE-4167-BC2B-117B9BB76AA4} = {5541B406-4A9A-4AC8-AA77-CE14E133DB80}
|
{26D8AA24-2ACE-4167-BC2B-117B9BB76AA4} = {5541B406-4A9A-4AC8-AA77-CE14E133DB80}
|
||||||
|
{27795C79-2994-4514-8656-BA34FCEE8901} = {5541B406-4A9A-4AC8-AA77-CE14E133DB80}
|
||||||
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B} = {99D97BD4-3F51-48BC-8BD2-647F6D268BB0}
|
{8C34FCD5-8C7F-4B10-A970-7DEA8A61F56B} = {99D97BD4-3F51-48BC-8BD2-647F6D268BB0}
|
||||||
{02EA681E-C7D8-13C7-8484-4AC65E1B71E8} = {90E88965-DB90-4B49-94F5-6D2965491988}
|
|
||||||
{BD7E0AF0-FABE-3C94-DE36-CF365BF7323D} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
|
||||||
{9611DBE7-EDF0-9EB0-EE93-B158981BE48F} = {02EA681E-C7D8-13C7-8484-4AC65E1B71E8}
|
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
SolutionGuid = {567F588F-E95C-4286-8B30-DB3B2200221C}
|
SolutionGuid = {567F588F-E95C-4286-8B30-DB3B2200221C}
|
||||||
|
|||||||
@@ -3,12 +3,6 @@
|
|||||||
default_base_path="$HOME/WattToolkit"
|
default_base_path="$HOME/WattToolkit"
|
||||||
base_path="$default_base_path"
|
base_path="$default_base_path"
|
||||||
|
|
||||||
# 检查是否以root身份执行
|
|
||||||
if [ "$EUID" -eq 0 ]; then
|
|
||||||
echo "此脚本不能以root身份执行。"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 循环直到用户输入有效路径或直接回车
|
# 循环直到用户输入有效路径或直接回车
|
||||||
while true; do
|
while true; do
|
||||||
# 使用 zenity 提示用户选择安装路径或使用默认路径
|
# 使用 zenity 提示用户选择安装路径或使用默认路径
|
||||||
@@ -47,45 +41,7 @@ base_url="https://api.steampp.net"
|
|||||||
architecture=1
|
architecture=1
|
||||||
app_name="Watt Toolkit"
|
app_name="Watt Toolkit"
|
||||||
PROCESS_NAMES=("$exec_name" "$app_name")
|
PROCESS_NAMES=("$exec_name" "$app_name")
|
||||||
Check_LC_Code() {
|
export LC_ALL=en_US.UTF-8
|
||||||
# 检查当前 LANG 环境变量
|
|
||||||
current_lang="${LC_ALL:-$LANG}"
|
|
||||||
echo "当前语言环境: $current_lang"
|
|
||||||
|
|
||||||
# 检查是否为 C 或 C.UTF-8
|
|
||||||
if [ "$current_lang" = "C" ] || [ "$current_lang" = "C.UTF-8" ]; then
|
|
||||||
echo "当前语言环境是 C 或 C.UTF-8,需要修改。"
|
|
||||||
|
|
||||||
# 列出系统支持的语言环境
|
|
||||||
supported_locales=$(locale -a)
|
|
||||||
if [ -z "$supported_locales" ]; then
|
|
||||||
echo "未能获取到支持的语言环境列表。请检查系统配置。"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# 遍历支持的语言环境列表,找到第一个不是 C 或 C.UTF-8 的项
|
|
||||||
first_non_c_locale=""
|
|
||||||
for locale in $supported_locales; do
|
|
||||||
if [ "$locale" != "C" ] && [ "$locale" != "C.UTF-8" ]; then
|
|
||||||
first_non_c_locale="$locale"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# 检查是否找到了非 C/C.UTF-8 的语言环境
|
|
||||||
if [ -n "$first_non_c_locale" ]; then
|
|
||||||
echo "修改语言环境为支持列表中的第一个非 C/C.UTF-8 项:$first_non_c_locale"
|
|
||||||
export LC_ALL="$first_non_c_locale"
|
|
||||||
echo "语言环境已修改为 $first_non_c_locale。"
|
|
||||||
else
|
|
||||||
echo "未能找到非 C/C.UTF-8 的语言环境。请检查系统配置。"
|
|
||||||
return 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "当前语言环境不是 C 或 C.UTF-8,无需修改。"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
Check_LC_Code
|
|
||||||
Install_certutil() {
|
Install_certutil() {
|
||||||
# 判断发行版类型
|
# 判断发行版类型
|
||||||
if command -v certutil &>/dev/null; then
|
if command -v certutil &>/dev/null; then
|
||||||
@@ -404,44 +360,34 @@ Kill_Process
|
|||||||
Decompression
|
Decompression
|
||||||
# xdg-icon-resource install "$base_path/Icons/Watt-Toolkit.png" --size 128 Watt-Toolkit
|
# xdg-icon-resource install "$base_path/Icons/Watt-Toolkit.png" --size 128 Watt-Toolkit
|
||||||
InitDesktop() {
|
InitDesktop() {
|
||||||
# 检查XDG_DESKTOP_DIR环境变量,如果未设置则使用默认值
|
|
||||||
XDG_DESKTOP_DIR="${XDG_DESKTOP_DIR:-$HOME/Desktop}"
|
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
# 使用 zenity 提示用户选择安装路径或使用默认路径
|
# 使用 zenity 提示用户选择安装路径或使用默认路径
|
||||||
choice=$(zenity --list --radiolist --title="请选择要添加到的位置" \
|
choice=$(zenity --list --radiolist --title="请选择要添加到的位置" --column="选择" --column="路径" TRUE "$HOME/.local/share/applications/" FALSE "$HOME/Desktop")
|
||||||
--column="选择" --column="路径" \
|
|
||||||
TRUE "$XDG_DESKTOP_DIR" \
|
|
||||||
FALSE "$HOME/.local/share/applications/")
|
|
||||||
|
|
||||||
# 检查用户输入
|
# 检查用户输入
|
||||||
if [ "$choice" == "$HOME/.local/share/applications/" ]; then
|
if [ "$choice" == "$HOME/.local/share/applications/" ]; then
|
||||||
target_dir="$HOME/.local/share/applications/"
|
target_dir="$HOME/.local/share/applications/"
|
||||||
break
|
break
|
||||||
elif [ "$choice" == "$XDG_DESKTOP_DIR" ]; then
|
elif [ "$choice" == "$HOME/Desktop" ]; then
|
||||||
target_dir="$XDG_DESKTOP_DIR"
|
target_dir="$HOME/Desktop/"
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
# 无效选项时给出提示,并继续循环
|
echo "无效选项,请输入 1 或 2。"
|
||||||
zenity --info --text="无效选项,请重新选择。"
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
#添加桌面文件
|
||||||
# 添加桌面文件
|
|
||||||
rm -rf "$target_dir/Watt Toolkit.desktop" 2>/dev/null
|
rm -rf "$target_dir/Watt Toolkit.desktop" 2>/dev/null
|
||||||
cat <<EOT > "$target_dir/Watt Toolkit.desktop"
|
echo "#!/usr/bin/env xdg-open
|
||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=Watt Toolkit
|
Name=Watt Toolkit
|
||||||
Exec=$base_path/$exec_name.sh
|
Exec=$base_path/$exec_name.sh
|
||||||
Icon=$base_path/Icons/Watt-Toolkit.png
|
Icon=$base_path/Icons/Watt-Toolkit.png
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
StartupNotify=false
|
StartupNotify=false" >"$target_dir/Watt Toolkit.desktop"
|
||||||
EOT
|
|
||||||
chmod +x "$target_dir/Watt Toolkit.desktop"
|
chmod +x "$target_dir/Watt Toolkit.desktop"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
InitDesktop
|
InitDesktop
|
||||||
# update-desktop-database ~/.local/share/applications
|
# update-desktop-database ~/.local/share/applications
|
||||||
#运行程序
|
#运行程序
|
||||||
|
|||||||
@@ -973,7 +973,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"TypeName": "string",
|
"TypeName": "string",
|
||||||
"PropertyName": "CustomDohAddres2",
|
"PropertyName": "CustomDohAddres",
|
||||||
"DefaultValue": "null",
|
"DefaultValue": "null",
|
||||||
"DefaultValueIsConst": true,
|
"DefaultValueIsConst": true,
|
||||||
"Summary": "自定义 DNS over HTTPS 地址",
|
"Summary": "自定义 DNS over HTTPS 地址",
|
||||||
@@ -988,15 +988,6 @@
|
|||||||
"Summary": "加速页面 Tab 选项卡选中下标",
|
"Summary": "加速页面 Tab 选项卡选中下标",
|
||||||
"IsRegionOrEndregion": null,
|
"IsRegionOrEndregion": null,
|
||||||
"IsValueType": null
|
"IsValueType": null
|
||||||
},
|
|
||||||
{
|
|
||||||
"TypeName": "bool",
|
|
||||||
"PropertyName": "AutoShowWattAcceleratorWindow",
|
|
||||||
"DefaultValue": "true",
|
|
||||||
"DefaultValueIsConst": true,
|
|
||||||
"Summary": "加速后自动唤起 Watt 加速器界面",
|
|
||||||
"IsRegionOrEndregion": null,
|
|
||||||
"IsValueType": null
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Usings": ""
|
"Usings": ""
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
# Steam++ v3.X Program File Structure for Windows
|
||||||
|
|
||||||
|
- dotnet 共享运行时,删除后将使用已安装的运行时,此目参考 ```C:\Program Files\dotnet```,可自行升级行库小版本号,二进制兼容
|
||||||
|
- host
|
||||||
|
- fxr
|
||||||
|
- x.y.z
|
||||||
|
- hostfxr.dll
|
||||||
|
- shared
|
||||||
|
- Microsoft.AspNetCore.App
|
||||||
|
- x.y.z
|
||||||
|
- Microsoft.NETCore.App
|
||||||
|
- x.y.z
|
||||||
|
- native
|
||||||
|
- win-x64
|
||||||
|
- 7z.dll
|
||||||
|
- av_libglesv2.dll
|
||||||
|
- e_sqlite3.dll
|
||||||
|
- libHarfBuzzSharp.dll
|
||||||
|
- libSkiaSharp.dll
|
||||||
|
- WebView2Loader.dll
|
||||||
|
- WinDivert.dll
|
||||||
|
- WinDivert64.sys
|
||||||
|
- assemblies 主模块程序集
|
||||||
|
- modules 可选模块
|
||||||
|
- ~~Update 自更新模块,删除该文件夹后禁用更新~~
|
||||||
|
- Steam++.Update.exe 更新程序,CDN 分发更包,下载与解压在主程序中,此进程仅退出主程执行覆盖操作
|
||||||
|
- Accelerator 网络加速
|
||||||
|
- Steam++.Accelerator.exe 控制台子服务进,使用匿名管道与主进程通信,无参数或指定某参数(待定)启动时可读取配置文件启动加速,可全独立运行,ASP.NET Core Web API 项目,支持 Docker
|
||||||
|
- Steam++.Plugins.Accelerator.dll 插件程集
|
||||||
|
- AccountSwitch 账号切换
|
||||||
|
- Steam++.Plugins.AccountSwitch.dll
|
||||||
|
- ~~ArchiSteamFarm~~
|
||||||
|
- Steam++.ArchiSteamFarm.exe
|
||||||
|
- Steam++.Plugins.ArchiSteamFarm.dll
|
||||||
|
- GameList 库存游戏
|
||||||
|
- Steam++.Plugins.GameList.dll
|
||||||
|
- LocalAuth 本地令牌
|
||||||
|
- Steam++.Plugins.LocalAuth.dll
|
||||||
|
- GameTools 游戏工具
|
||||||
|
- Steam++.Plugins.GameTools.dll
|
||||||
|
- Steam++.exe (主启动程序).NET Framework 二进制主程序
|
||||||
|
- Steam++.exe.config 使用该配置文件以允许在 .NET Framework 3.5 ~ 4.8.1 中任意版本中兼容运行(从 Windows 7 ~ 11 中所有系统自带运行时)
|
||||||
|
- ~~Steam++.Uninstall.exe 卸载程序(WinForms?AOT?)~~
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<Project>
|
|
||||||
<PropertyGroup>
|
|
||||||
<CheckEolWorkloads>false</CheckEolWorkloads>
|
|
||||||
</PropertyGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
static void WinDivert()
|
|
||||||
{
|
|
||||||
var dllWinDivert = Path.Combine(ProjectUtils.ProjPath, "ref", "WinDivert.dll");
|
|
||||||
var sysWinDivert64 = Path.Combine(ProjectUtils.ProjPath, "ref", "WinDivert64.sys");
|
|
||||||
|
|
||||||
byte[][] data = [File.ReadAllBytes(dllWinDivert), File.ReadAllBytes(sysWinDivert64)];
|
|
||||||
var bytes = MemoryPackSerializer.Serialize(data);
|
|
||||||
bytes.AsSpan().Reverse();
|
|
||||||
|
|
||||||
File.WriteAllBytes(Path.Combine(ProjectUtils.ProjPath, "ref", "WinDivert.mpo"), bytes);
|
|
||||||
}
|
|
||||||
@@ -3,6 +3,14 @@ namespace BD.WTTS;
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 提供用来获取应用程序信息(如版本号、说明、加载的程序集等)的属性。
|
/// 提供用来获取应用程序信息(如版本号、说明、加载的程序集等)的属性。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Mobius3(
|
||||||
|
"""
|
||||||
|
Mobius.AssemblyInfo
|
||||||
|
AssemblyInfo.cs
|
||||||
|
AssemblyInfo.Version.cs
|
||||||
|
AssemblyInfo.Version.NativeHost.cs
|
||||||
|
AssemblyInfo.Version.Setup.Windows.cs
|
||||||
|
""")]
|
||||||
public static partial class AssemblyInfo
|
public static partial class AssemblyInfo
|
||||||
{
|
{
|
||||||
const string Version2 = "3.0";
|
const string Version2 = "3.0";
|
||||||
@@ -16,14 +24,14 @@ public static partial class AssemblyInfo
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 预览版本号,范围 1~9,只增不减
|
/// 预览版本号,范围 1~9,只增不减
|
||||||
/// </summary>
|
/// </summary>
|
||||||
const string ver_for_preview = "9";
|
const string ver_for_preview = "8";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// RC 版本号,范围 0~9,只增不减
|
/// RC 版本号,范围 0~9,只增不减
|
||||||
/// </summary>
|
/// </summary>
|
||||||
const string ver_for_rc = "13";
|
const string ver_for_rc = "8";
|
||||||
|
|
||||||
public const string FileVersion = $"{Version2}.{ver_for_rc}1{ver_for_preview}.0";
|
public const string FileVersion = $"{Version2}.{ver_for_rc}0{ver_for_preview}.0";
|
||||||
|
|
||||||
//public const string InformationalVersion = Version;
|
//public const string InformationalVersion = Version;
|
||||||
//public const string InformationalVersion = $"{Version}-preview.{ver_for_preview}";
|
//public const string InformationalVersion = $"{Version}-preview.{ver_for_preview}";
|
||||||
@@ -146,4 +154,20 @@ false
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[AttributeUsage(AttributeTargets.All, Inherited = false)]
|
||||||
|
sealed class Mobius3Attribute : Attribute
|
||||||
|
{
|
||||||
|
public Mobius3Attribute()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Mobius3Attribute(string str)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool Obsolete { get; set; }
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// Mobius Properties\XmlnsDefinition.cs
|
||||||
#if (WINDOWS || MACCATALYST || MACOS || LINUX) && !(IOS || ANDROID)
|
#if (WINDOWS || MACCATALYST || MACOS || LINUX) && !(IOS || ANDROID)
|
||||||
// C# 10 定义全局 using
|
// C# 10 定义全局 using
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
<DelaySign>false</DelaySign>
|
<DelaySign>false</DelaySign>
|
||||||
<AssemblyOriginatorKeyFile>$(MSBuildProjectDirectory)\..\..\avalonia.snk</AssemblyOriginatorKeyFile>
|
<AssemblyOriginatorKeyFile>$(MSBuildProjectDirectory)\..\..\avalonia.snk</AssemblyOriginatorKeyFile>
|
||||||
<!--https://github.com/AvaloniaUI/Avalonia/blob/0.10.10/build/SharedVersion.props#L18-->
|
<!--https://github.com/AvaloniaUI/Avalonia/blob/0.10.10/build/SharedVersion.props#L18-->
|
||||||
<AvaloniaAccessUnstablePrivateApis>true</AvaloniaAccessUnstablePrivateApis>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
|||||||
@@ -0,0 +1,169 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
|
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' < '15.0'">
|
||||||
|
<VisualStudioVersion>15.0</VisualStudioVersion>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup Label="ProjectConfigurations">
|
||||||
|
<ProjectConfiguration Include="Debug|x86">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x86</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x86">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x86</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|x64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|x64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>x64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|ARM">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>ARM</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|ARM">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>ARM</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|ARM64">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>ARM64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|ARM64">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>ARM64</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Debug|AnyCPU">
|
||||||
|
<Configuration>Debug</Configuration>
|
||||||
|
<Platform>AnyCPU</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
<ProjectConfiguration Include="Release|AnyCPU">
|
||||||
|
<Configuration>Release</Configuration>
|
||||||
|
<Platform>AnyCPU</Platform>
|
||||||
|
</ProjectConfiguration>
|
||||||
|
</ItemGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
|
||||||
|
</PropertyGroup>
|
||||||
|
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />
|
||||||
|
<PropertyGroup>
|
||||||
|
<ProjectGuid>27795c79-2994-4514-8656-ba34fcee8901</ProjectGuid>
|
||||||
|
<TargetPlatformVersion>10.0.22621.0</TargetPlatformVersion>
|
||||||
|
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
|
||||||
|
<DefaultLanguage>zh-CN</DefaultLanguage>
|
||||||
|
<AppxPackageSigningEnabled>false</AppxPackageSigningEnabled>
|
||||||
|
<NoWarn>$(NoWarn);NU1702</NoWarn>
|
||||||
|
<GenerateTemporaryStoreCertificate>True</GenerateTemporaryStoreCertificate>
|
||||||
|
<GenerateAppInstallerFile>False</GenerateAppInstallerFile>
|
||||||
|
<AppxAutoIncrementPackageRevision>False</AppxAutoIncrementPackageRevision>
|
||||||
|
<GenerateTestArtifacts>True</GenerateTestArtifacts>
|
||||||
|
<AppxBundlePlatforms>neutral</AppxBundlePlatforms>
|
||||||
|
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
|
||||||
|
<EntryPointProjectUniqueName>..\BD.WTTS.Client.AppHost.Bridge\Steam++.csproj</EntryPointProjectUniqueName>
|
||||||
|
<DefineConstants>PROJ_DESKTOP_BRIDGE;$(DefineConstants)</DefineConstants>
|
||||||
|
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
|
||||||
|
<AppxBundle>Always</AppxBundle>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||||
|
<AppxBundle>Always</AppxBundle>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<AppxBundle>Always</AppxBundle>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||||
|
<AppxBundle>Always</AppxBundle>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
|
||||||
|
<AppxBundle>Always</AppxBundle>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<AppxBundle>Always</AppxBundle>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x86'">
|
||||||
|
<AppxBundle>Always</AppxBundle>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x86'">
|
||||||
|
<AppxBundle>Always</AppxBundle>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
|
||||||
|
<AppxBundle>Always</AppxBundle>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
|
||||||
|
<AppxBundle>Always</AppxBundle>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<AppxManifest Include="Package.appxmanifest">
|
||||||
|
<SubType>Designer</SubType>
|
||||||
|
</AppxManifest>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="Images\BadgeLogo.scale-100.png" />
|
||||||
|
<Content Include="Images\BadgeLogo.scale-125.png" />
|
||||||
|
<Content Include="Images\BadgeLogo.scale-150.png" />
|
||||||
|
<Content Include="Images\BadgeLogo.scale-200.png" />
|
||||||
|
<Content Include="Images\BadgeLogo.scale-400.png" />
|
||||||
|
<Content Include="Images\LargeTile.scale-100.png" />
|
||||||
|
<Content Include="Images\LargeTile.scale-125.png" />
|
||||||
|
<Content Include="Images\LargeTile.scale-150.png" />
|
||||||
|
<Content Include="Images\LargeTile.scale-200.png" />
|
||||||
|
<Content Include="Images\LargeTile.scale-400.png" />
|
||||||
|
<Content Include="Images\SmallTile.scale-100.png" />
|
||||||
|
<Content Include="Images\SmallTile.scale-125.png" />
|
||||||
|
<Content Include="Images\SmallTile.scale-150.png" />
|
||||||
|
<Content Include="Images\SmallTile.scale-200.png" />
|
||||||
|
<Content Include="Images\SmallTile.scale-400.png" />
|
||||||
|
<Content Include="Images\SplashScreen.scale-100.png" />
|
||||||
|
<Content Include="Images\SplashScreen.scale-125.png" />
|
||||||
|
<Content Include="Images\SplashScreen.scale-150.png" />
|
||||||
|
<Content Include="Images\SplashScreen.scale-200.png" />
|
||||||
|
<Content Include="Images\SplashScreen.scale-400.png" />
|
||||||
|
<Content Include="Images\Square150x150Logo.scale-100.png" />
|
||||||
|
<Content Include="Images\Square150x150Logo.scale-125.png" />
|
||||||
|
<Content Include="Images\Square150x150Logo.scale-150.png" />
|
||||||
|
<Content Include="Images\Square150x150Logo.scale-200.png" />
|
||||||
|
<Content Include="Images\Square150x150Logo.scale-400.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.altform-lightunplated_targetsize-16.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.altform-lightunplated_targetsize-24.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.altform-lightunplated_targetsize-256.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.altform-lightunplated_targetsize-32.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.altform-lightunplated_targetsize-48.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-16.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-256.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-32.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-48.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.scale-100.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.scale-125.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.scale-150.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.scale-200.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.scale-400.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.targetsize-16.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.targetsize-24.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.targetsize-24_altform-unplated.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.targetsize-256.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.targetsize-32.png" />
|
||||||
|
<Content Include="Images\Square44x44Logo.targetsize-48.png" />
|
||||||
|
<Content Include="Images\StoreLogo.scale-100.png" />
|
||||||
|
<Content Include="Images\StoreLogo.scale-125.png" />
|
||||||
|
<Content Include="Images\StoreLogo.scale-150.png" />
|
||||||
|
<Content Include="Images\StoreLogo.scale-200.png" />
|
||||||
|
<Content Include="Images\StoreLogo.scale-400.png" />
|
||||||
|
<Content Include="Images\Wide310x150Logo.scale-100.png" />
|
||||||
|
<Content Include="Images\Wide310x150Logo.scale-125.png" />
|
||||||
|
<Content Include="Images\Wide310x150Logo.scale-150.png" />
|
||||||
|
<Content Include="Images\Wide310x150Logo.scale-200.png" />
|
||||||
|
<Content Include="Images\Wide310x150Logo.scale-400.png" />
|
||||||
|
<None Include="Package.StoreAssociation.xml" />
|
||||||
|
</ItemGroup>
|
||||||
|
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" PrivateAssets="all" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\BD.WTTS.Client.AppHost.Bridge\Steam++.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
||||||
|
After Width: | Height: | Size: 190 B |
|
After Width: | Height: | Size: 218 B |
|
After Width: | Height: | Size: 231 B |
|
After Width: | Height: | Size: 279 B |
|
After Width: | Height: | Size: 444 B |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 666 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 666 B |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 8.8 KiB |
|
After Width: | Height: | Size: 484 B |
|
After Width: | Height: | Size: 787 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 4.6 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
@@ -0,0 +1,74 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<Package
|
||||||
|
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
|
||||||
|
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
|
||||||
|
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
|
||||||
|
xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10"
|
||||||
|
xmlns:desktop2="http://schemas.microsoft.com/appx/manifest/desktop/windows10/2"
|
||||||
|
IgnorableNamespaces="uap rescap desktop desktop2">
|
||||||
|
|
||||||
|
<Identity
|
||||||
|
Name="4651ED44255E.47979655102CE"
|
||||||
|
Publisher="CN=A90E406B-B2D3-4A23-B061-0FA1D65C4F66"
|
||||||
|
Version="3.0.999.0" />
|
||||||
|
|
||||||
|
<Properties>
|
||||||
|
<DisplayName>Watt Toolkit</DisplayName>
|
||||||
|
<PublisherDisplayName>软妹币玩家</PublisherDisplayName>
|
||||||
|
<Logo>Images\StoreLogo.png</Logo>
|
||||||
|
</Properties>
|
||||||
|
|
||||||
|
<Dependencies>
|
||||||
|
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
|
||||||
|
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
|
||||||
|
</Dependencies>
|
||||||
|
|
||||||
|
<Resources>
|
||||||
|
<Resource Language="x-generate"/>
|
||||||
|
</Resources>
|
||||||
|
|
||||||
|
<Applications>
|
||||||
|
<Application Id="App"
|
||||||
|
Executable="$targetnametoken$.exe"
|
||||||
|
EntryPoint="$targetentrypoint$">
|
||||||
|
<uap:VisualElements
|
||||||
|
DisplayName="Watt Toolkit"
|
||||||
|
Description="「Watt Toolkit」是一个开源跨平台的多功能游戏工具箱,此工具的大部分功能都是需要您下载安装 Steam 才能使用。"
|
||||||
|
BackgroundColor="transparent"
|
||||||
|
Square150x150Logo="Images\Square150x150Logo.png"
|
||||||
|
Square44x44Logo="Images\Square44x44Logo.png">
|
||||||
|
<uap:DefaultTile Wide310x150Logo="Images\Wide310x150Logo.png" Square71x71Logo="Images\SmallTile.png" Square310x310Logo="Images\LargeTile.png" ShortName="Steam++">
|
||||||
|
<uap:ShowNameOnTiles>
|
||||||
|
<uap:ShowOn Tile="square150x150Logo"/>
|
||||||
|
<uap:ShowOn Tile="wide310x150Logo"/>
|
||||||
|
<uap:ShowOn Tile="square310x310Logo"/>
|
||||||
|
</uap:ShowNameOnTiles>
|
||||||
|
</uap:DefaultTile >
|
||||||
|
<uap:SplashScreen Image="Images\SplashScreen.png" />
|
||||||
|
<uap:InitialRotationPreference>
|
||||||
|
<uap:Rotation Preference="landscape"/>
|
||||||
|
</uap:InitialRotationPreference>
|
||||||
|
<uap:LockScreen BadgeLogo="Images\BadgeLogo.png" Notification="badgeAndTileText"/>
|
||||||
|
</uap:VisualElements>
|
||||||
|
<Extensions>
|
||||||
|
<desktop:Extension Category="windows.fullTrustProcess" Executable="Steam++\Steam++.exe" />
|
||||||
|
<desktop:Extension Category="windows.startupTask" Executable="Steam++\Steam++.exe" EntryPoint="Windows.FullTrustApplication">
|
||||||
|
<desktop:StartupTask TaskId="BootAutoStartTask" Enabled="true" DisplayName="Steam++ System Boot Run" />
|
||||||
|
</desktop:Extension>
|
||||||
|
<uap:Extension Category="windows.protocol">
|
||||||
|
<uap:Protocol Name="spp">
|
||||||
|
<uap:Logo>Images\Square44x44Logo.png</uap:Logo>
|
||||||
|
<uap:DisplayName>Steam++ URI Scheme</uap:DisplayName>
|
||||||
|
</uap:Protocol>
|
||||||
|
</uap:Extension>
|
||||||
|
</Extensions>
|
||||||
|
</Application>
|
||||||
|
</Applications>
|
||||||
|
|
||||||
|
<Capabilities>
|
||||||
|
<Capability Name="internetClient" />
|
||||||
|
<rescap:Capability Name="runFullTrust" />
|
||||||
|
<rescap:Capability Name="allowElevation" />
|
||||||
|
</Capabilities>
|
||||||
|
</Package>
|
||||||
@@ -10,6 +10,6 @@
|
|||||||
<legacyCorruptedStateExceptionsPolicy enabled="true"/>
|
<legacyCorruptedStateExceptionsPolicy enabled="true"/>
|
||||||
</runtime>
|
</runtime>
|
||||||
<appSettings>
|
<appSettings>
|
||||||
<add key="d" value="9.0.0"/>
|
<add key="d" value="8.0.0"/>
|
||||||
</appSettings>
|
</appSettings>
|
||||||
</configuration>
|
</configuration>
|
||||||
@@ -16,7 +16,7 @@ static unsafe partial class Program
|
|||||||
{
|
{
|
||||||
static Program()
|
static Program()
|
||||||
{
|
{
|
||||||
dotnet_version_major = "9";
|
dotnet_version_major = "8";
|
||||||
dotnet_version_minor = "0";
|
dotnet_version_minor = "0";
|
||||||
dotnet_version_build = "0";
|
dotnet_version_build = "0";
|
||||||
dotnet_version = $"{dotnet_version_major}.{dotnet_version_minor}.{dotnet_version_build}";
|
dotnet_version = $"{dotnet_version_major}.{dotnet_version_minor}.{dotnet_version_build}";
|
||||||
@@ -426,8 +426,8 @@ static unsafe partial class Program
|
|||||||
if (!File.Exists(config_path) || !File.Exists(dotnetlib_path))
|
if (!File.Exists(config_path) || !File.Exists(dotnetlib_path))
|
||||||
{
|
{
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
config_path = string.Join(Path.DirectorySeparatorChar.ToString(), new[] { ProjectUtils.ProjPath, "src", "BD.WTTS.Client.Avalonia.App", "bin", "Debug", $"net{dotnet_version_major}.{dotnet_version_minor}-windows10.0.19041", $"{dotnet_dll_name}.runtimeconfig.json" });
|
config_path = string.Join(Path.DirectorySeparatorChar.ToString(), new[] { ProjectUtils.ProjPath, "src", "BD.WTTS.Client.Avalonia.App", "bin", "Debug", $"net{dotnet_version_major}.{dotnet_version_minor}-windows10.0.19041.0", $"{dotnet_dll_name}.runtimeconfig.json" });
|
||||||
dotnetlib_path = string.Join(Path.DirectorySeparatorChar.ToString(), new[] { ProjectUtils.ProjPath, "src", "BD.WTTS.Client.Avalonia.App", "bin", "Debug", $"net{dotnet_version_major}.{dotnet_version_minor}-windows10.0.19041", $"{dotnet_dll_name}.dll" });
|
dotnetlib_path = string.Join(Path.DirectorySeparatorChar.ToString(), new[] { ProjectUtils.ProjPath, "src", "BD.WTTS.Client.Avalonia.App", "bin", "Debug", $"net{dotnet_version_major}.{dotnet_version_minor}-windows10.0.19041.0", $"{dotnet_dll_name}.dll" });
|
||||||
#else
|
#else
|
||||||
ShowErrMessageBox($"Loading assembly failed \"{dotnetlib_path}\"");
|
ShowErrMessageBox($"Loading assembly failed \"{dotnetlib_path}\"");
|
||||||
return (int)ExitCode.EntryPointFileNotFound;
|
return (int)ExitCode.EntryPointFileNotFound;
|
||||||
|
|||||||
@@ -91,41 +91,38 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="BD.Common.XmlnsDefinition.Avalonia">
|
||||||
|
<Aliases>BD_Common_XmlnsDefinition_Avalonia</Aliases>
|
||||||
|
</PackageReference>
|
||||||
<ProjectReference Include="..\BD.WTTS.Client.Avalonia\BD.WTTS.Client.Avalonia.csproj" />
|
<ProjectReference Include="..\BD.WTTS.Client.Avalonia\BD.WTTS.Client.Avalonia.csproj" />
|
||||||
<ProjectReference Include="..\BD.WTTS.Client\BD.WTTS.Client.csproj" />
|
<ProjectReference Include="..\BD.WTTS.Client\BD.WTTS.Client.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<!--<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows' AND Exists('$(NugetPackageRoot)\system.drawing.common\$(Version_System_Drawing_Common)\lib\net9.0\System.Drawing.Common.dll')">
|
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows' AND Exists('$(NugetPackageRoot)\system.drawing.common\$(Version_System_Drawing_Common)\lib\net8.0\System.Drawing.Common.dll')">
|
||||||
--><!-- Windows Only --><!--
|
<!-- Windows Only -->
|
||||||
--><!-- 修复:存在 Microsoft.WindowsDesktop.App 依赖时不会将 System.Drawing.Common.dll 复制到输出目录--><!--
|
<!-- 修复:存在 Microsoft.WindowsDesktop.App 依赖时不会将 System.Drawing.Common.dll 复制到输出目录-->
|
||||||
<None Include="$(NugetPackageRoot)\system.drawing.common\$(Version_System_Drawing_Common)\lib\net9.0\System.Drawing.Common.dll">
|
<None Include="$(NugetPackageRoot)\system.drawing.common\$(Version_System_Drawing_Common)\lib\net8.0\System.Drawing.Common.dll">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
<Reference Include="System.Drawing.Common">
|
<Reference Include="System.Drawing.Common">
|
||||||
<HintPath>$(NugetPackageRoot)\system.drawing.common\$(Version_System_Drawing_Common)\lib\net9.0\System.Drawing.Common.dll</HintPath>
|
<HintPath>$(NugetPackageRoot)\system.drawing.common\$(Version_System_Drawing_Common)\lib\net8.0\System.Drawing.Common.dll</HintPath>
|
||||||
</Reference>
|
|
||||||
<None Include="$(NugetPackageRoot)\microsoft.win32.systemevents\9.0.0\runtimes\win\lib\net9.0\Microsoft.Win32.SystemEvents.dll">
|
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
|
||||||
</None>
|
|
||||||
<Reference Include="Microsoft.Win32.SystemEvents">
|
|
||||||
<HintPath>$(NugetPackageRoot)\microsoft.win32.systemevents\9.0.0\runtimes\win\lib\net9.0\Microsoft.Win32.SystemEvents.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows' AND Exists('$(NugetPackageRoot)\splat.drawing\$(Version_Splat_Drawing)\lib\net7.0\Splat.Drawing.dll')">
|
<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows' AND Exists('$(NugetPackageRoot)\splat.drawing\$(Version_Splat_Drawing)\lib\net7.0\Splat.Drawing.dll')">
|
||||||
--><!-- Windows Only --><!--
|
<!-- Windows Only -->
|
||||||
--><!-- 修复:Splat.Drawing 包存在 WPF 的依赖项 --><!--
|
<!-- 修复:Splat.Drawing 包存在 WPF 的依赖项 -->
|
||||||
<PackageReference Include="Splat.Drawing">
|
<PackageReference Include="Splat.Drawing">
|
||||||
<ExcludeAssets>all</ExcludeAssets>
|
<ExcludeAssets>all</ExcludeAssets>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
<Reference Include="Splat.Drawing">
|
<Reference Include="Splat.Drawing">
|
||||||
<HintPath>$(NugetPackageRoot)\splat.drawing\$(Version_Splat_Drawing)\lib\net7.0\Splat.Drawing.dll</HintPath>
|
<HintPath>$(NugetPackageRoot)\splat.drawing\$(Version_Splat_Drawing)\lib\net7.0\Splat.Drawing.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
--><!-- 修复:System.Reactive 包存在 System.Windows.Forms 的依赖项 --><!--
|
<!-- 修复:System.Reactive 包存在 System.Windows.Forms 的依赖项 -->
|
||||||
<Reference Include="System.Reactive">
|
<Reference Include="System.Reactive">
|
||||||
<HintPath>$(NugetPackageRoot)\system.reactive\$(Version_System_Reactive)\lib\net6.0\System.Reactive.dll</HintPath>
|
<HintPath>$(NugetPackageRoot)\system.reactive\$(Version_System_Reactive)\lib\net6.0\System.Reactive.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
</ItemGroup>-->
|
</ItemGroup>
|
||||||
|
|
||||||
<Import Project="..\TFM_NETX_WITH_DESKTOP.props" />
|
<Import Project="..\TFM_NETX_WITH_DESKTOP.props" />
|
||||||
|
|
||||||
|
|||||||
@@ -4,12 +4,12 @@
|
|||||||
<dict>
|
<dict>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>Watt Toolkit</string>
|
<string>Watt Toolkit</string>
|
||||||
<key>CFBundleDisplayName</key>
|
|
||||||
<string>Watt Toolkit</string>
|
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>3.0.0</string>
|
<string>3.0.0</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>3.0.1219.0</string>
|
<string>3.0.0.0</string>
|
||||||
|
<key>LSMinimumSystemVersion</key>
|
||||||
|
<string>10.15</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
|
|||||||
@@ -175,10 +175,6 @@ partial class Program
|
|||||||
{
|
{
|
||||||
RenderingMode = GetRenderingMode().ToArray(),
|
RenderingMode = GetRenderingMode().ToArray(),
|
||||||
});
|
});
|
||||||
builder.With(new MacOSPlatformOptions
|
|
||||||
{
|
|
||||||
DisableDefaultApplicationMenuItems = true,
|
|
||||||
});
|
|
||||||
#elif LINUX
|
#elif LINUX
|
||||||
builder.With(new X11PlatformOptions
|
builder.With(new X11PlatformOptions
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -68,6 +68,9 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Moq" />
|
<PackageReference Include="Moq" />
|
||||||
|
<PackageReference Include="BD.Common.XmlnsDefinition.Avalonia">
|
||||||
|
<Aliases>BD_Common_XmlnsDefinition_Avalonia</Aliases>
|
||||||
|
</PackageReference>
|
||||||
<ProjectReference Include="..\BD.WTTS.Client.Avalonia\BD.WTTS.Client.Avalonia.csproj" />
|
<ProjectReference Include="..\BD.WTTS.Client.Avalonia\BD.WTTS.Client.Avalonia.csproj" />
|
||||||
<ProjectReference Include="..\BD.WTTS.Client.Plugins.Accelerator\BD.WTTS.Client.Plugins.Accelerator.csproj" />
|
<ProjectReference Include="..\BD.WTTS.Client.Plugins.Accelerator\BD.WTTS.Client.Plugins.Accelerator.csproj" />
|
||||||
<ProjectReference Include="..\BD.WTTS.Client.Plugins.ArchiSteamFarmPlus\BD.WTTS.Client.Plugins.ArchiSteamFarmPlus.csproj" />
|
<ProjectReference Include="..\BD.WTTS.Client.Plugins.ArchiSteamFarmPlus\BD.WTTS.Client.Plugins.ArchiSteamFarmPlus.csproj" />
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
<RootNamespace>BD.WTTS</RootNamespace>
|
<RootNamespace>BD.WTTS</RootNamespace>
|
||||||
<DefineConstants>AVALONIA;$(DefineConstants)</DefineConstants>
|
<DefineConstants>AVALONIA;$(DefineConstants)</DefineConstants>
|
||||||
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
<AvaloniaUseCompiledBindingsByDefault>true</AvaloniaUseCompiledBindingsByDefault>
|
||||||
<AvaloniaAccessUnstablePrivateApis>true</AvaloniaAccessUnstablePrivateApis>
|
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@@ -73,6 +72,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<PackageReference Include="BD.Common.XmlnsDefinition.Avalonia">
|
||||||
|
<Aliases>BD_Common_XmlnsDefinition_Avalonia</Aliases>
|
||||||
|
</PackageReference>
|
||||||
<PackageReference Include="BD.Common" />
|
<PackageReference Include="BD.Common" />
|
||||||
<PackageReference Include="BD.Common.Primitives" />
|
<PackageReference Include="BD.Common.Primitives" />
|
||||||
<PackageReference Include="BD.Common.Essentials" />
|
<PackageReference Include="BD.Common.Essentials" />
|
||||||
|
|||||||
@@ -1,203 +0,0 @@
|
|||||||
using Avalonia.Reactive;
|
|
||||||
using Avalonia.Xaml.Interactions.Responsive;
|
|
||||||
using Avalonia.Xaml.Interactivity;
|
|
||||||
|
|
||||||
namespace BD.WTTS.Behaviors;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Observes <see cref="Behavior{T}.AssociatedObject"/> control or <see cref="SourceControl"/> control <see cref="Visual.Bounds"/> property changes and if triggered sets or removes style classes when conditions from <see cref="AdaptiveClassSetter"/> are met.
|
|
||||||
/// </summary>
|
|
||||||
public class AdaptiveBehavior : Behavior<Control>
|
|
||||||
{
|
|
||||||
private IDisposable? _disposable;
|
|
||||||
private AvaloniaList<AdaptiveClassSetter>? _setters;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Identifies the <seealso cref="SourceControl"/> avalonia property.
|
|
||||||
/// </summary>
|
|
||||||
public static readonly StyledProperty<Control?> SourceControlProperty =
|
|
||||||
AvaloniaProperty.Register<AdaptiveBehavior, Control?>(nameof(SourceControl));
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Identifies the <seealso cref="TargetControl"/> avalonia property.
|
|
||||||
/// </summary>
|
|
||||||
public static readonly StyledProperty<Control?> TargetControlProperty =
|
|
||||||
AvaloniaProperty.Register<AdaptiveBehavior, Control?>(nameof(TargetControl));
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Identifies the <seealso cref="Setters"/> avalonia property.
|
|
||||||
/// </summary>
|
|
||||||
public static readonly DirectProperty<AdaptiveBehavior, AvaloniaList<AdaptiveClassSetter>> SettersProperty =
|
|
||||||
AvaloniaProperty.RegisterDirect<AdaptiveBehavior, AvaloniaList<AdaptiveClassSetter>>(nameof(Setters), t => t.Setters);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the the source control that <see cref="Visual.BoundsProperty"/> property are observed from, if not set <see cref="Behavior{T}.AssociatedObject"/> is used. This is a avalonia property.
|
|
||||||
/// </summary>
|
|
||||||
[ResolveByName]
|
|
||||||
public Control? SourceControl
|
|
||||||
{
|
|
||||||
get => GetValue(SourceControlProperty);
|
|
||||||
set => SetValue(SourceControlProperty, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets or sets the target control that class name that should be added or removed when triggered, if not set <see cref="Behavior{T}.AssociatedObject"/> is used or <see cref="AdaptiveClassSetter.TargetControl"/> from <see cref="AdaptiveClassSetter"/>. This is a avalonia property.
|
|
||||||
/// </summary>
|
|
||||||
[ResolveByName]
|
|
||||||
public Control? TargetControl
|
|
||||||
{
|
|
||||||
get => GetValue(TargetControlProperty);
|
|
||||||
set => SetValue(TargetControlProperty, value);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Gets adaptive class setters collection. This is a avalonia property.
|
|
||||||
/// </summary>
|
|
||||||
[Content]
|
|
||||||
public AvaloniaList<AdaptiveClassSetter> Setters => _setters ??= new AvaloniaList<AdaptiveClassSetter>();
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
protected override void OnAttachedToVisualTree()
|
|
||||||
{
|
|
||||||
base.OnAttachedToVisualTree();
|
|
||||||
|
|
||||||
StopObserving();
|
|
||||||
StartObserving();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <inheritdoc/>
|
|
||||||
protected override void OnDetachedFromVisualTree()
|
|
||||||
{
|
|
||||||
base.OnDetachedFromVisualTree();
|
|
||||||
|
|
||||||
StopObserving();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void StartObserving()
|
|
||||||
{
|
|
||||||
var sourceControl = GetValue(SourceControlProperty) is not null
|
|
||||||
? SourceControl
|
|
||||||
: AssociatedObject;
|
|
||||||
|
|
||||||
if (sourceControl is not null)
|
|
||||||
{
|
|
||||||
_disposable = ObserveBounds(sourceControl);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void StopObserving()
|
|
||||||
{
|
|
||||||
_disposable?.Dispose();
|
|
||||||
}
|
|
||||||
|
|
||||||
private IDisposable ObserveBounds(Control sourceControl)
|
|
||||||
{
|
|
||||||
if (sourceControl is null)
|
|
||||||
{
|
|
||||||
throw new ArgumentNullException(nameof(sourceControl));
|
|
||||||
}
|
|
||||||
|
|
||||||
return sourceControl.GetObservable(Visual.BoundsProperty)
|
|
||||||
.Subscribe(new AnonymousObserver<Rect>(bounds => ValueChanged(sourceControl, Setters, bounds)));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ValueChanged(Control? sourceControl, AvaloniaList<AdaptiveClassSetter>? setters, Rect bounds)
|
|
||||||
{
|
|
||||||
if (sourceControl is null || setters is null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach (var setter in setters)
|
|
||||||
{
|
|
||||||
var isMinOrMaxWidthSet = setter.IsSet(AdaptiveClassSetter.MinWidthProperty)
|
|
||||||
|| setter.IsSet(AdaptiveClassSetter.MaxWidthProperty);
|
|
||||||
var widthConditionTriggered = GetResult(setter.MinWidthOperator, bounds.Width, setter.MinWidth)
|
|
||||||
&& GetResult(setter.MaxWidthOperator, bounds.Width, setter.MaxWidth);
|
|
||||||
|
|
||||||
var isMinOrMaxHeightSet = setter.IsSet(AdaptiveClassSetter.MinHeightProperty)
|
|
||||||
|| setter.IsSet(AdaptiveClassSetter.MaxHeightProperty);
|
|
||||||
var heightConditionTriggered = GetResult(setter.MinHeightOperator, bounds.Height, setter.MinHeight)
|
|
||||||
&& GetResult(setter.MaxHeightOperator, bounds.Height, setter.MaxHeight);
|
|
||||||
|
|
||||||
var isAddClassTriggered = isMinOrMaxWidthSet switch
|
|
||||||
{
|
|
||||||
true when !isMinOrMaxHeightSet => widthConditionTriggered,
|
|
||||||
false when isMinOrMaxHeightSet => heightConditionTriggered,
|
|
||||||
true when isMinOrMaxHeightSet => widthConditionTriggered && heightConditionTriggered,
|
|
||||||
_ => false
|
|
||||||
};
|
|
||||||
|
|
||||||
var targetControl = setter.GetValue(AdaptiveClassSetter.TargetControlProperty) is not null
|
|
||||||
? setter.TargetControl
|
|
||||||
: GetValue(TargetControlProperty) is not null
|
|
||||||
? TargetControl
|
|
||||||
: AssociatedObject;
|
|
||||||
|
|
||||||
if (targetControl is not null)
|
|
||||||
{
|
|
||||||
var className = setter.ClassName;
|
|
||||||
var isPseudoClass = setter.IsPseudoClass;
|
|
||||||
|
|
||||||
if (isAddClassTriggered)
|
|
||||||
{
|
|
||||||
Add(targetControl, className, isPseudoClass);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Remove(targetControl, className, isPseudoClass);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool GetResult(ComparisonConditionType comparisonConditionType, double property, double value)
|
|
||||||
{
|
|
||||||
return comparisonConditionType switch
|
|
||||||
{
|
|
||||||
// ReSharper disable once CompareOfFloatsByEqualityOperator
|
|
||||||
ComparisonConditionType.Equal => property == value,
|
|
||||||
// ReSharper disable once CompareOfFloatsByEqualityOperator
|
|
||||||
ComparisonConditionType.NotEqual => property != value,
|
|
||||||
ComparisonConditionType.LessThan => property < value,
|
|
||||||
ComparisonConditionType.LessThanOrEqual => property <= value,
|
|
||||||
ComparisonConditionType.GreaterThan => property > value,
|
|
||||||
ComparisonConditionType.GreaterThanOrEqual => property >= value,
|
|
||||||
_ => throw new ArgumentOutOfRangeException()
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void Add(Control targetControl, string? className, bool isPseudoClass)
|
|
||||||
{
|
|
||||||
if (className is null || string.IsNullOrEmpty(className) || targetControl.Classes.Contains(className))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isPseudoClass)
|
|
||||||
{
|
|
||||||
((IPseudoClasses)targetControl.Classes).Add(className);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
targetControl.Classes.Add(className);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void Remove(Control targetControl, string? className, bool isPseudoClass)
|
|
||||||
{
|
|
||||||
if (className is null || string.IsNullOrEmpty(className) || !targetControl.Classes.Contains(className))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (isPseudoClass)
|
|
||||||
{
|
|
||||||
((IPseudoClasses)targetControl.Classes).Remove(className);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
targetControl.Classes.Remove(className);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
namespace BD.WTTS.Converters;
|
namespace BD.WTTS.Converters;
|
||||||
|
|
||||||
|
[Mobius(
|
||||||
|
"""
|
||||||
|
Mobius.UI.Converters.WaveProgressGradientOffsetConverter
|
||||||
|
""")]
|
||||||
public sealed class BitmapAssetValueConverter : ImageValueConverter
|
public sealed class BitmapAssetValueConverter : ImageValueConverter
|
||||||
{
|
{
|
||||||
public override object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
public override object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
namespace BD.WTTS.Converters;
|
namespace BD.WTTS.Converters;
|
||||||
|
|
||||||
|
[Mobius(
|
||||||
|
"""
|
||||||
|
Mobius.UI.Converters.ColorStringToBrushConverter
|
||||||
|
""")]
|
||||||
public sealed class ColorStringToBrushConverter : IValueConverter
|
public sealed class ColorStringToBrushConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
namespace BD.WTTS.Converters;
|
namespace BD.WTTS.Converters;
|
||||||
|
|
||||||
|
[Mobius(
|
||||||
|
"""
|
||||||
|
Mobius.UI.Converters.EnumConverter
|
||||||
|
""")]
|
||||||
public sealed class EnumConverter : IValueConverter
|
public sealed class EnumConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ using IBinding = BD.WTTS.Converters.Abstractions.IBinding;
|
|||||||
|
|
||||||
namespace BD.WTTS.Converters;
|
namespace BD.WTTS.Converters;
|
||||||
|
|
||||||
|
[Mobius(
|
||||||
|
"""
|
||||||
|
Mobius.UI.Converters.EnumEqualValueConverter
|
||||||
|
""")]
|
||||||
public sealed class EnumEqualValueConverter : IValueConverter
|
public sealed class EnumEqualValueConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
namespace BD.WTTS.Converters;
|
namespace BD.WTTS.Converters;
|
||||||
|
|
||||||
|
[Mobius(
|
||||||
|
"""
|
||||||
|
Mobius.UI.Converters.EnumLocalizationNameConverter
|
||||||
|
""")]
|
||||||
public sealed class EnumLocalizationNameConverter : IValueConverter
|
public sealed class EnumLocalizationNameConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ using SkiaSharp;
|
|||||||
|
|
||||||
namespace BD.WTTS.Converters;
|
namespace BD.WTTS.Converters;
|
||||||
|
|
||||||
|
[Mobius(
|
||||||
|
"""
|
||||||
|
Mobius.UI.Converters.Abstractions.ImageValueConverter
|
||||||
|
""")]
|
||||||
public abstract class ImageValueConverter : IValueConverter
|
public abstract class ImageValueConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public abstract object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture);
|
public abstract object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture);
|
||||||
@@ -46,6 +50,7 @@ public abstract class ImageValueConverter : IValueConverter
|
|||||||
/// <param name="clipStream"></param>
|
/// <param name="clipStream"></param>
|
||||||
/// <param name="bitmap"></param>
|
/// <param name="bitmap"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
[Mobius("", Obsolete = true)]
|
||||||
static bool TryGetBitmap([NotNullWhen(true)] ImageSource.ClipStream? clipStream, [NotNullWhen(true)] out SKBitmap? bitmap)
|
static bool TryGetBitmap([NotNullWhen(true)] ImageSource.ClipStream? clipStream, [NotNullWhen(true)] out SKBitmap? bitmap)
|
||||||
{
|
{
|
||||||
if (clipStream?.Stream == null)
|
if (clipStream?.Stream == null)
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
namespace BD.WTTS.Converters;
|
namespace BD.WTTS.Converters;
|
||||||
|
|
||||||
|
[Mobius(
|
||||||
|
"""
|
||||||
|
Mobius.UI.Converters.IsNullConverter
|
||||||
|
""")]
|
||||||
public sealed class IsNullConverter : IValueConverter
|
public sealed class IsNullConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
namespace BD.WTTS.Converters;
|
namespace BD.WTTS.Converters;
|
||||||
|
|
||||||
|
[Mobius(
|
||||||
|
"""
|
||||||
|
Mobius.UI.Converters.NameToFontFamilyConverter
|
||||||
|
""")]
|
||||||
public sealed class NameToFontFamilyConverter : IValueConverter
|
public sealed class NameToFontFamilyConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
namespace BD.WTTS.Converters;
|
namespace BD.WTTS.Converters;
|
||||||
|
|
||||||
|
[Mobius(
|
||||||
|
"""
|
||||||
|
Mobius.UI.Converters.RangeToSweepConverter
|
||||||
|
""")]
|
||||||
public sealed class RangeToSweepConverter : IMultiValueConverter
|
public sealed class RangeToSweepConverter : IMultiValueConverter
|
||||||
{
|
{
|
||||||
public object? Convert(IList<object?> values, Type targetType, object? parameter, CultureInfo culture)
|
public object? Convert(IList<object?> values, Type targetType, object? parameter, CultureInfo culture)
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
namespace BD.WTTS.Converters;
|
namespace BD.WTTS.Converters;
|
||||||
|
|
||||||
|
[Mobius(
|
||||||
|
"""
|
||||||
|
Mobius.UI.Converters.ResourceKeyValueConverter
|
||||||
|
""")]
|
||||||
public sealed class ResourceKeyValueConverter : IValueConverter
|
public sealed class ResourceKeyValueConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
namespace BD.WTTS.Converters;
|
namespace BD.WTTS.Converters;
|
||||||
|
|
||||||
|
[Mobius(
|
||||||
|
"""
|
||||||
|
Mobius.UI.Converters.StringEqualsConverter
|
||||||
|
""")]
|
||||||
public class StringEqualsConverter : IValueConverter
|
public class StringEqualsConverter : IValueConverter
|
||||||
{
|
{
|
||||||
static string ToString(object? obj) => obj?.ToString() ?? string.Empty;
|
static string ToString(object? obj) => obj?.ToString() ?? string.Empty;
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ using SteamKit2;
|
|||||||
|
|
||||||
namespace BD.WTTS.Converters;
|
namespace BD.WTTS.Converters;
|
||||||
|
|
||||||
|
[Mobius(
|
||||||
|
"""
|
||||||
|
Mobius.UI.Converters.StringFormatConverter
|
||||||
|
""")]
|
||||||
public sealed class StringFormatConverter : IValueConverter, IMultiValueConverter
|
public sealed class StringFormatConverter : IValueConverter, IMultiValueConverter
|
||||||
{
|
{
|
||||||
const string Size = "size";
|
const string Size = "size";
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
namespace BD.WTTS.Converters;
|
namespace BD.WTTS.Converters;
|
||||||
|
|
||||||
|
[Mobius(
|
||||||
|
"""
|
||||||
|
Mobius.UI.Converters.VisibleStringConverter
|
||||||
|
""")]
|
||||||
public sealed class VisibleStringConverter : IMultiValueConverter
|
public sealed class VisibleStringConverter : IMultiValueConverter
|
||||||
{
|
{
|
||||||
public object? Convert(IList<object?> values, Type targetType, object? parameter, CultureInfo culture)
|
public object? Convert(IList<object?> values, Type targetType, object? parameter, CultureInfo culture)
|
||||||
|
|||||||
@@ -1,5 +1,9 @@
|
|||||||
namespace BD.WTTS.Converters;
|
namespace BD.WTTS.Converters;
|
||||||
|
|
||||||
|
[Mobius(
|
||||||
|
"""
|
||||||
|
Mobius.UI.Converters.WaveProgressValueConverter
|
||||||
|
""")]
|
||||||
public sealed class WaveProgressValueConverter : IValueConverter
|
public sealed class WaveProgressValueConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public static readonly WaveProgressValueConverter Instance = new();
|
public static readonly WaveProgressValueConverter Instance = new();
|
||||||
@@ -18,6 +22,10 @@ public sealed class WaveProgressValueConverter : IValueConverter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Mobius(
|
||||||
|
"""
|
||||||
|
Mobius.UI.Converters.WaveProgressValueColorConverter
|
||||||
|
""")]
|
||||||
public class WaveProgressValueColorConverter : IValueConverter
|
public class WaveProgressValueColorConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public static readonly WaveProgressValueColorConverter Instance = new();
|
public static readonly WaveProgressValueColorConverter Instance = new();
|
||||||
@@ -37,6 +45,10 @@ public class WaveProgressValueColorConverter : IValueConverter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Mobius(
|
||||||
|
"""
|
||||||
|
Mobius.UI.Converters.WaveProgressValueTextConverter
|
||||||
|
""")]
|
||||||
public class WaveProgressValueTextConverter : IValueConverter
|
public class WaveProgressValueTextConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public static readonly WaveProgressValueTextConverter Instance = new();
|
public static readonly WaveProgressValueTextConverter Instance = new();
|
||||||
@@ -54,6 +66,10 @@ public class WaveProgressValueTextConverter : IValueConverter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Mobius(
|
||||||
|
"""
|
||||||
|
Mobius.UI.Converters.WaveProgressGradientOffsetConverter
|
||||||
|
""")]
|
||||||
public class WaveProgressGradientOffsetConverter : IValueConverter
|
public class WaveProgressGradientOffsetConverter : IValueConverter
|
||||||
{
|
{
|
||||||
public static readonly WaveProgressGradientOffsetConverter Instance = new();
|
public static readonly WaveProgressGradientOffsetConverter Instance = new();
|
||||||
|
|||||||
@@ -2,6 +2,10 @@ namespace BD.WTTS.UI;
|
|||||||
|
|
||||||
public static class ControlExtensions
|
public static class ControlExtensions
|
||||||
{
|
{
|
||||||
|
[Mobius(
|
||||||
|
"""
|
||||||
|
Mobius.UI.ControlExtensions.SetViewModel
|
||||||
|
""")]
|
||||||
public static void SetViewModel<T>(this Control c, bool useCache = false) where T : ViewModelBase, new()
|
public static void SetViewModel<T>(this Control c, bool useCache = false) where T : ViewModelBase, new()
|
||||||
{
|
{
|
||||||
if (c.DataContext == null || c.DataContext.GetType() != typeof(T))
|
if (c.DataContext == null || c.DataContext.GetType() != typeof(T))
|
||||||
|
|||||||