mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-27 04:41:15 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e978b54edb | ||
|
|
9ee00ee13a | ||
|
|
c52d619d43 | ||
|
|
a76b27d19e | ||
|
|
a8f1630007 | ||
|
|
aba6af383f | ||
|
|
2aca99458b | ||
|
|
13d6043702 | ||
|
|
14a9aa52cd | ||
|
|
3992fc3317 | ||
|
|
11aca2ca8e | ||
|
|
805428dd81 | ||
|
|
5c578f87d4 | ||
|
|
394e8a68b3 | ||
|
|
a4d3f91d0a | ||
|
|
e57e3516dd | ||
|
|
c542454c25 | ||
|
|
6c6ccd4440 | ||
|
|
079ab27e26 | ||
|
|
0a28450907 | ||
|
|
7588c7ea38 | ||
|
|
b91a678513 | ||
|
|
4995629127 | ||
|
|
57b4d92d53 | ||
|
|
a0e67bc110 | ||
|
|
bc368b40c3 | ||
|
|
9b8de8ec5b | ||
|
|
fee682d84d | ||
|
|
5d4c8cbcb8 | ||
|
|
5ea1374866 | ||
|
|
23849cebfe | ||
|
|
c49bd0593c | ||
|
|
61e944daf8 | ||
|
|
2057759f6e | ||
|
|
4fffe29ed5 | ||
|
|
593d3d1aa9 | ||
|
|
4553ae5a7c | ||
|
|
de82ced575 | ||
|
|
9be9ae8a4b | ||
|
|
074a3c6c0a | ||
|
|
b5d31fc210 | ||
|
|
60f234a449 | ||
|
|
3f91ebd8ec | ||
|
|
2099020e0b | ||
|
|
90cb9002c5 | ||
|
|
f0f772ba4e | ||
|
|
8c401cf4e8 | ||
|
|
6babec7852 | ||
|
|
ecd4f63cf6 | ||
|
|
1340ca9891 | ||
|
|
d07da86482 | ||
|
|
38642023c4 | ||
|
|
07abafde22 | ||
|
|
c45619e7f7 | ||
|
|
bf531bb8b8 | ||
|
|
0e9f4eb979 | ||
|
|
c63b8b8331 | ||
|
|
465bd9ef8b | ||
|
|
fbd0780a6a | ||
|
|
8ab660a1df | ||
|
|
6ad4ca9921 | ||
|
|
acb5e0842d | ||
|
|
2385af9a1a | ||
|
|
7b9019091f | ||
|
|
b853698275 |
@@ -25,3 +25,6 @@
|
||||
[submodule "references/sqlite-net"]
|
||||
path = references/sqlite-net
|
||||
url = https://github.com/SteamTools-Team/sqlite-net.git
|
||||
[submodule "references/FluentAvalonia"]
|
||||
path = references/FluentAvalonia
|
||||
url = https://github.com/SteamTools-Team/FluentAvalonia.git
|
||||
|
||||
+3
-2
@@ -31,8 +31,8 @@ English | [简体中文](./README.md)
|
||||
## 🚀 Download channel
|
||||
- [GitHub Releases](https://github.com/SteamTools-Team/SteamTools/releases)
|
||||
- [Gitee Releases](https://gitee.com/rmbgame/SteamTools/releases)
|
||||
- [Microsoft Store](https://www.microsoft.com/store/apps/9MTCFHS560NG)
|
||||
- [Official WebSite](https://steampp.net)
|
||||
- ~~[Microsoft Store](https://www.microsoft.com/store/apps/9MTCFHS560NG)~~
|
||||
|
||||
## ✨ Functions
|
||||
1. Local reverse proxy for Steam's community webpage to enable normal access in **the Chinese Mainland, Mainland of China**
|
||||
@@ -154,9 +154,11 @@ Read what we [milestones](https://github.com/SteamTools-Team/SteamTools/mileston
|
||||
* [AvaloniaUI](https://github.com/AvaloniaUI/Avalonia)
|
||||
* [AvaloniaGif](https://github.com/jmacato/AvaloniaGif)
|
||||
* [Avalonia XAML Behaviors](https://github.com/wieslawsoltes/AvaloniaBehaviors)
|
||||
* [FluentAvalonia](https://github.com/amwx/FluentAvalonia)
|
||||
* [APNG.NET](https://github.com/jz5/APNG.NET)
|
||||
* [Moq](https://github.com/moq/moq4)
|
||||
* [NPOI](https://github.com/nissl-lab/npoi)
|
||||
* [Fleck](https://github.com/statianzo/Fleck)
|
||||
* [Swashbuckle.AspNetCore](https://github.com/domaindrivendev/Swashbuckle.AspNetCore)
|
||||
* [AspNet.Security.OpenId.Providers](https://github.com/aspnet-contrib/AspNet.Security.OpenId.Providers)
|
||||
* [AspNet.Security.OAuth.Providers](https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers)
|
||||
@@ -166,7 +168,6 @@ Read what we [milestones](https://github.com/SteamTools-Team/SteamTools/mileston
|
||||
* [Ant Design](https://github.com/ant-design/ant-design)
|
||||
* [Ant Design Blazor](https://github.com/ant-design-blazor/ant-design-blazor)
|
||||
* [Toast messages for Xamarin.iOS](https://github.com/andrius-k/Toast)
|
||||
* [Floating Action Button Speed Dial](https://github.com/leinardi/FloatingActionButtonSpeedDial)
|
||||
* [Visual Studio App Center SDK for .NET](https://github.com/microsoft/appcenter-sdk-dotnet)
|
||||
* [AppCenter-XMac](https://github.com/nor0x/AppCenter-XMac)
|
||||
* [MSBuild.Sdk.Extras](https://github.com/novotnyllc/MSBuildSdkExtras)
|
||||
|
||||
@@ -32,8 +32,8 @@
|
||||
## 🚀 下载渠道
|
||||
- [GitHub Releases](https://github.com/SteamTools-Team/SteamTools/releases)
|
||||
- [Gitee Releases](https://gitee.com/rmbgame/SteamTools/releases)
|
||||
- [Microsoft Store](https://www.microsoft.com/store/apps/9MTCFHS560NG)
|
||||
- [Official WebSite](https://steampp.net)
|
||||
- ~~[Microsoft Store](https://www.microsoft.com/store/apps/9MTCFHS560NG)~~
|
||||
|
||||
## ✨ 功能
|
||||
1. 反代 Steam 的社区网页使其能正常访问
|
||||
@@ -132,6 +132,7 @@
|
||||
* [CefNet](https://github.com/CefNet/CefNet)
|
||||
* [CefSharp](https://github.com/cefsharp/CefSharp)
|
||||
* [ZXing.Net.Mobile](https://github.com/Redth/ZXing.Net.Mobile)
|
||||
* [Floating Action Button Speed Dial](https://github.com/leinardi/FloatingActionButtonSpeedDial)
|
||||
-->
|
||||
<!--👇图标如果发生更改,还需更改 Tools.OpenSourceLibraryList(Program.OpenSourceLibraryListEmoji) -->
|
||||
## 📄 感谢以下开源项目
|
||||
@@ -173,9 +174,11 @@
|
||||
* [AvaloniaUI](https://github.com/AvaloniaUI/Avalonia)
|
||||
* [AvaloniaGif](https://github.com/jmacato/AvaloniaGif)
|
||||
* [Avalonia XAML Behaviors](https://github.com/wieslawsoltes/AvaloniaBehaviors)
|
||||
* [FluentAvalonia](https://github.com/amwx/FluentAvalonia)
|
||||
* [APNG.NET](https://github.com/jz5/APNG.NET)
|
||||
* [Moq](https://github.com/moq/moq4)
|
||||
* [NPOI](https://github.com/nissl-lab/npoi)
|
||||
* [Fleck](https://github.com/statianzo/Fleck)
|
||||
* [Swashbuckle.AspNetCore](https://github.com/domaindrivendev/Swashbuckle.AspNetCore)
|
||||
* [AspNet.Security.OpenId.Providers](https://github.com/aspnet-contrib/AspNet.Security.OpenId.Providers)
|
||||
* [AspNet.Security.OAuth.Providers](https://github.com/aspnet-contrib/AspNet.Security.OAuth.Providers)
|
||||
@@ -185,7 +188,6 @@
|
||||
* [Ant Design](https://github.com/ant-design/ant-design)
|
||||
* [Ant Design Blazor](https://github.com/ant-design-blazor/ant-design-blazor)
|
||||
* [Toast messages for Xamarin.iOS](https://github.com/andrius-k/Toast)
|
||||
* [Floating Action Button Speed Dial](https://github.com/leinardi/FloatingActionButtonSpeedDial)
|
||||
* [Visual Studio App Center SDK for .NET](https://github.com/microsoft/appcenter-sdk-dotnet)
|
||||
* [AppCenter-XMac](https://github.com/nor0x/AppCenter-XMac)
|
||||
* [MSBuild.Sdk.Extras](https://github.com/novotnyllc/MSBuildSdkExtras)
|
||||
|
||||
@@ -124,6 +124,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ST.Tools.DesktopBridgeLink"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ST.Server.Resources", "src\ST.Server.Resources\ST.Server.Resources.csproj", "{9252AA73-9CF7-4B09-89CB-7FCB65A5DCFF}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluentAvalonia", "references\FluentAvalonia\FluentAvalonia\FluentAvalonia.csproj", "{42154590-445B-41CF-AAEB-AACD1B65FA2C}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -1518,6 +1520,34 @@ Global
|
||||
{9252AA73-9CF7-4B09-89CB-7FCB65A5DCFF}.Release|x64.Build.0 = Release|Any CPU
|
||||
{9252AA73-9CF7-4B09-89CB-7FCB65A5DCFF}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{9252AA73-9CF7-4B09-89CB-7FCB65A5DCFF}.Release|x86.Build.0 = Release|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|x64.Build.0 = Release|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -1567,6 +1597,7 @@ Global
|
||||
{2A66B796-7BC2-4BE0-A920-1A457BBCCC67} = {1B889C56-157A-4493-85F2-76366282B002}
|
||||
{137690DF-A3CB-4817-ACB8-9EAF3A52B5B5} = {E448F863-4C9D-47A4-BC4A-4A1381B54DA4}
|
||||
{9252AA73-9CF7-4B09-89CB-7FCB65A5DCFF} = {327FDEE7-C4C8-4AA4-A7B0-8BCE3D75346F}
|
||||
{42154590-445B-41CF-AAEB-AACD1B65FA2C} = {673FF8CD-9E85-4FA1-ABFC-D1149675E138}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {9313F2B4-10DA-43AA-A481-CAA7571C740C}
|
||||
|
||||
@@ -7,11 +7,11 @@
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>net.steampp.app</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.4.9</string>
|
||||
<string>2.4.10</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.4.9.0</string>
|
||||
<string>2.4.10.0</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.13</string>
|
||||
<string>10.14</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>zh_CN</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
|
||||
@@ -33,11 +33,11 @@ emit_plist() {
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>net.steampp.app</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.4.9</string>
|
||||
<string>2.4.10</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.4.9.0</string>
|
||||
<string>2.4.10.0</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.13</string>
|
||||
<string>10.14</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>zh_CN</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
|
||||
Submodule references/ArchiSteamFarm updated: 77d90b7f3d...ab4f2ce56a
Submodule
+1
Submodule references/FluentAvalonia added at 7c1b7b7ae0
Submodule references/Titanium-Web-Proxy updated: 6e47cb014e...5b8a891c6c
+1
-1
Submodule references/WinAuth updated: e9a7aa2a1d...79828455cb
+1
-1
Submodule references/sqlite-net updated: 5571777197...ff3b7624d2
+63
-61
@@ -1,54 +1,43 @@
|
||||
### 新增内容
|
||||
1. CLR 升级至 .NET 6 Preview 7
|
||||
2. 新增 库存游戏可浏览已安装的游戏文件夹
|
||||
3. 新增 创意工坊划词翻译脚本
|
||||
4. 新增 通用设置-使用硬件加速设置项,也可通过命令行参数禁用硬件加速启动 -clt devtools -disable_gpu
|
||||
5. 新增 账号切换内新增家庭库共享排序功能,该功能可调整当前设备的多个家庭共享账号库存的优先级顺序。
|
||||
6. 新增 QQ 快速登录渠道
|
||||
7. 新增 意大利语支持
|
||||
8. 新增 西班牙语支持
|
||||
9. 新增 通用设置内可支持访问程序的 AppData、Cache、Logs 文件夹和查看缓存及日志占用空间大小情况
|
||||
10. 新增 本地令牌可以查看令牌二维码导入到移动端
|
||||
11. Android/macOS/Linux 版现已开启 Beta/Alpha 测试,可从 GitHub/Gitee 上下载
|
||||
12. 现已通过 Desktop Bridge 转制为 UWP 上架 Microsoft Store
|
||||
1. Linux/macOS 版本中的 CLR 升级至 .NET 6 Preview 7
|
||||
2. Desktop 现已适配 WinUI 3 / Windows 11 / Fluent Design System 样式风格
|
||||
3. 新增 Android 上从图库选择二维码图片导入令牌
|
||||
4. 新增 Android 上文件导入选择二维码图片导入令牌
|
||||
5. 新增 Desktop 上现可刷新头像
|
||||
|
||||
### 修复问题
|
||||
1. 修复 开机自启动在 2.4.x 中不生效
|
||||
2. 改进 深色和浅色模式的视觉效果
|
||||
3. 改进 社区加速计时逻辑
|
||||
4. 更正 导出令牌窗口标题文本错误
|
||||
5. 改进 添加令牌弹窗可调整窗口大小
|
||||
6. 改进 本地令牌自定义修改名称操作
|
||||
7. 修复 我的面板中出现垂直滚动条
|
||||
8. 改进 解锁成就风险提示弹窗可以设置不再提示
|
||||
9. 修复 任务栏位于顶部时托盘菜单位置不正确
|
||||
10. 修复 挂时长运行中列表移除游戏时引发的闪退
|
||||
11. 改进 自动更新机制
|
||||
12. 改进 开机自启动现仅对当前用户生效
|
||||
13. 改进 第三方账号快速登录,现使用系统浏览器进行快速登录
|
||||
14. 改进 现已编译为 ReadyToRun (R2R) 格式,这将改进应用程序的启动时间和延迟(仅 Windows 版)
|
||||
15. 修复 库存游戏中部分游戏被错误屏蔽没有加载
|
||||
16. 改进 部分语言的翻译文本
|
||||
17. 改进 本地令牌上移下移功能顺序错乱问题
|
||||
18. 修复 程序在加载库存游戏时有概率闪退的问题
|
||||
19. 修复 打开托盘菜单有概率导致程序闪退的问题
|
||||
20. 修复 程序启动时界面不会加载任何内容无法正常使用的问题
|
||||
21. 改进 账号切换功能UI
|
||||
22. 改进 移除了CEF模块,缩减程序体积和运行时内存占用
|
||||
23. 改进 库存游戏支持显示已安装游戏占用空间大小
|
||||
24. 改进 库存游戏封面大小调节可支持滚动调节
|
||||
25. 改进 hosts 文件编码在 Windows 上使用系统的活动代码页(ANSICodePage),例如 GB2312/936,其他操作系统则使用 UTF-8,还原 V1 版本行为
|
||||
26. 改进 开始菜单磁贴背景由黑色更改为透明
|
||||
27. 修复 账号切换修改账号备注重启后被还原
|
||||
1. 修复 Desktop 上账号切换功能
|
||||
2. 改进 Desktop 上受保护的成就不在支持勾选
|
||||
3. 修复 Linux 上因字体引发的启动时闪退
|
||||
4. 修复 Android 上扫码导入功能
|
||||
5. 修复 Android 上 Toast 不能正常显示
|
||||
6. 改进 Android 上的令牌导入方式
|
||||
7. 修复 Android 上导入带密码的令牌时不显示密码输入框
|
||||
8. 修复 导入带密码的令牌时密码输入文本框窗口不能正确取消
|
||||
9. 修复 Desktop 上使用火狐浏览器无法进行快速登录
|
||||
10. 修复 Android 8.0 以下启动时闪退
|
||||
11. 修复 Desktop 上部分用户库存游戏已安装游戏无法读取
|
||||
12. 尝试修复 Windows 上托盘菜单有时无法打开窗口
|
||||
13. 改进 Android 上确认交易页面上的显示隐藏逻辑
|
||||
|
||||
### 已知问题
|
||||
- macOS
|
||||
- 尚未公证,这会影响 macOS Catalina(版本 10.15)以上
|
||||
- 自动更新不可用
|
||||
- Linux
|
||||
- 托盘不生效,这将影响程序不能正常退出
|
||||
- 窗口弹出位置不正确
|
||||
- 自动更新不可用
|
||||
- Desktop
|
||||
- macOS
|
||||
- 尚未公证,这会影响 macOS Catalina(版本 10.15)以上
|
||||
- 某些窗口顶部会有两个标题栏
|
||||
- 自动更新不可用
|
||||
- Linux
|
||||
- 托盘不生效,这将影响程序不能正常退出
|
||||
- 窗口弹出位置不正确
|
||||
- 某些窗口顶部会有两个标题栏
|
||||
- 自动更新不可用
|
||||
- Shared
|
||||
- 主题切换需重启软件后生效,且跟随系统暂不可用
|
||||
- Mobile
|
||||
- Android
|
||||
- 本地令牌倒计时存在误差不够精确,可能导致令牌值不一致
|
||||
- 确认交易列表刷新后数据显示不正确
|
||||
- 自动更新暂不可用
|
||||
|
||||
***
|
||||
|
||||
@@ -58,32 +47,45 @@
|
||||
| RuntimeIdentifier | Available | Edition |
|
||||
| ---- | ---- | ---- |
|
||||
| win-x64 | ✅ | Stable |
|
||||
| win-x64(DesktopBridge/msix) | ✅ | β |
|
||||
| osx-x64 | ✅ | β |
|
||||
| linux-x64 | ✅ | α |
|
||||
| android-arm64 | ✅ | α |
|
||||
| android-arm | ✅ | α |
|
||||
| win-arm64 | ❌ | |
|
||||
| osx-arm64 | ❌ | |
|
||||
| linux-arm64 | ❌ | |
|
||||
| linux-arm64 | ✅ | α |
|
||||
| linux-arm | ✅ | α |
|
||||
| osx-arm64 | ❌ | |
|
||||
| win-arm64 | ❌ | |
|
||||
| ios-arm64 | ❌ | |
|
||||
|
||||
<!--
|
||||
- macOS
|
||||
- 如果你使用 ARM 芯片的 Mac(较为**稀有**),例如 **M1**,则下载文件名中带有 **macos_arm64** 的文件
|
||||
- 如果你使用 Intel、AMD 芯片的 Mac(较为**普遍**),则下载文件名中带有 **macos_x64** 的文件
|
||||
-->
|
||||
|
||||
## 下载指南
|
||||
- Linux
|
||||
- 如果你使用 Intel、AMD 芯片的 PC(较为**普遍**)则下载文件名中带有 **linux_x64** 的文件
|
||||
- 如果你使用 ARM64 芯片的 PC(较为**稀有**)例如 **Raspberry Pi Model 3+**,则下载文件名中带有 **linux_arm64** 的文件
|
||||
- 如果你使用 ARM 芯片的 PC(较为**稀有**)例如 **Raspberry Pi Model 2+**,则下载文件名中带有 **linux_arm** 的文件
|
||||
- Android
|
||||
- 如果你使用 ARM64 芯片的设备(较为**普遍**)则下载文件名中带有 **android_arm64_v8a** 的文件
|
||||
- 如果你使用 ARM 芯片的设备(较为**稀有**)通常为 **14** 年下半年之前生产的设备,则下载文件名中带有 **android_armeabi_v7a** 的文件
|
||||
|
||||
| File | Checksum (SHA256) |
|
||||
| ---- | ---- |
|
||||
| Steam++_win_x64_v2.4.9.7z | SHA256 |
|
||||
| Steam++_win_x64_v2.4.9.exe | SHA256 |
|
||||
| Steam++_win_x64_v2.4.10.7z | 767FEC42DA14A632E92D517E96487F74184F55D6AFB7D95E57747E6AB3F4AC37 |
|
||||
| Steam++_win_x64_v2.4.10.exe | D598A9807F6325D2E07C1FF7CE4ADFC1605501E5115FC94014FEAF88FBCBEA1B |
|
||||
| | |
|
||||
| Steam++_win_arm64_v2.4.9.7z | SHA256 |
|
||||
| Steam++_win_arm64_v2.4.9.exe | SHA256 |
|
||||
| Steam++_linux_x64_v2.4.10.7z | 691ABC49640E244BF18240A5AE692DADB44E10129262793E3F19BA0D16F43FBE |
|
||||
| Steam++_linux_arm64_v2.4.10.7z | 71A0A924661091859529471D715E8F79B914BDDB79A3AEA397FE49382E54DEB2 |
|
||||
| Steam++_linux_arm_v2.4.10.7z | 4038B1A73EDA7FB27A759BB814C3A74A3C52F1BDBE777341727B26F0E123507F |
|
||||
| | |
|
||||
| Steam++_linux_x64_v2.4.9.7z | SHA256 |
|
||||
| Steam++_linux_x64_v2.4.9.deb | SHA256 |
|
||||
| Steam++_macos_x64_v2.4.10.app.zip | 660D729FDCEE55C36E27FFD9A65B930BB87BFCF7BA3EEA89FA25586FF4A1952B |
|
||||
| Steam++_macos_x64_v2.4.10.7z | 7B5CC77F45596FE83157E72A2F2EA4B125B0A9A350B106DDE893E1BC49B3EF79 |
|
||||
| | |
|
||||
| Steam++_macos_x64_v2.4.9.dmg | SHA256 |
|
||||
| Steam++_macos_arm64_v2.4.9.dmg | SHA256 |
|
||||
| | |
|
||||
| Steam++_android_arm64_v8a_v2.4.9.apk | SHA256 |
|
||||
| Steam++_android_armeabi_v7a_v2.4.9.apk | SHA256 |
|
||||
| Steam++_android_arm64_v8a_v2.4.10.apk | 432046DF7C9BBA5CCBD8AC476CE31C9A8022C3F46508F8A32E7D42081A29DDA3 |
|
||||
| Steam++_android_armeabi_v7a_v2.4.10.apk | 25584531B040E2B50EB0855D1E3242978E37EF554019241E6C4FDB25E7B8533D |
|
||||
|
||||
<!-- ***
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 50 KiB |
+3
-1
@@ -1,4 +1,4 @@
|
||||
using Android;
|
||||
using Android;
|
||||
using Android.OS;
|
||||
using XEPermissions = Xamarin.Essentials.Permissions;
|
||||
|
||||
@@ -6,6 +6,8 @@ namespace System.Application.Services.Implementation.Permissions
|
||||
{
|
||||
internal sealed class GetPhoneNumberPermission : XEPermissions.BasePlatformPermission, IPermissions.IGetPhoneNumber
|
||||
{
|
||||
XEPermissions.BasePermission IPermissions.IPermission.Permission => this;
|
||||
|
||||
public const string Description = "自动填充输入框中的手机号码";
|
||||
|
||||
public override (string androidPermission, bool isRuntime)[] RequiredPermissions
|
||||
|
||||
+25
-10
@@ -1,20 +1,25 @@
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.OS;
|
||||
using AndroidX.Core.App;
|
||||
using System.Collections.Generic;
|
||||
using System.Common;
|
||||
using AndroidApplication = Android.App.Application;
|
||||
using JClass = Java.Lang.Class;
|
||||
using CC = System.Common.Constants;
|
||||
using JClass = Java.Lang.Class;
|
||||
|
||||
namespace System.Application.Services.Implementation
|
||||
{
|
||||
/// <inheritdoc cref="INotificationService{TNotificationType, TEntrance}"/>
|
||||
public abstract class PlatformNotificationServiceImpl<TNotificationType, TNotificationChannelType, TEntrance> : INotificationService<TNotificationType, TEntrance>
|
||||
public abstract class PlatformNotificationServiceImpl<TNotificationType, TNotificationChannelType, TEntrance, TNotificationService> : INotificationService<TNotificationType, TEntrance, TNotificationService>
|
||||
where TNotificationType : notnull, Enum
|
||||
where TNotificationChannelType : notnull, Enum
|
||||
where TEntrance : notnull, Enum
|
||||
where TNotificationService : INotificationService<TNotificationType, TEntrance, TNotificationService>
|
||||
{
|
||||
public static bool IsSupportedNotificationChannel
|
||||
=> Build.VERSION.SdkInt >= BuildVersionCodes.O;
|
||||
|
||||
protected virtual Type? GetActivityType(TEntrance entrance) => null;
|
||||
|
||||
protected virtual int GetNotifyId(TNotificationType notificationType)
|
||||
@@ -43,11 +48,7 @@ namespace System.Application.Services.Implementation
|
||||
manager.CancelAll();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化通知渠道
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
public void InitNotificationChannels(Context context)
|
||||
void InitNotificationChannelsCore(Context context)
|
||||
{
|
||||
var manager = NotificationManagerCompat.From(context);
|
||||
var items = Enum.GetValues(typeof(TNotificationChannelType));
|
||||
@@ -57,6 +58,19 @@ namespace System.Application.Services.Implementation
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 初始化通知渠道
|
||||
/// </summary>
|
||||
/// <param name="context"></param>
|
||||
public static void InitNotificationChannels(Context context)
|
||||
{
|
||||
if (IsSupportedNotificationChannel &&
|
||||
INotificationService<TNotificationType, TEntrance, TNotificationService>.Instance is PlatformNotificationServiceImpl<TNotificationType, TNotificationChannelType, TEntrance, TNotificationService> notification)
|
||||
{
|
||||
notification.InitNotificationChannelsCore(context);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取渠道的ID
|
||||
/// <para>参考:https://developer.android.google.cn/reference/android/app/NotificationChannel?hl=en#public-constructors </para>
|
||||
@@ -95,9 +109,10 @@ namespace System.Application.Services.Implementation
|
||||
/// <param name="manager"></param>
|
||||
/// <param name="notificationChannelType"></param>
|
||||
/// <returns></returns>
|
||||
protected NotificationChannel CreateNotificationChannel(NotificationManagerCompat manager,
|
||||
protected NotificationChannel? CreateNotificationChannel(NotificationManagerCompat manager,
|
||||
TNotificationChannelType notificationChannelType)
|
||||
{
|
||||
if (Build.VERSION.SdkInt < BuildVersionCodes.O) return null;
|
||||
var channelId = GetChannelId(notificationChannelType);
|
||||
var name = GetName(notificationChannelType);
|
||||
var description = GetDescription(notificationChannelType);
|
||||
@@ -170,8 +185,8 @@ namespace System.Application.Services.Implementation
|
||||
IReadOnlyCollection<NotificationCompat.Action>? actions = null)
|
||||
{
|
||||
var channelType = GetChannel(notificationType);
|
||||
var channel = CreateNotificationChannel(manager, channelType);
|
||||
var builder = new NotificationCompat.Builder(context, channel.Id);
|
||||
var channelId = GetChannelId(channelType);
|
||||
var builder = new NotificationCompat.Builder(context, channelId);
|
||||
var level = GetImportanceLevel(channelType);
|
||||
builder.SetPriority(GetNotificationPriority(level));
|
||||
var status_bar_icon = R.drawable.ic_stat_notify_msg;
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
using Android.Content;
|
||||
using Android.Content;
|
||||
using Android.Telephony;
|
||||
using XEPlatform = Xamarin.Essentials.Platform;
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace System.Application.Services.Implementation
|
||||
/// <inheritdoc cref="ITelephonyService"/>
|
||||
internal sealed class PlatformTelephonyServiceImpl : TelephonyServiceImpl
|
||||
{
|
||||
public PlatformTelephonyServiceImpl(IPermissions pf, IPermissions.IGetPhoneNumber p1) : base(pf, p1)
|
||||
public PlatformTelephonyServiceImpl(IPermissions p) : base(p)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
+31
-13
@@ -16,26 +16,39 @@ namespace System.Application.Services.Implementation
|
||||
{
|
||||
}
|
||||
|
||||
static AndroidToast? toast;
|
||||
//static AndroidToast? toast;
|
||||
//static DateTime hideTime;
|
||||
|
||||
//static int GetHideTimeByDuration(int duration, AndroidToastLength duration2)
|
||||
//{
|
||||
// if (duration2 == AndroidToastLength.Long)
|
||||
// {
|
||||
// return (int)ToastLength.Long;
|
||||
// }
|
||||
// else if (duration2 == AndroidToastLength.Short)
|
||||
// {
|
||||
// return (int)ToastLength.Short;
|
||||
// }
|
||||
// return duration;
|
||||
//}
|
||||
|
||||
protected override void PlatformShow(string text, int duration)
|
||||
{
|
||||
var context = XEPlatform.CurrentActivity;
|
||||
var context = XEPlatform.CurrentActivity?.ApplicationContext ?? XEPlatform.AppContext;
|
||||
var duration2 = (AndroidToastLength)duration;
|
||||
|
||||
// https://blog.csdn.net/android157/article/details/80267737
|
||||
try
|
||||
{
|
||||
if (toast == null)
|
||||
{
|
||||
toast = AndroidToast.MakeText(context, text, duration2);
|
||||
if (toast == null) throw new NullReferenceException("toast markeText Fail");
|
||||
}
|
||||
else
|
||||
{
|
||||
toast.Duration = duration2;
|
||||
}
|
||||
SetTextAndShow(toast, text);
|
||||
//if (toast == null)
|
||||
//{
|
||||
var toast = AndroidToast.MakeText(context, text, duration2);
|
||||
//if (toast == null) throw new NullReferenceException("toast markeText Fail");
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// toast.Duration = duration2;
|
||||
//}
|
||||
SetTextAndShow(toast!, text);
|
||||
}
|
||||
catch (JException e)
|
||||
{
|
||||
@@ -52,7 +65,12 @@ namespace System.Application.Services.Implementation
|
||||
{
|
||||
// 某些定制ROM会更改内容文字,例如MIUI,重新设置可强行指定文本
|
||||
t.SetText(text);
|
||||
//var now = DateTime.Now;
|
||||
//if (hideTime == default || hideTime <= now) // 同一时间内多次调用 Show 将会导致无法显示
|
||||
//{
|
||||
// hideTime = now.AddMilliseconds(GetHideTimeByDuration(duration, duration2));
|
||||
t.Show();
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace Microsoft.Extensions.DependencyInjection
|
||||
/// <returns></returns>
|
||||
public static IServiceCollection AddPlatformPermissions(this IServiceCollection services)
|
||||
{
|
||||
services.AddSingleton<IPermissions.IGetPhoneNumber, GetPhoneNumberPermission>();
|
||||
services.AddTransient<IPermissions.IGetPhoneNumber, GetPhoneNumberPermission>();
|
||||
return services;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -233,7 +233,7 @@ namespace System.Application
|
||||
|
||||
protected override IEnumerable<string> GetPlatformFileType(DevicePlatform _)
|
||||
{
|
||||
if (fileTypes.TryGetValue(DI.Platform, out var type))
|
||||
if (fileTypes.TryGetValue(DeviceInfo2.Platform, out var type))
|
||||
return type;
|
||||
|
||||
throw new PlatformNotSupportedException("This platform does not support this file type.");
|
||||
@@ -258,13 +258,14 @@ namespace System.Application
|
||||
{
|
||||
return FilePickerFileType.Images;
|
||||
}
|
||||
else if (OperatingSystem2.IsWindows)
|
||||
{
|
||||
GeneralFilePickerFileType fileTypes = new[] { FileEx.PNG, FileEx.JPG, FileEx.JPEG, FileEx.GIF, FileEx.BMP };
|
||||
return fileTypes;
|
||||
}
|
||||
else
|
||||
{
|
||||
GeneralFilePickerFileType fileTypes = DI.Platform switch
|
||||
{
|
||||
Platform.Windows => new[] { FileEx.PNG, FileEx.JPG, FileEx.JPEG, FileEx.GIF, FileEx.BMP },
|
||||
_ => new[] { FileEx.PNG, FileEx.JPG, FileEx.JPEG, FileEx.GIF },
|
||||
};
|
||||
GeneralFilePickerFileType fileTypes = new[] { FileEx.PNG, FileEx.JPG, FileEx.JPEG, FileEx.GIF };
|
||||
return fileTypes;
|
||||
}
|
||||
});
|
||||
|
||||
@@ -5,10 +5,13 @@ namespace System.Application.Services
|
||||
/// </summary>
|
||||
/// <typeparam name="TNotificationType"></typeparam>
|
||||
/// <typeparam name="TEntrance"></typeparam>
|
||||
public interface INotificationService<TNotificationType, TEntrance>
|
||||
public interface INotificationService<TNotificationType, TEntrance, TNotificationService>
|
||||
where TNotificationType : notnull, Enum
|
||||
where TEntrance : notnull, Enum
|
||||
where TNotificationService : INotificationService<TNotificationType, TEntrance, TNotificationService>
|
||||
{
|
||||
static TNotificationService Instance => DI.Get<TNotificationService>();
|
||||
|
||||
/// <summary>
|
||||
/// 获取是否有通知权限
|
||||
/// </summary>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Essentials;
|
||||
using static Xamarin.Essentials.Permissions;
|
||||
|
||||
namespace System.Application.Services
|
||||
{
|
||||
@@ -8,29 +9,35 @@ namespace System.Application.Services
|
||||
/// </summary>
|
||||
public interface IPermissions
|
||||
{
|
||||
/// <inheritdoc cref="Permissions.BasePlatformPermission"/>
|
||||
public interface IPermission
|
||||
static IPermissions Instance => DI.Get<IPermissions>();
|
||||
|
||||
interface IPermission
|
||||
{
|
||||
/// <inheritdoc cref="Permissions.BasePlatformPermission.CheckStatusAsync"/>
|
||||
Task<PermissionStatus> CheckStatusAsync();
|
||||
BasePermission Permission { get; }
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="Permissions.BasePlatformPermission.RequestAsync"/>
|
||||
Task<PermissionStatus> RequestAsync();
|
||||
|
||||
/// <inheritdoc cref="Permissions.BasePlatformPermission.ShouldShowRationale"/>
|
||||
bool ShouldShowRationale();
|
||||
interface IPermission<TPermission> : IPermission where TPermission : IPermission<TPermission>
|
||||
{
|
||||
static TPermission Instance => DI.Get<TPermission>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取手机号码所需权限
|
||||
/// </summary>
|
||||
public interface IGetPhoneNumber : IPermission { }
|
||||
interface IGetPhoneNumber : IPermission<IGetPhoneNumber> { }
|
||||
|
||||
/// <summary>
|
||||
/// 检查并申请一组权限
|
||||
/// </summary>
|
||||
/// <param name="permission"></param>
|
||||
/// <returns></returns>
|
||||
Task<PermissionStatus> CheckAndRequestAsync(IPermission permission);
|
||||
Task<PermissionStatus> CheckAndRequestAsync(BasePermission permission);
|
||||
|
||||
/// <inheritdoc cref="CheckAndRequestAsync(BasePermission)"/>
|
||||
Task<PermissionStatus> CheckAndRequestAsync(IPermission permission)
|
||||
=> CheckAndRequestAsync(permission.Permission);
|
||||
|
||||
/// <inheritdoc cref="CheckAndRequestAsync(BasePermission)"/>
|
||||
Task<PermissionStatus> CheckAndRequestAsync<TPermission>() where TPermission : BasePermission, new() => CheckAndRequestAsync(new TPermission());
|
||||
}
|
||||
}
|
||||
+15
-11
@@ -23,24 +23,28 @@ namespace System.Application.Services.Implementation
|
||||
{
|
||||
this.protectedData = protectedData;
|
||||
this.dataProtectionProvider = dataProtectionProvider;
|
||||
defaultELocalDataProtectionType = DI.Platform switch
|
||||
if (OperatingSystem2.IsWindows)
|
||||
{
|
||||
Platform.Windows => DI.IsWindows10OrLater
|
||||
? LocalDataProtectionType.Win10WithAesCFB
|
||||
: LocalDataProtectionType.ProtectedDataWithAesCFB,
|
||||
_ => LocalDataProtectionType.AesCFB,
|
||||
};
|
||||
if (OperatingSystem2.IsWindows10AtLeast)
|
||||
{
|
||||
defaultELocalDataProtectionType = LocalDataProtectionType.Win10WithAesCFB;
|
||||
}
|
||||
else
|
||||
{
|
||||
defaultELocalDataProtectionType = LocalDataProtectionType.ProtectedDataWithAesCFB;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
defaultELocalDataProtectionType = LocalDataProtectionType.AesCFB;
|
||||
}
|
||||
_aes = new Lazy<Aes>(() =>
|
||||
{
|
||||
(var key, var iv) = MachineSecretKey;
|
||||
// https://github.com/dotnet/runtime/issues/42214#issuecomment-698495584
|
||||
// AES CFB in Windows 7 catch Internal.Cryptography.CryptoThrowHelper+WindowsCryptographicException: Unknown error (0xc10000bb)
|
||||
// AES CFB in Android catch CryptographicException: Bad PKCS7 padding. Invalid length
|
||||
var mode = DI.Platform switch
|
||||
{
|
||||
Platform.Android => CipherMode.CBC,
|
||||
_ => CipherMode.CFB,
|
||||
};
|
||||
var mode = OperatingSystem2.IsAndroid ? CipherMode.CBC : CipherMode.CFB;
|
||||
var r = AESUtils.Create(key, iv, mode, PaddingMode.PKCS7);
|
||||
return r;
|
||||
});
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading.Tasks;
|
||||
using Xamarin.Essentials;
|
||||
using static Xamarin.Essentials.Permissions;
|
||||
|
||||
namespace System.Application.Services.Implementation
|
||||
{
|
||||
@@ -10,7 +11,7 @@ namespace System.Application.Services.Implementation
|
||||
/// 权限被拒绝,可提示用户在“设置”中启用,通常应有不再提示的选项
|
||||
/// </summary>
|
||||
/// <param name="permission"></param>
|
||||
protected virtual void PromptUserGoToSettings(IPermissions.IPermission permission)
|
||||
protected virtual void PromptUserGoToSettings(BasePermission permission)
|
||||
{
|
||||
// 可由平台重写此函数实现,通常为显示一个UI上的弹窗,上有复选框不再显示
|
||||
}
|
||||
@@ -19,12 +20,12 @@ namespace System.Application.Services.Implementation
|
||||
/// 提示用户需要权限的其他信息
|
||||
/// </summary>
|
||||
/// <param name="permission"></param>
|
||||
protected virtual void ShowRationale(IPermissions.IPermission permission)
|
||||
protected virtual void ShowRationale(BasePermission permission)
|
||||
{
|
||||
// 可由平台重写此函数实现,通常为显示一个吐司消息,因调用此函数后会立即开始重新申请权限
|
||||
}
|
||||
|
||||
public async Task<PermissionStatus> CheckAndRequestAsync(IPermissions.IPermission permission)
|
||||
public async Task<PermissionStatus> CheckAndRequestAsync(BasePermission permission)
|
||||
{
|
||||
// https://docs.microsoft.com/zh-cn/xamarin/essentials/permissions?context=xamarin%2Fandroid&tabs=android#general-usage
|
||||
var status = await permission.CheckStatusAsync();
|
||||
|
||||
@@ -1,17 +1,15 @@
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace System.Application.Services.Implementation
|
||||
{
|
||||
/// <inheritdoc cref="ITelephonyService"/>
|
||||
public abstract class TelephonyServiceImpl : ITelephonyService
|
||||
{
|
||||
readonly IPermissions pf;
|
||||
readonly IPermissions.IGetPhoneNumber p1;
|
||||
readonly IPermissions p;
|
||||
|
||||
public TelephonyServiceImpl(IPermissions pf, IPermissions.IGetPhoneNumber p1)
|
||||
public TelephonyServiceImpl(IPermissions p)
|
||||
{
|
||||
this.pf = pf;
|
||||
this.p1 = p1;
|
||||
this.p = p;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -26,7 +24,7 @@ namespace System.Application.Services.Implementation
|
||||
/// <returns></returns>
|
||||
protected virtual async Task<string?> PlatformGetPhoneNumberAsync()
|
||||
{
|
||||
var status = await pf.CheckAndRequestAsync(p1);
|
||||
var status = await p.CheckAndRequestAsync(IPermissions.IGetPhoneNumber.Instance);
|
||||
if (status.IsOk())
|
||||
{
|
||||
return PlatformGetPhoneNumber();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using Xamarin.Essentials;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace System.Application.Services.Implementation
|
||||
/// <param name="len"></param>
|
||||
/// <returns></returns>
|
||||
protected virtual int CalcDurationByStringLength(int len)
|
||||
=> len > 9 ? ToDuration(ToastLength.Long) : ToDuration(ToastLength.Short);
|
||||
=> len > 7 ? ToDuration(ToastLength.Long) : ToDuration(ToastLength.Short);
|
||||
|
||||
protected virtual bool IsMainThread
|
||||
=> MainThread.IsMainThread;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ReactiveUI" Version="14.3.10" />
|
||||
<PackageReference Include="ReactiveUI" Version="15.1.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using System;
|
||||
using System.Application.Services;
|
||||
using System.Application.Services.Implementation;
|
||||
using System.Security;
|
||||
using Xamarin.Essentials;
|
||||
using static System.Application.Services.ILocalDataProtectionProvider;
|
||||
using static System.Application.Services.Implementation.LocalDataProtectionProviderBase;
|
||||
using MSEXOptions = Microsoft.Extensions.Options.Options;
|
||||
@@ -32,7 +32,7 @@ namespace Microsoft.Extensions.DependencyInjection
|
||||
/// <returns></returns>
|
||||
public static IServiceCollection TryAddStorage(this IServiceCollection services)
|
||||
{
|
||||
if (DI.DeviceIdiom == DeviceIdiom.Desktop)
|
||||
if (DeviceInfo.Platform == DevicePlatform.Unknown)
|
||||
{
|
||||
services.TryAddSingleton<IStorage, DesktopClientStorage>();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
using Xamarin.Essentials;
|
||||
using XEDeviceIdiom = Xamarin.Essentials.DeviceIdiom;
|
||||
|
||||
namespace System.Application
|
||||
{
|
||||
public static class DeviceInfo2
|
||||
{
|
||||
public static Platform Platform
|
||||
{
|
||||
get
|
||||
{
|
||||
if (OperatingSystem2.IsWindows)
|
||||
{
|
||||
if (DeviceInfo.Platform == DevicePlatform.UWP)
|
||||
{
|
||||
return Platform.UWP;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Platform.Windows;
|
||||
}
|
||||
}
|
||||
else if (OperatingSystem2.IsAndroid)
|
||||
{
|
||||
return Platform.Android;
|
||||
}
|
||||
else if (
|
||||
OperatingSystem2.IsIOS ||
|
||||
OperatingSystem2.IsMacOS ||
|
||||
OperatingSystem2.IsTvOS ||
|
||||
OperatingSystem2.IsWatchOS)
|
||||
{
|
||||
return Platform.Apple;
|
||||
}
|
||||
else if (OperatingSystem2.IsLinux)
|
||||
{
|
||||
return Platform.Linux;
|
||||
}
|
||||
return Platform.Unknown;
|
||||
}
|
||||
}
|
||||
|
||||
public static DeviceIdiom Idiom
|
||||
{
|
||||
get
|
||||
{
|
||||
if (OperatingSystem2.IsDesktop)
|
||||
{
|
||||
return DeviceIdiom.Desktop;
|
||||
}
|
||||
else
|
||||
{
|
||||
return DeviceInfo.Idiom.Convert();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static string? OSName
|
||||
{
|
||||
get
|
||||
{
|
||||
if (OperatingSystem2.IsWindows)
|
||||
{
|
||||
if (DesktopBridge.IsRunningAsUwp)
|
||||
{
|
||||
return "Windows Desktop Bridge";
|
||||
}
|
||||
else if (DeviceInfo.Platform == DevicePlatform.UWP)
|
||||
{
|
||||
return "UWP";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "Windows";
|
||||
}
|
||||
}
|
||||
else if (OperatingSystem2.IsAndroid)
|
||||
{
|
||||
return "Android";
|
||||
}
|
||||
else if (OperatingSystem2.IsIOS)
|
||||
{
|
||||
if (DeviceInfo.Idiom == XEDeviceIdiom.Tablet)
|
||||
return "iPadOS";
|
||||
return "iOS";
|
||||
}
|
||||
else if (OperatingSystem2.IsMacOS)
|
||||
{
|
||||
return "macOS";
|
||||
}
|
||||
else if (OperatingSystem2.IsTvOS)
|
||||
{
|
||||
return "tvOS";
|
||||
}
|
||||
else if (OperatingSystem2.IsWatchOS)
|
||||
{
|
||||
return "watchOS";
|
||||
}
|
||||
else if (OperatingSystem2.IsLinux)
|
||||
{
|
||||
return "Linux";
|
||||
}
|
||||
return default;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@
|
||||
<PackageReference Include="Microsoft.Extensions.Http" Version="5.0.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0" />
|
||||
<PackageReference Include="Nito.Comparers" Version="6.2.0" />
|
||||
<PackageReference Include="OperatingSystem2" Version="1.1.0" />
|
||||
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
|
||||
<PackageReference Include="Crc32.NET" Version="1.2.0" />
|
||||
<PackageReference Include="gfoidl.Base64" Version="1.1.1" />
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#if !NOT_DI
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
#endif
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
#if !NOT_XE
|
||||
using Xamarin.Essentials;
|
||||
@@ -42,121 +41,6 @@ namespace System
|
||||
|
||||
#endif
|
||||
|
||||
/// <inheritdoc cref="System.Platform"/>
|
||||
public static Platform Platform { get; }
|
||||
|
||||
/// <inheritdoc cref="System.DeviceIdiom"/>
|
||||
public static DeviceIdiom DeviceIdiom { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前是否使用Mono运行时
|
||||
/// </summary>
|
||||
public static bool IsRunningOnMono { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前进程运行的构架为 <see cref="Architecture.X86"/> 或 <see cref="Architecture.X64"/>
|
||||
/// </summary>
|
||||
public static bool IsX86OrX64 { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前进程运行的构架为 <see cref="Architecture.Arm64"/>
|
||||
/// </summary>
|
||||
public static bool IsArm64 { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前是否运行在 macOS 上
|
||||
/// </summary>
|
||||
public static bool IsmacOS { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前是否运行在 iOS/iPadOS/watchOS 上
|
||||
/// </summary>
|
||||
public static bool IsiOSOriPadOSOrwatchOS { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前是否运行在 >= Windows 10 上
|
||||
/// </summary>
|
||||
public static bool IsWindows10OrLater { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前是否运行在 Windows 7 上
|
||||
/// </summary>
|
||||
public static bool IsWindows7 { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前是否运行在 Windows 上
|
||||
/// </summary>
|
||||
public static bool IsWindowsOrUWP { get; }
|
||||
|
||||
static bool? _IsDesktopBridge;
|
||||
public static bool IsDesktopBridge
|
||||
{
|
||||
get => _IsDesktopBridge ?? false;
|
||||
set
|
||||
{
|
||||
if (_IsDesktopBridge.HasValue) throw new NotSupportedException();
|
||||
_IsDesktopBridge = value;
|
||||
}
|
||||
}
|
||||
|
||||
const string DesktopWindowTypeNames =
|
||||
"Avalonia.Controls.Window, Avalonia.Controls" +
|
||||
"\n" +
|
||||
"System.Windows.Forms.Form, System.Windows.Forms" +
|
||||
"\n" +
|
||||
"System.Windows.Window, PresentationFramework";
|
||||
|
||||
static DI()
|
||||
{
|
||||
IsRunningOnMono = Type.GetType("Mono.Runtime") != null;
|
||||
var processArchitecture = RuntimeInformation.ProcessArchitecture;
|
||||
IsX86OrX64 = processArchitecture is Architecture.X64 or Architecture.X86;
|
||||
IsArm64 = processArchitecture == Architecture.Arm64;
|
||||
static Platform RuntimeInformationOSPlatform()
|
||||
{
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
return Platform.Windows;
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
|
||||
return Platform.Apple;
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
|
||||
return Platform.Linux;
|
||||
return Platform.Unknown;
|
||||
}
|
||||
static DeviceIdiom GetDeviceIdiom()
|
||||
{
|
||||
if (DesktopWindowTypeNames.Split('\n')
|
||||
.Any(x => Type.GetType(x) != null))
|
||||
return DeviceIdiom.Desktop;
|
||||
return DeviceIdiom.Unknown;
|
||||
}
|
||||
#if !NOT_XE
|
||||
Platform = DeviceInfo.Platform.Convert();
|
||||
if (Platform == Platform.Unknown) Platform = RuntimeInformationOSPlatform();
|
||||
DeviceIdiom = DeviceInfo.Idiom.Convert();
|
||||
if (DeviceIdiom == DeviceIdiom.Unknown) DeviceIdiom = GetDeviceIdiom();
|
||||
#else
|
||||
Platform = RuntimeInformationOSPlatform();
|
||||
DeviceIdiom = GetDeviceIdiom();
|
||||
#endif
|
||||
if (Platform == Platform.Apple)
|
||||
{
|
||||
IsmacOS = DeviceIdiom == DeviceIdiom.Desktop;
|
||||
IsiOSOriPadOSOrwatchOS = !IsmacOS;
|
||||
}
|
||||
else if (Platform == Platform.Windows)
|
||||
{
|
||||
var osVer = Environment.OSVersion.Version;
|
||||
IsWindows10OrLater = osVer.Major >= 10;
|
||||
IsWindows7 = !IsWindows10OrLater && osVer.Major == 6 && osVer.Minor == 1;
|
||||
IsWindowsOrUWP = true;
|
||||
}
|
||||
else if (Platform == Platform.UWP)
|
||||
{
|
||||
IsWindows10OrLater = true;
|
||||
IsWindowsOrUWP = true;
|
||||
}
|
||||
}
|
||||
|
||||
#if !NOT_DI
|
||||
|
||||
static Exception GetDIGetFailException(Type serviceType) => new($"DI.Get* fail, serviceType: {serviceType}");
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
namespace System
|
||||
{
|
||||
public abstract class DesktopBridge
|
||||
{
|
||||
protected DesktopBridge() => throw new NotSupportedException();
|
||||
|
||||
/// <summary>
|
||||
/// 指示当前应用程序是否正在通过 Desktop Bridge 运行在 UWP 上。
|
||||
/// </summary>
|
||||
public static bool IsRunningAsUwp { get; protected set; }
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using System.Linq;
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace System
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if (DI.Platform == Platform.Android)
|
||||
if (OperatingSystem2.IsAndroid)
|
||||
{
|
||||
if (e.Message == "Canceled" && e.GetType().FullName == "Java.IO.IOException")
|
||||
{
|
||||
|
||||
@@ -121,20 +121,7 @@ namespace System
|
||||
#if NET35 || NOT_XE
|
||||
throw new PlatformNotSupportedException();
|
||||
#else
|
||||
try
|
||||
{
|
||||
return FileSystem.AppDataDirectory;
|
||||
}
|
||||
catch
|
||||
{
|
||||
if (DI.DeviceIdiom == DeviceIdiom.Desktop)
|
||||
{
|
||||
var r = Path.Combine(BaseDirectory, DirName_AppData);
|
||||
DirCreateByNotExists(r);
|
||||
return r;
|
||||
}
|
||||
throw;
|
||||
}
|
||||
return FileSystem.AppDataDirectory;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -149,20 +136,7 @@ namespace System
|
||||
#if NET35 || NOT_XE
|
||||
throw new PlatformNotSupportedException();
|
||||
#else
|
||||
try
|
||||
{
|
||||
return FileSystem.CacheDirectory;
|
||||
}
|
||||
catch
|
||||
{
|
||||
if (DI.DeviceIdiom == DeviceIdiom.Desktop)
|
||||
{
|
||||
var r = Path.Combine(BaseDirectory, DirName_Cache);
|
||||
DirCreateByNotExists(r);
|
||||
return r;
|
||||
}
|
||||
throw;
|
||||
}
|
||||
return FileSystem.CacheDirectory;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -189,7 +163,7 @@ namespace System
|
||||
static readonly Lazy<string> _BaseDirectory = new(() =>
|
||||
{
|
||||
var value = AppContext.BaseDirectory;
|
||||
if (DI.Platform == Platform.Windows && !DI.IsDesktopBridge) // 启用将发布 Host 入口点重定向到 Bin 目录中时重定向基目录
|
||||
if (OperatingSystem2.IsWindows && !DesktopBridge.IsRunningAsUwp) // 启用将发布 Host 入口点重定向到 Bin 目录中时重定向基目录
|
||||
{
|
||||
var value2 = new DirectoryInfo(value);
|
||||
if (value2.Parent != null && string.Equals(value2.Name, DirName_Bin, StringComparison.OrdinalIgnoreCase))
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace System.Net.Http
|
||||
{
|
||||
get
|
||||
{
|
||||
if (DI.Platform == Platform.Android || DI.IsiOSOriPadOSOrwatchOS)
|
||||
if (DeviceInfo.Platform != DevicePlatform.Unknown)
|
||||
{
|
||||
var networkAccess = Connectivity.NetworkAccess;
|
||||
return networkAccess == NetworkAccess.Internet;
|
||||
|
||||
@@ -1,166 +0,0 @@
|
||||
using System.Net.Sockets;
|
||||
using System.Text.Json;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace System.Net.WebSocket
|
||||
{
|
||||
public sealed class ClientConnection : IDisposable
|
||||
{
|
||||
private static int entities = 0;
|
||||
|
||||
private readonly TcpClient tcp;
|
||||
private readonly NetworkStream stream;
|
||||
|
||||
internal Func<ConnectedEventArgs, Task>? OnConnected;
|
||||
internal Func<ReceivedEventArgs, Task>? OnReceived;
|
||||
internal Func<DisconnectedEventArgs, Task>? OnDisconnected;
|
||||
|
||||
/// <summary>
|
||||
/// 连接ID
|
||||
/// </summary>
|
||||
public int Id { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public SocketState State { get; private set; } = SocketState.Connecting;
|
||||
|
||||
public EndPoint Local { get; }
|
||||
|
||||
public EndPoint Remote { get; }
|
||||
|
||||
internal ClientConnection(TcpClient tcp)
|
||||
{
|
||||
this.tcp = tcp;
|
||||
stream = this.tcp.GetStream();
|
||||
|
||||
Local = this.tcp.Client.LocalEndPoint;
|
||||
Remote = this.tcp.Client.RemoteEndPoint;
|
||||
|
||||
Id = ++entities;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 启动连接且尝试握手
|
||||
/// </summary>
|
||||
/// <returns>Task</returns>
|
||||
internal async Task StartAsync()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!await Utility.TryHandshakeAsync(tcp))
|
||||
{
|
||||
State = SocketState.Closing;
|
||||
throw new SocketException(10053);
|
||||
}
|
||||
|
||||
State = SocketState.Open;
|
||||
if (OnConnected != null)
|
||||
await OnConnected!.Invoke(new ConnectedEventArgs(this));
|
||||
await ReadAsync();
|
||||
}
|
||||
catch (SocketException e)
|
||||
{
|
||||
await CloseAsync(e);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭客户端连接
|
||||
/// </summary>
|
||||
/// <param name="reason">关闭连接的原因</param>
|
||||
/// <returns>Task</returns>
|
||||
public async Task CloseAsync(string reason = null)
|
||||
{
|
||||
State = SocketState.Closing;
|
||||
await SendPayload(Utility.BuildCloseFrame());
|
||||
State = SocketState.Closed;
|
||||
if (OnDisconnected != null)
|
||||
await OnDisconnected!.Invoke(new DisconnectedEventArgs(this, reason));
|
||||
Dispose();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭带有异常的客户端连接
|
||||
/// </summary>
|
||||
/// <param name="e">异常</param>
|
||||
/// <returns>Task</returns>
|
||||
internal async Task CloseAsync(Exception e)
|
||||
{
|
||||
State = SocketState.Closing;
|
||||
await SendPayload(Utility.BuildCloseFrame());
|
||||
State = SocketState.Closed;
|
||||
if (OnDisconnected != null)
|
||||
await OnDisconnected!.Invoke(new DisconnectedEventArgs(this, e.ToString()));
|
||||
}
|
||||
|
||||
private async Task ReadAsync()
|
||||
{
|
||||
while (State != (SocketState.Closed | SocketState.Closing))
|
||||
{
|
||||
if (!stream.DataAvailable)
|
||||
continue;
|
||||
|
||||
byte[] bytes = new byte[tcp.Available];
|
||||
await stream.ReadAsync(bytes.AsMemory(0, bytes.Length));
|
||||
if (bytes.Length <= 0)
|
||||
continue;
|
||||
|
||||
if (!Utility.TryDecodeMessage(bytes, out string message))
|
||||
{
|
||||
if (message == "Connection closed")
|
||||
await CloseAsync(message);
|
||||
return;
|
||||
}
|
||||
|
||||
if (OnReceived != null)
|
||||
await OnReceived!.Invoke(new ReceivedEventArgs(this, message));
|
||||
}
|
||||
}
|
||||
|
||||
public async Task WriteAsync(object data)
|
||||
{
|
||||
try
|
||||
{
|
||||
string json = JsonSerializer.Serialize(data);
|
||||
byte[] bytes = Utility.EncodeMessage(json);
|
||||
await stream.WriteAsync(bytes.AsMemory(0, bytes.Length));
|
||||
await stream.FlushAsync();
|
||||
}
|
||||
catch (Exception e) { Log.Error("SendMsgError", e, "发送消息失败"); throw; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Writes a string to the socket stream
|
||||
/// </summary>
|
||||
/// <param name="text">The string to write</param>
|
||||
/// <returns>Task</returns>
|
||||
public async Task WriteAsync(string text)
|
||||
{
|
||||
try
|
||||
{
|
||||
byte[] bytes = Utility.EncodeMessage(text);
|
||||
await stream.WriteAsync(bytes.AsMemory(0, bytes.Length));
|
||||
await stream.FlushAsync();
|
||||
}
|
||||
catch { throw; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sends a payload to the client
|
||||
/// </summary>
|
||||
/// <param name="bytes">The payload</param>
|
||||
/// <returns>Task</returns>
|
||||
internal async Task SendPayload(byte[] bytes)
|
||||
{
|
||||
await stream.WriteAsync(bytes.AsMemory(0, bytes.Length));
|
||||
await stream.FlushAsync();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
tcp.Close();
|
||||
tcp.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
namespace System.Net.WebSocket
|
||||
{
|
||||
public class ConnectedEventArgs
|
||||
{
|
||||
public ClientConnection Client { get; }
|
||||
|
||||
internal ConnectedEventArgs(ClientConnection client)
|
||||
{
|
||||
Client = client;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
namespace System.Net.WebSocket
|
||||
{
|
||||
/// <summary>
|
||||
/// 离线消息
|
||||
/// </summary>
|
||||
public readonly struct DisconnectedEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// 客户端连接
|
||||
/// </summary>
|
||||
public ClientConnection Client { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 断开原因
|
||||
/// </summary>
|
||||
public string Reason { get; }
|
||||
|
||||
internal DisconnectedEventArgs(ClientConnection client, string reason)
|
||||
{
|
||||
if (string.IsNullOrEmpty(reason))
|
||||
reason = "No reason provided";
|
||||
|
||||
Client = client;
|
||||
Reason = reason;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
namespace System.Net.WebSocket
|
||||
{
|
||||
/// <summary>
|
||||
/// 从客户端发送的数据
|
||||
/// </summary>
|
||||
public readonly struct ReceivedEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// 客户端连接
|
||||
/// </summary>
|
||||
public ClientConnection Client { get; }
|
||||
|
||||
/// <summary>
|
||||
/// 数据
|
||||
/// </summary>
|
||||
public string Message { get; }
|
||||
|
||||
internal ReceivedEventArgs(ClientConnection client, string message)
|
||||
{
|
||||
Client = client;
|
||||
Message = message;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
namespace System.Net.WebSocket
|
||||
{
|
||||
public enum SocketState
|
||||
{
|
||||
Connecting = 0,
|
||||
Open = 1,
|
||||
Closing = 2,
|
||||
Closed = 3
|
||||
}
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
using System.Linq;
|
||||
using System.Net.Sockets;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace System.Net.WebSocket
|
||||
{
|
||||
internal static class Utility
|
||||
{
|
||||
private const string EOL = "\r\n";
|
||||
private const string GUID = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
|
||||
|
||||
private static readonly Regex getRegex = new("^GET");
|
||||
private static readonly Regex keyRegex = new("Sec-WebSocket-Key: (.*)");
|
||||
|
||||
internal static async Task<bool> TryHandshakeAsync(TcpClient tcp)
|
||||
{
|
||||
Socket socket = tcp.Client;
|
||||
NetworkStream stream = tcp.GetStream();
|
||||
|
||||
byte[] buffer = new byte[556];
|
||||
await socket.ReceiveAsync(buffer, SocketFlags.None);
|
||||
string headers = Encoding.UTF8.GetString(buffer);
|
||||
|
||||
bool isGet = getRegex.IsMatch(headers);
|
||||
if (isGet)
|
||||
{
|
||||
string key = keyRegex.Match(headers).Groups[1].Value.Trim() + GUID;
|
||||
byte[] keyBytes = Encoding.UTF8.GetBytes(key);
|
||||
string sha1 = Convert.ToBase64String(SHA1.Create().ComputeHash(keyBytes));
|
||||
byte[] response = Encoding.UTF8.GetBytes(
|
||||
$"HTTP/1.1 101 Switching Protocols{EOL}" +
|
||||
$"Connection: Upgrade{EOL}" +
|
||||
$"Upgrade: websocket{EOL}" +
|
||||
$"Sec-WebSocket-Accept: {sha1}{EOL}{EOL}");
|
||||
await stream.WriteAsync(response.AsMemory(0, response.Length));
|
||||
await stream.FlushAsync();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
internal static bool TryDecodeMessage(byte[] bytes, out string message)
|
||||
{
|
||||
int op = bytes[0] & 0b_0000_1111;
|
||||
int payload = bytes[1] & 0b_0111_1111;
|
||||
int length = 0;
|
||||
int startIndex = 2;
|
||||
|
||||
if (op == 8)
|
||||
{
|
||||
message = "Connection closed";
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (payload)
|
||||
{
|
||||
case 126:
|
||||
length = 2;
|
||||
break;
|
||||
case 127:
|
||||
length = 8;
|
||||
break;
|
||||
}
|
||||
|
||||
startIndex += length;
|
||||
|
||||
byte[] mask = bytes.Skip(startIndex).Take(4).ToArray();
|
||||
byte[] encoded = bytes.Skip(startIndex + 4).ToArray();
|
||||
byte[] decoded = new byte[encoded.Length];
|
||||
|
||||
for (int i = 0; i < encoded.Length; i++)
|
||||
{
|
||||
decoded[i] = (byte)(encoded[i] ^ mask[i % 4]);
|
||||
}
|
||||
|
||||
message = Encoding.UTF8.GetString(decoded);
|
||||
return true;
|
||||
}
|
||||
|
||||
internal static byte[] EncodeMessage(string message)
|
||||
{
|
||||
byte[] messageBytes = Encoding.UTF8.GetBytes(message);
|
||||
|
||||
if (messageBytes.Length > 125)
|
||||
throw new ArgumentException("Message is too big. Max size: 125");
|
||||
|
||||
byte[] bytes = new byte[messageBytes.Length + 2];
|
||||
bytes[0] = 0b_1000_0001;
|
||||
bytes[1] = (byte)messageBytes.Length;
|
||||
|
||||
messageBytes.CopyTo(bytes, 2);
|
||||
return bytes;
|
||||
}
|
||||
|
||||
internal static byte[] BuildCloseFrame()
|
||||
{
|
||||
return new byte[] { 0b_1000_1000, 0b_0000_0000 };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
using System.Linq;
|
||||
using System.Net.NetworkInformation;
|
||||
using System.Net.Sockets;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace System.Net.WebSocket
|
||||
{
|
||||
public class ServerWebSocket : IDisposable
|
||||
{
|
||||
private readonly TcpListener listener;
|
||||
|
||||
public bool RunState { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// 连接
|
||||
/// </summary>
|
||||
public event Func<ConnectedEventArgs, Task>? OnClientConnected;
|
||||
|
||||
/// <summary>
|
||||
/// 消息
|
||||
/// </summary>
|
||||
public event Func<ReceivedEventArgs, Task>? OnClientReceived;
|
||||
|
||||
/// <summary>
|
||||
/// 断开
|
||||
/// </summary>
|
||||
public event Func<DisconnectedEventArgs, Task>? OnClientDisconnected;
|
||||
|
||||
internal static bool IsPortOccupedFun(int port)
|
||||
{
|
||||
IPGlobalProperties iproperties = IPGlobalProperties.GetIPGlobalProperties();
|
||||
IPEndPoint[] ipEndPoints = iproperties.GetActiveTcpListeners();
|
||||
return ipEndPoints.Any(x => x.Port == port);
|
||||
}
|
||||
|
||||
public ServerWebSocket(IPAddress ip, out int port)
|
||||
{
|
||||
var random = new Random();
|
||||
port = random.Next(10000, 25564);
|
||||
while (IsPortOccupedFun(port))
|
||||
{
|
||||
port = random.Next(10000, 25564);
|
||||
}
|
||||
listener = new(ip, port);
|
||||
}
|
||||
|
||||
public ServerWebSocket(IPAddress ip, int port)
|
||||
{
|
||||
listener = new(ip, port);
|
||||
}
|
||||
|
||||
readonly CancellationTokenSource tokenSource = new();
|
||||
|
||||
bool isStarted;
|
||||
public void Start()
|
||||
{
|
||||
if (isStarted) return;
|
||||
isStarted = true;
|
||||
Task.Factory.StartNew(StartCore,
|
||||
tokenSource.Token,
|
||||
TaskCreationOptions.LongRunning,
|
||||
TaskScheduler.Default);
|
||||
}
|
||||
|
||||
async void StartCore()
|
||||
{
|
||||
listener.Start();
|
||||
RunState = true;
|
||||
try
|
||||
{
|
||||
while (RunState)
|
||||
{
|
||||
try {
|
||||
TcpClient tcp = await Task.Run(() => listener.AcceptTcpClientAsync(), tokenSource.Token);// await listener.AcceptTcpClientAsync();
|
||||
_ = Task.Run(async () =>
|
||||
{
|
||||
ClientConnection client = new(tcp)
|
||||
{
|
||||
OnConnected = OnClientConnected,
|
||||
OnReceived = OnClientReceived,
|
||||
OnDisconnected = OnClientDisconnected
|
||||
};
|
||||
tokenSource.Token.Register(() => { client.Dispose(); });
|
||||
await client.StartAsync();
|
||||
}, tokenSource.Token);
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
listener.Stop();
|
||||
}
|
||||
}
|
||||
|
||||
private bool disposedValue;
|
||||
protected virtual void Dispose(bool disposing)
|
||||
{
|
||||
if (!disposedValue)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
// TODO: 释放托管状态(托管对象)
|
||||
tokenSource.Cancel();
|
||||
listener.Stop();
|
||||
RunState = false;
|
||||
}
|
||||
|
||||
// TODO: 释放未托管的资源(未托管的对象)并重写终结器
|
||||
// TODO: 将大型字段设置为 null
|
||||
disposedValue = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// 不要更改此代码。请将清理代码放入“Dispose(bool disposing)”方法中
|
||||
Dispose(disposing: true);
|
||||
GC.SuppressFinalize(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,33 +9,18 @@ namespace System.Properties
|
||||
{
|
||||
get
|
||||
{
|
||||
switch (DI.Platform)
|
||||
if (OperatingSystem2.IsLinux || OperatingSystem2.IsAndroid)
|
||||
{
|
||||
case Platform.Windows:
|
||||
return DI.IsDesktopBridge ? Version + beta : Version;
|
||||
case Platform.Linux:
|
||||
return Version + alpha;
|
||||
case Platform.Android:
|
||||
return Version + alpha;
|
||||
case Platform.Apple:
|
||||
switch (DI.DeviceIdiom)
|
||||
{
|
||||
case DeviceIdiom.Phone:
|
||||
break;
|
||||
case DeviceIdiom.Tablet:
|
||||
break;
|
||||
case DeviceIdiom.Desktop:
|
||||
return Version + beta;
|
||||
case DeviceIdiom.TV:
|
||||
break;
|
||||
case DeviceIdiom.Watch:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case Platform.UWP:
|
||||
break;
|
||||
return Version + alpha;
|
||||
}
|
||||
else if (OperatingSystem2.IsMacOS || (OperatingSystem2.IsWindows && DesktopBridge.IsRunningAsUwp))
|
||||
{
|
||||
return Version + beta;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Version;
|
||||
}
|
||||
return Version;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ namespace System.Properties
|
||||
/// <item> iOS:\src\ST.Client.Mobile.iOS.App\Info.plist <CFBundleVersion> <CFBundleShortVersionString> </item>
|
||||
/// <item> Android:\src\ST.Client.Mobile.Droid.App\Properties\AndroidManifest.xml <manifest ... android:versionCode(long递增) android:versionName </item>
|
||||
/// <item> UWP(DesktopBridge):\src\ST.Client.Desktop.Avalonia.App.Bridge.Package\Package.appxmanifest <Identity ... Version </item>
|
||||
/// <item> macOS:\src\ST.Client.Desktop.Avalonia.App\Info.plist <CFBundleVersion> <CFBundleShortVersionString> </item>
|
||||
/// <item> macOS:\packaging\build-osx-app.sh <CFBundleVersion> <CFBundleShortVersionString> </item>
|
||||
/// </list>
|
||||
/// </summary>
|
||||
public const string Version = "2.4.9";
|
||||
public const string Version = "2.4.10";
|
||||
|
||||
//public const string InfoVersion = Version + "-beta";
|
||||
}
|
||||
|
||||
@@ -161,11 +161,10 @@ namespace System.Security.Cryptography
|
||||
return Padding;
|
||||
}
|
||||
|
||||
public static RSAEncryptionPadding DefaultPadding => DI.Platform switch
|
||||
{
|
||||
Platform.Android => RSAEncryptionPadding.OaepSHA1,
|
||||
_ => RSAEncryptionPadding.OaepSHA256,
|
||||
};
|
||||
public static RSAEncryptionPadding DefaultPadding
|
||||
=> OperatingSystem2.IsAndroid ?
|
||||
RSAEncryptionPadding.OaepSHA1 :
|
||||
RSAEncryptionPadding.OaepSHA256;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace System
|
||||
#if NOT_NJSON
|
||||
return JsonImplType.SystemTextJson;
|
||||
#else
|
||||
if (DI.Platform == Platform.Android || DI.IsiOSOriPadOSOrwatchOS)
|
||||
if (Environment.Version.Major <= 5)
|
||||
{
|
||||
return JsonImplType.NewtonsoftJson;
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<Identity
|
||||
Name="4651ED44255E.47979655102CE"
|
||||
Publisher="CN=A90E406B-B2D3-4A23-B061-0FA1D65C4F66"
|
||||
Version="2.4.9.0" />
|
||||
Version="2.4.10.0" />
|
||||
|
||||
<Properties>
|
||||
<DisplayName>Steam++</DisplayName>
|
||||
|
||||
@@ -4,14 +4,14 @@ using Windows.ApplicationModel;
|
||||
// ReSharper disable once CheckNamespace
|
||||
namespace System.Application
|
||||
{
|
||||
public static class DesktopBridgeHelper
|
||||
public sealed class DesktopBridgeHelper : DesktopBridge
|
||||
{
|
||||
private DesktopBridgeHelper() => throw new NotSupportedException();
|
||||
|
||||
[SupportedOSPlatform("Windows10.0.10240.0")]
|
||||
public static bool Init(int min_os_build = 17763)
|
||||
{
|
||||
if (DI.Platform != Platform.Windows) return false;
|
||||
var osVer = Environment.OSVersion.Version;
|
||||
if (osVer.Major != 10 || osVer.Build < min_os_build) return false;
|
||||
if (!OperatingSystem2.IsWindowsVersionAtLeast(10, 0, min_os_build)) return false;
|
||||
try
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(Package.Current.Id.Name)) return false;
|
||||
@@ -20,7 +20,7 @@ namespace System.Application
|
||||
{
|
||||
return false;
|
||||
}
|
||||
DI.IsDesktopBridge = true;
|
||||
IsRunningAsUwp = true;
|
||||
FileSystemDesktopBridge.InitFileSystem();
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -2,12 +2,14 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ui="clr-namespace:System.Application.UI"
|
||||
xmlns:converters="clr-namespace:System.Application.Converters;assembly=System.Application.SteamTools.Client.Desktop.Avalonia"
|
||||
xmlns:sty="using:FluentAvalonia.Styling"
|
||||
x:Class="System.Application.UI.App">
|
||||
<Application.DataTemplates>
|
||||
<ui:ViewLocator/>
|
||||
</Application.DataTemplates>
|
||||
<Application.Resources>
|
||||
<converters:IsNullConverter x:Key="IsNullConverter" />
|
||||
<converters:IsVisibleToOpacity x:Key="IsVisibleToOpacity" />
|
||||
<converters:NameToFontFamilyConverter x:Key="NameToFontFamilyConverter" />
|
||||
<converters:DrawingKeyValueConverter x:Key="DrawingKeyValueConverter" />
|
||||
<converters:BitmapAssetValueConverter x:Key="BitmapAssetValueConverter" />
|
||||
@@ -18,18 +20,18 @@
|
||||
<Application.Styles>
|
||||
<FluentTheme Mode="Dark" />
|
||||
<StyleInclude Source="avares://System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/ThemeDark.xaml" />
|
||||
<!--<StyleInclude Source="avares://System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/ThemeLight.xaml" />-->
|
||||
<!--<StyleInclude Source="avares://System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/Styles.xaml" />-->
|
||||
<StyleInclude Source="avares://System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/ThemeAccent.xaml" />
|
||||
<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml" />
|
||||
|
||||
<!--<StyleInclude Source="avares://AvaloniaEdit/AvaloniaEdit.xaml"/>-->
|
||||
<sty:FluentAvaloniaTheme ControlsVersion="2"
|
||||
RequestedTheme="Dark"
|
||||
DefaultToUserTheme="False"
|
||||
GetUserAccentColor="False"
|
||||
UseSegoeUIOnWindows="False"/>
|
||||
|
||||
<StyleInclude Source="avares://System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Styles/Controls.xaml" />
|
||||
|
||||
<!--<sty:FluentAvaloniaTheme ControlsVersion="2"/>-->
|
||||
<!--<StyleInclude Source="avares://AvaloniaEdit/AvaloniaEdit.xaml"/>-->
|
||||
|
||||
<Style Selector="Window">
|
||||
<Setter Property="Icon" Value="avares://System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Assets/Icon.ico"/>
|
||||
</Style>
|
||||
</Application.Styles>
|
||||
<!-- (NativeMenu.Menu) https://github.com/AvaloniaUI/Avalonia/issues/3541 -->
|
||||
<!--<NativeMenu.Menu>
|
||||
|
||||
@@ -27,6 +27,10 @@ using System.Application.UI.Views.Windows;
|
||||
using System.Application.Services.Implementation;
|
||||
using System.Threading.Tasks;
|
||||
using System.Application.Security;
|
||||
using Avalonia;
|
||||
using Avalonia.Platform;
|
||||
using FluentAvalonia.Styling;
|
||||
using Avalonia.Media;
|
||||
#if WINDOWS
|
||||
//using WpfApplication = System.Windows.Application;
|
||||
#endif
|
||||
@@ -61,14 +65,18 @@ namespace System.Application.UI
|
||||
if (isLightOrDarkTheme.HasValue)
|
||||
{
|
||||
switch_value = GetAppThemeByIsLightOrDarkTheme(isLightOrDarkTheme.Value);
|
||||
#if DEBUG
|
||||
dps.SetLightOrDarkThemeFollowingSystem(true);
|
||||
#endif
|
||||
if (switch_value == mTheme) goto setValue;
|
||||
}
|
||||
}
|
||||
else if (mTheme == AppTheme.FollowingSystem)
|
||||
{
|
||||
var dps = DI.Get<IDesktopPlatformService>();
|
||||
#if DEBUG
|
||||
dps.SetLightOrDarkThemeFollowingSystem(false);
|
||||
#endif
|
||||
var isLightOrDarkTheme = dps.IsLightOrDarkTheme;
|
||||
if (isLightOrDarkTheme.HasValue)
|
||||
{
|
||||
@@ -115,6 +123,41 @@ namespace System.Application.UI
|
||||
{
|
||||
Source = uri_1,
|
||||
};
|
||||
|
||||
AvaloniaLocator.Current.GetService<FluentAvaloniaTheme>().RequestedTheme = the;
|
||||
}
|
||||
|
||||
public void SetThemeAccent(string? colorHex)
|
||||
{
|
||||
if (colorHex == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
var thm = AvaloniaLocator.Current.GetService<FluentAvaloniaTheme>();
|
||||
|
||||
if (Color.TryParse(colorHex, out var color))
|
||||
{
|
||||
thm.CustomAccentColor = color;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (colorHex.Equals(bool.TrueString, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
thm.CustomAccentColor = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (OperatingSystem2.IsWindows)
|
||||
{
|
||||
if (OperatingSystem2.IsWindowsVersionAtLeast(6, 2))
|
||||
thm.GetUserAccentColor = true;
|
||||
else
|
||||
thm.GetUserAccentColor = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
thm.GetUserAccentColor = true;
|
||||
}
|
||||
}
|
||||
|
||||
readonly Dictionary<string, ICommand> mNotifyIconMenus = new();
|
||||
@@ -151,7 +194,13 @@ namespace System.Application.UI
|
||||
#if StartupTrace
|
||||
StartupTrace.Restart("Theme");
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
//实时切换主题有BUG暂且屏蔽
|
||||
UISettings.Theme.Subscribe(x => Theme = (AppTheme)x);
|
||||
#endif
|
||||
UISettings.ThemeAccent.Subscribe(x => SetThemeAccent(x));
|
||||
UISettings.GetUserThemeAccent.Subscribe(x => SetThemeAccent(x ? bool.TrueString : UISettings.ThemeAccent.Value));
|
||||
UISettings.Language.Subscribe(x => R.ChangeLanguage(x));
|
||||
GeneralSettings.InitWindowsStartupAutoRun();
|
||||
#if StartupTrace
|
||||
@@ -213,15 +262,13 @@ namespace System.Application.UI
|
||||
var notifyIcon = INotifyIcon.Instance;
|
||||
notifyIcon.Visible = true;
|
||||
notifyIcon.ToolTipText = ThisAssembly.AssemblyTrademark;
|
||||
switch (DI.Platform)
|
||||
if (OperatingSystem2.IsMacOS)
|
||||
{
|
||||
case Platform.Windows:
|
||||
case Platform.Linux:
|
||||
notifyIcon.IconPath = "avares://System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Assets/Icon.ico";
|
||||
break;
|
||||
case Platform.Apple:
|
||||
notifyIcon.IconPath = "avares://System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Assets/Icon_16.png";
|
||||
break;
|
||||
notifyIcon.IconPath = "avares://System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Assets/Icon_16.png";
|
||||
}
|
||||
else
|
||||
{
|
||||
notifyIcon.IconPath = "avares://System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Assets/Icon.ico";
|
||||
}
|
||||
#if WINDOWS
|
||||
notifyIcon.RightClick += (s, e) =>
|
||||
@@ -290,6 +337,15 @@ namespace System.Application.UI
|
||||
base.OnFrameworkInitializationCompleted();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// override RegisterServices register custom service
|
||||
/// </summary>
|
||||
public override void RegisterServices()
|
||||
{
|
||||
AvaloniaLocator.CurrentMutable.Bind<IFontManagerImpl>().ToConstant(new CustomFontManagerImpl());
|
||||
base.RegisterServices();
|
||||
}
|
||||
|
||||
void Desktop_Startup(object? sender, ControlledApplicationLifetimeStartupEventArgs e)
|
||||
{
|
||||
var isOfficialChannelPackage = IsNotOfficialChannelPackageDetectionHelper.Check(Program.IsMainProcess);
|
||||
@@ -319,11 +375,7 @@ namespace System.Application.UI
|
||||
}
|
||||
#endif
|
||||
|
||||
var startupToastIntercept = DI.Get_Nullable<StartupToastIntercept>();
|
||||
if (startupToastIntercept != null)
|
||||
{
|
||||
startupToastIntercept.IsStartuped = true;
|
||||
}
|
||||
StartupToastIntercept.OnStartuped();
|
||||
#if StartupTrace
|
||||
StartupTrace.Restart("Desktop_Startup.SetIsStartuped");
|
||||
#endif
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace System.Application.UI
|
||||
})
|
||||
.With(new Win32PlatformOptions
|
||||
{
|
||||
AllowEglInitialization = true /*!DI.IsmacOS*/,
|
||||
AllowEglInitialization = true /*!OperatingSystem2.IsMacOS*/,
|
||||
UseWindowsUIComposition = true
|
||||
})
|
||||
.LogToTrace()
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<DefineConstants>PUBLISH;</DefineConstants>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>ARM</Platform>
|
||||
<PublishDir>bin\Release\Publish\linux-arm</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<!-- Linux distributions running on ARM like Raspbian on Raspberry Pi Model 2+ -->
|
||||
<RuntimeIdentifier>linux-arm</RuntimeIdentifier>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<SelfContained>true</SelfContained>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<PublishTrimmed>false</PublishTrimmed>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -9,6 +9,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<Platform>ARM64</Platform>
|
||||
<PublishDir>bin\Release\Publish\linux-arm64</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<!-- Linux distributions running on 64-bit ARM like Ubuntu Server 64-bit on Raspberry Pi Model 3+ -->
|
||||
<RuntimeIdentifier>linux-arm64</RuntimeIdentifier>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<SelfContained>true</SelfContained>
|
||||
|
||||
@@ -10,7 +10,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PublishDir>bin\Release\Publish\linux-x64</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<SelfContained>true</SelfContained>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<PublishReadyToRun>false</PublishReadyToRun>
|
||||
|
||||
@@ -12,7 +12,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<RuntimeIdentifier>osx.11.0-arm64</RuntimeIdentifier>
|
||||
<!--<PublishReadyToRun Condition=" '$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true' ">true</PublishReadyToRun>-->
|
||||
<TargetFramework>net6.0-macos</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<SelfContained>true</SelfContained>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<PublishTrimmed>false</PublishTrimmed>
|
||||
|
||||
@@ -9,8 +9,8 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
<Platform>Any CPU</Platform>
|
||||
<PublishDir>bin\Release\Publish\osx-x64</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<RuntimeIdentifier>osx-x64</RuntimeIdentifier>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<RuntimeIdentifier>osx.10.14-x64</RuntimeIdentifier>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<SelfContained>true</SelfContained>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<PublishReadyToRun>false</PublishReadyToRun>
|
||||
|
||||
@@ -40,12 +40,12 @@
|
||||
<PropertyGroup Condition=" $(RuntimeIdentifier.Contains(`osx`)) Or ('$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true' And !$(DefineConstants.Contains(`PUBLISH`))) ">
|
||||
<DefineConstants>MAC;$(DefineConstants)</DefineConstants>
|
||||
<!--<TargetFramework>net6.0-macos</TargetFramework>-->
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" $(RuntimeIdentifier.Contains(`linux`)) Or ('$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true' And !$(DefineConstants.Contains(`PUBLISH`))) ">
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<OutputType>Exe</OutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
d:DesignWidth="1200" Width="995" MinWidth="995"
|
||||
d:DesignHeight="600" Height="600" MinHeight="600"
|
||||
d:DesignWidth="1200" Width="995" MinWidth="600"
|
||||
d:DesignHeight="600" Height="600" MinHeight="400"
|
||||
xmlns:local="clr-namespace:System.Application.UI.Views;assembly=System.Application.SteamTools.Client.Desktop.Avalonia"
|
||||
xmlns:vm="clr-namespace:System.Application.UI.ViewModels;assembly=System.Application.SteamTools.Client.Desktop"
|
||||
xmlns:controls="clr-namespace:System.Application.UI.Views.Controls;assembly=System.Application.SteamTools.Client.Desktop.Avalonia"
|
||||
x:Class="System.Application.UI.Views.MainWindow"
|
||||
x:Name="MainWindow"
|
||||
WindowStartupLocation="CenterScreen"
|
||||
ExtendClientAreaTitleBarHeightHint="50"
|
||||
ExtendClientAreaTitleBarHeightHint="30"
|
||||
Background="Transparent"
|
||||
Title="{Binding Title,Mode=OneWay}"
|
||||
Topmost="{Binding Topmost}"
|
||||
|
||||
@@ -2,6 +2,7 @@ using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.ApplicationLifetimes;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using FluentAvalonia.Styling;
|
||||
using System.Application.UI.ViewModels;
|
||||
using System.ComponentModel;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Application.Models;
|
||||
using Avalonia.Data;
|
||||
using System.Application.Models;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
|
||||
@@ -60,7 +61,7 @@ namespace System.Application.Converters
|
||||
}
|
||||
return DownloadImage(ImageUrlHelper.GetImageApiUrlById(imageid), width);
|
||||
}
|
||||
throw new NotSupportedException();
|
||||
return BindingOperations.DoNothing;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using Avalonia.Data;
|
||||
using Avalonia.Data.Converters;
|
||||
using Avalonia.Media;
|
||||
using FluentAvalonia.UI.Media;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.Application.Converters
|
||||
{
|
||||
public class ColorStringToBrush : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (targetType.IsAssignableFrom(typeof(ISolidColorBrush)))
|
||||
{
|
||||
if (value is Color c)
|
||||
return new SolidColorBrush(c);
|
||||
|
||||
if (value is Color2 c2)
|
||||
return new SolidColorBrush(c2);
|
||||
|
||||
if (value is string c3 && Color.TryParse(c3, out var cc))
|
||||
{
|
||||
return new SolidColorBrush(cc);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (value is string c3 && Color2.TryParse(c3, out var cc))
|
||||
{
|
||||
return cc;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (targetType == typeof(string))
|
||||
{
|
||||
if (value is ISolidColorBrush sc)
|
||||
return ColorToHex(sc.Color);
|
||||
if (value is Color c1)
|
||||
return ColorToHex(c1);
|
||||
if (value is Color2 c2)
|
||||
return ColorToHex(c2);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (value is ISolidColorBrush sc)
|
||||
return sc.Color;
|
||||
if (value is Color || value is Color2)
|
||||
return value;
|
||||
}
|
||||
return BindingOperations.DoNothing;
|
||||
}
|
||||
|
||||
private static string ColorToHex(Color color)
|
||||
{
|
||||
return $"#{color.A:X2}{color.R:X2}{color.G:X2}{color.B:X2}";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
using System.Application.Services;
|
||||
using System.Application.Services;
|
||||
using System.Globalization;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Data;
|
||||
using Avalonia.Data.Converters;
|
||||
using Avalonia.Platform;
|
||||
|
||||
@@ -19,12 +20,12 @@ namespace System.Application.Converters
|
||||
{
|
||||
return IDesktopAvaloniaAppService.Instance.Current.FindResource(key);
|
||||
}
|
||||
throw new NotSupportedException();
|
||||
return BindingOperations.DoNothing;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
return BindingOperations.DoNothing;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using Avalonia;
|
||||
using Avalonia;
|
||||
using Avalonia.Data;
|
||||
using Avalonia.Data.Converters;
|
||||
using Avalonia.Media.Imaging;
|
||||
using Avalonia.Platform;
|
||||
@@ -18,7 +19,7 @@ namespace System.Application.Converters
|
||||
|
||||
public virtual object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotSupportedException();
|
||||
return BindingOperations.DoNothing;
|
||||
}
|
||||
|
||||
[Obsolete("use HttpClient")]
|
||||
|
||||
@@ -28,7 +28,11 @@ namespace System.Application.Converters
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
if (targetType == typeof(string))
|
||||
{
|
||||
return value.ToString();
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using Avalonia.Data;
|
||||
using Avalonia.Data.Converters;
|
||||
using Avalonia.Media;
|
||||
using FluentAvalonia.UI.Media;
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace System.Application.Converters
|
||||
{
|
||||
public class IsVisibleToOpacity : IValueConverter
|
||||
{
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
double defaultOpacity = 1;
|
||||
if (parameter is double d)
|
||||
{
|
||||
defaultOpacity = d;
|
||||
}
|
||||
|
||||
if (value is bool b)
|
||||
{
|
||||
return b ? defaultOpacity : 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
if (value is double d)
|
||||
{
|
||||
return d > 0;
|
||||
}
|
||||
return BindingOperations.DoNothing;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using Avalonia.Data;
|
||||
using Avalonia.Data.Converters;
|
||||
using Avalonia.Media;
|
||||
using System.Globalization;
|
||||
@@ -54,7 +55,7 @@ namespace System.Application.Converters
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return BindingOperations.DoNothing;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Globalization;
|
||||
using Avalonia.Data;
|
||||
using Avalonia.Data.Converters;
|
||||
|
||||
namespace System.Application.Converters
|
||||
@@ -19,7 +20,7 @@ namespace System.Application.Converters
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
return BindingOperations.DoNothing;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
using Avalonia.Data;
|
||||
using Avalonia.Data.Converters;
|
||||
using System.Globalization;
|
||||
|
||||
@@ -16,7 +17,11 @@ namespace System.Application.Converters
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
if (targetType == typeof(string))
|
||||
{
|
||||
return value.ToString();
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -88,6 +88,16 @@ namespace System.Application.Services
|
||||
}
|
||||
}
|
||||
|
||||
bool IsVisibleWindow(WindowViewModel vm)
|
||||
{
|
||||
if (Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||
{
|
||||
var window = desktop.Windows.FirstOrDefault(x => x.DataContext == vm);
|
||||
return window?.IsVisible == true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void HideWindow(WindowViewModel vm)
|
||||
{
|
||||
if (Current.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
|
||||
|
||||
+5
-5
@@ -6,26 +6,26 @@ namespace System.Application.Services.Implementation
|
||||
/// <inheritdoc cref="INotificationService{TNotificationType, TEntrance}"/>
|
||||
internal sealed class PlatformNotificationServiceImpl : INotificationService
|
||||
{
|
||||
bool INotificationService<NotificationType, Entrance>.AreNotificationsEnabled() => true;
|
||||
bool INotificationService<NotificationType, Entrance, INotificationService>.AreNotificationsEnabled() => true;
|
||||
|
||||
void INotificationService<NotificationType, Entrance>.Cancel(NotificationType notificationType)
|
||||
void INotificationService<NotificationType, Entrance, INotificationService>.Cancel(NotificationType notificationType)
|
||||
{
|
||||
INotifyIcon.Instance.HideBalloonTip();
|
||||
}
|
||||
|
||||
void INotificationService<NotificationType, Entrance>.CancelAll()
|
||||
void INotificationService<NotificationType, Entrance, INotificationService>.CancelAll()
|
||||
{
|
||||
INotifyIcon.Instance.HideBalloonTip();
|
||||
}
|
||||
|
||||
void INotificationService<NotificationType, Entrance>.Notify(string text, NotificationType notificationType, bool autoCancel, string? title, Entrance entrance)
|
||||
void INotificationService<NotificationType, Entrance, INotificationService>.Notify(string text, NotificationType notificationType, bool autoCancel, string? title, Entrance entrance)
|
||||
{
|
||||
title ??= ThisAssembly.AssemblyTrademark;
|
||||
// 调用托盘显示通知
|
||||
INotifyIcon.Instance.ShowBalloonTip(title, text);
|
||||
}
|
||||
|
||||
Progress<float> INotificationService<NotificationType, Entrance>.NotifyDownload(Func<string> text, NotificationType notificationType, string? title)
|
||||
Progress<float> INotificationService<NotificationType, Entrance, INotificationService>.NotifyDownload(Func<string> text, NotificationType notificationType, string? title)
|
||||
{
|
||||
// 桌面端不支持带进度的通知,下载新版本改用桌面端的窗口进度条控件,由更新服务桌面端版实现
|
||||
throw new PlatformNotSupportedException();
|
||||
|
||||
+13
@@ -197,6 +197,19 @@ namespace System.Application.Services.Implementation
|
||||
"CloseWindow fail, vmType: {0}", vm.GetType().Name);
|
||||
}
|
||||
}
|
||||
public bool IsVisibleWindow(WindowViewModel vm)
|
||||
{
|
||||
try
|
||||
{
|
||||
return IDesktopAvaloniaAppService.Instance.IsVisibleWindow(vm);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error(nameof(ShowWindowServiceImpl), e,
|
||||
"HideWindow fail, vmType: {0}", vm.GetType().Name);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public void HideWindow(WindowViewModel vm)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
using Avalonia.Media;
|
||||
using Avalonia.Platform;
|
||||
using Avalonia.Skia;
|
||||
using SkiaSharp;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
|
||||
namespace System.Application.UI
|
||||
{
|
||||
public class CustomFontManagerImpl : IFontManagerImpl
|
||||
{
|
||||
//private readonly Typeface[] _customTypefaces;
|
||||
private SKFontManager _skFontManager = SKFontManager.Default;
|
||||
private readonly string _defaultFamilyName;
|
||||
|
||||
//Load font resources in the project, you can load multiple font resources
|
||||
private readonly Typeface _defaultTypeface =
|
||||
new Typeface("avares://System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Assets/Fonts#WenQuanYi Micro Hei");
|
||||
|
||||
public CustomFontManagerImpl()
|
||||
{
|
||||
//_customTypefaces = new[] { _defaultTypeface };
|
||||
_defaultFamilyName = _defaultTypeface.FontFamily.FamilyNames.PrimaryFamilyName;
|
||||
}
|
||||
|
||||
public string GetDefaultFontFamilyName()
|
||||
{
|
||||
return _defaultFamilyName;
|
||||
}
|
||||
|
||||
public IEnumerable<string> GetInstalledFontFamilyNames(bool checkForUpdates = false)
|
||||
{
|
||||
if (checkForUpdates)
|
||||
{
|
||||
_skFontManager = SKFontManager.CreateDefault();
|
||||
}
|
||||
|
||||
return _skFontManager.FontFamilies;
|
||||
//return _customTypefaces.Select(x => x.FontFamily.Name);
|
||||
}
|
||||
|
||||
private readonly string[] _bcp47 = { CultureInfo.CurrentCulture.ThreeLetterISOLanguageName, CultureInfo.CurrentCulture.TwoLetterISOLanguageName };
|
||||
|
||||
[ThreadStatic] private static string[] t_languageTagBuffer;
|
||||
|
||||
public bool TryMatchCharacter(int codepoint, FontStyle fontStyle, FontWeight fontWeight, FontFamily fontFamily,
|
||||
CultureInfo culture, out Typeface fontKey)
|
||||
{
|
||||
SKFontStyle skFontStyle;
|
||||
|
||||
switch (fontWeight)
|
||||
{
|
||||
case FontWeight.Normal when fontStyle == FontStyle.Normal:
|
||||
skFontStyle = SKFontStyle.Normal;
|
||||
break;
|
||||
case FontWeight.Normal when fontStyle == FontStyle.Italic:
|
||||
skFontStyle = SKFontStyle.Italic;
|
||||
break;
|
||||
case FontWeight.Bold when fontStyle == FontStyle.Normal:
|
||||
skFontStyle = SKFontStyle.Bold;
|
||||
break;
|
||||
case FontWeight.Bold when fontStyle == FontStyle.Italic:
|
||||
skFontStyle = SKFontStyle.BoldItalic;
|
||||
break;
|
||||
default:
|
||||
skFontStyle = new SKFontStyle((SKFontStyleWeight)fontWeight, SKFontStyleWidth.Normal, (SKFontStyleSlant)fontStyle);
|
||||
break;
|
||||
}
|
||||
|
||||
if (culture == null)
|
||||
{
|
||||
culture = CultureInfo.CurrentUICulture;
|
||||
}
|
||||
|
||||
if (t_languageTagBuffer == null)
|
||||
{
|
||||
t_languageTagBuffer = new string[2];
|
||||
}
|
||||
|
||||
t_languageTagBuffer[0] = culture.TwoLetterISOLanguageName;
|
||||
t_languageTagBuffer[1] = culture.ThreeLetterISOLanguageName;
|
||||
|
||||
if (fontFamily != null && fontFamily.FamilyNames.HasFallbacks)
|
||||
{
|
||||
var familyNames = fontFamily.FamilyNames;
|
||||
|
||||
for (var i = 1; i < familyNames.Count; i++)
|
||||
{
|
||||
var skTypeface =
|
||||
_skFontManager.MatchCharacter(familyNames[i], skFontStyle, t_languageTagBuffer, codepoint);
|
||||
|
||||
if (skTypeface == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
fontKey = new Typeface(skTypeface.FamilyName, fontStyle, fontWeight);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var skTypeface = _skFontManager.MatchCharacter(null, skFontStyle, t_languageTagBuffer, codepoint);
|
||||
|
||||
if (skTypeface != null)
|
||||
{
|
||||
fontKey = new Typeface(skTypeface.FamilyName, fontStyle, fontWeight);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
fontKey = default;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private SKTypeface GetSkTypefaceByFontFamily(Typeface typeface)
|
||||
{
|
||||
SKTypeface? skTypeface = SKTypeface.FromFamilyName(typeface.FontFamily.Name,
|
||||
(SKFontStyleWeight)typeface.Weight, SKFontStyleWidth.Normal, (SKFontStyleSlant)typeface.Style);
|
||||
|
||||
if (skTypeface != null && !skTypeface.FamilyName.Equals(typeface.FontFamily.Name, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
try
|
||||
{
|
||||
Assembly asm = Assembly.Load("Avalonia.Skia");
|
||||
var t = asm?.GetType("Avalonia.Skia.SKTypefaceCollectionCache");
|
||||
var fontCollection = t?.InvokeMember("GetOrAddTypefaceCollection", BindingFlags.InvokeMethod | BindingFlags.Static | BindingFlags.Public, null, null, new object[] { typeface.FontFamily });
|
||||
var type = fontCollection?.GetType();
|
||||
var oMethod = type?.GetMethod("Get");
|
||||
var r = oMethod?.Invoke(fontCollection, new object[] { typeface });
|
||||
skTypeface = r as SKTypeface;
|
||||
}
|
||||
catch
|
||||
{
|
||||
//Log.Error(nameof(CustomFontManagerImpl), ex, nameof(GetSkTypefaceByFontFamily));
|
||||
skTypeface = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (skTypeface == null)
|
||||
{
|
||||
skTypeface = SKTypeface.FromFamilyName(_defaultTypeface.FontFamily.Name);
|
||||
}
|
||||
|
||||
return skTypeface;
|
||||
}
|
||||
|
||||
public IGlyphTypefaceImpl CreateGlyphTypeface(Typeface typeface)
|
||||
{
|
||||
SKTypeface? skTypeface = null;
|
||||
|
||||
switch (typeface.FontFamily.Name)
|
||||
{
|
||||
case FontFamily.DefaultFontFamilyName:
|
||||
case "WenQuanYi Micro Hei": //font family name
|
||||
skTypeface = GetSkTypefaceByFontFamily(_defaultTypeface);
|
||||
break;
|
||||
default:
|
||||
skTypeface = GetSkTypefaceByFontFamily(typeface);
|
||||
break;
|
||||
}
|
||||
|
||||
return new GlyphTypefaceImpl(skTypeface);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,10 +4,8 @@
|
||||
<Styles.Resources>
|
||||
<BoxShadows x:Key="DialogBoxShadow">4 11 30 1 #3F000000</BoxShadows>
|
||||
<BoxShadows x:Key="InfoBoxShadow">2 2 5 #3F000000</BoxShadows>
|
||||
<Thickness x:Key="ScrollMargin">20 0 20 10</Thickness>
|
||||
<Thickness x:Key="PageMargin">20 0 20 0</Thickness>
|
||||
<Thickness x:Key="PageMargin2">30 0 30 0</Thickness>
|
||||
<sys:Double x:Key="IconElementThemeHeight">16</sys:Double>
|
||||
<Thickness x:Key="ScrollMargin">10 10 10 10</Thickness>
|
||||
<Thickness x:Key="PageMargin">10 0 10 0</Thickness>
|
||||
<Easing x:Key="FluentEasing">0.4,0,0.6,1</Easing>
|
||||
<KeySpline x:Key="FluentKeySpline">0.4,0,0.6,1</KeySpline>
|
||||
<sys:Double x:Key="TitleBarHeight">30</sys:Double>
|
||||
@@ -15,7 +13,13 @@
|
||||
<Thickness x:Key="TitleBarAfterMargin">0, 30, 0, 0</Thickness>
|
||||
<Thickness x:Key="UnifyTitleBarAfterContentMargin">34, 30, 34, 0</Thickness>
|
||||
<Thickness x:Key="ContentMargin">34, 0, 34, 0</Thickness>
|
||||
<sys:Double x:Key="IconElementThemeHeight">16</sys:Double>
|
||||
|
||||
<SolidColorBrush x:Key="NavigationViewContentBackground">#00000000</SolidColorBrush>
|
||||
<CornerRadius x:Key="NavigationViewContentGridCornerRadius">0,0,0,0</CornerRadius>
|
||||
<Thickness x:Key="NavigationViewContentGridBorderThickness">0,0,0,0</Thickness>
|
||||
</Styles.Resources>
|
||||
<StyleInclude Source="/Application/UI/Styles/Window.xaml" />
|
||||
<StyleInclude Source="/Application/UI/Styles/DrawingSvg.xaml" />
|
||||
<StyleInclude Source="/Application/UI/Styles/Controls/FontSizes.xaml" />
|
||||
<StyleInclude Source="/Application/UI/Styles/Controls/Separator.xaml" />
|
||||
@@ -30,4 +34,5 @@
|
||||
<StyleInclude Source="/Application/UI/Styles/Controls/DateTimePicker.xaml" />
|
||||
<StyleInclude Source="/Application/UI/Styles/Controls/ProgressRingArc.xaml" />
|
||||
<StyleInclude Source="/Application/UI/Styles/Controls/ProgressRing.xaml" />
|
||||
<StyleInclude Source="/Application/UI/Styles/Controls/ToggleSwitch.xaml" />
|
||||
</Styles>
|
||||
|
||||
@@ -1,45 +1,48 @@
|
||||
<Styles xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="20" Background="White">
|
||||
<Border Padding="20" Classes="paper">
|
||||
<TextBox Text="Code Font Family"/>
|
||||
</Border>
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="20" Background="White">
|
||||
<Border Padding="20" Classes="paper">
|
||||
<TextBox Text="Code Font Family"/>
|
||||
</Border>
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
|
||||
<Style Selector="Border.cardborder">
|
||||
<Setter Property="BorderBrush" Value="#2F2F37"/>
|
||||
<Setter Property="BorderThickness" Value=".88"/>
|
||||
</Style>
|
||||
<Style Selector="Border.cardborder:pointerover">
|
||||
<Setter Property="BorderBrush" Value="#5E5E66"/>
|
||||
<Setter Property="BorderThickness" Value=".88"/>
|
||||
</Style>
|
||||
<Style Selector="Border.cardborder">
|
||||
<Setter Property="BorderBrush" Value="#2F2F37"/>
|
||||
<Setter Property="BorderThickness" Value="0.88 0.88"/>
|
||||
</Style>
|
||||
<Style Selector="Border.cardborder:pointerover">
|
||||
<Setter Property="BorderBrush" Value="#5E5E66"/>
|
||||
<Setter Property="BorderThickness" Value="0.88 0.88"/>
|
||||
</Style>
|
||||
|
||||
<Style Selector="Border.paper">
|
||||
<Setter Property="BoxShadow" Value="2 2 5 #55000000" />
|
||||
<!--<Setter Property="CornerRadius" Value="8" />-->
|
||||
</Style>
|
||||
<Style Selector="Border.paper:pointerover">
|
||||
<Setter Property="BoxShadow" Value="4 2 10 #55000000" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Border.RightPane">
|
||||
<Setter Property="BoxShadow" Value="-4 2 10 #55000000" />
|
||||
<!--<Setter Property="CornerRadius" Value="8" />-->
|
||||
</Style>
|
||||
|
||||
<Style Selector="Border.dialog">
|
||||
<Setter Property="BoxShadow" Value="{StaticResource DialogBoxShadow}" />
|
||||
<!--<Setter Property="CornerRadius" Value="8" />-->
|
||||
</Style>
|
||||
|
||||
<Style Selector="Border.button">
|
||||
<Setter Property="Background" Value="{DynamicResource BackgroundBrushKey}" />
|
||||
<Setter Property="BoxShadow" Value="2 2 5 #55000000" />
|
||||
</Style>
|
||||
<Style Selector="Border.button:pointerover">
|
||||
<Setter Property="BoxShadow" Value="4 5 10 #55000000" />
|
||||
</Style>
|
||||
<Style Selector="Border.paper">
|
||||
<Setter Property="BoxShadow" Value="2 2 5 #55000000" />
|
||||
<!--<Setter Property="CornerRadius" Value="8" />
|
||||
<Setter Property="ClipToBounds" Value="True"/>-->
|
||||
</Style>
|
||||
<!--<Style Selector="Border.paper:pointerover">
|
||||
<Setter Property="BoxShadow" Value="4 2 10 #55000000" />
|
||||
</Style>-->
|
||||
|
||||
<Style Selector="Border.RightPane">
|
||||
<Setter Property="BoxShadow" Value="-4 2 10 #55000000" />
|
||||
<!--<Setter Property="CornerRadius" Value="5" />
|
||||
<Setter Property="ClipToBounds" Value="True"/>-->
|
||||
</Style>
|
||||
|
||||
<Style Selector="Border.dialog">
|
||||
<Setter Property="BoxShadow" Value="{StaticResource DialogBoxShadow}" />
|
||||
<!--<Setter Property="CornerRadius" Value="5" />
|
||||
<Setter Property="ClipToBounds" Value="True"/>-->
|
||||
</Style>
|
||||
|
||||
<Style Selector="Border.button">
|
||||
<Setter Property="Background" Value="{DynamicResource BackgroundBrushKey}" />
|
||||
<Setter Property="BoxShadow" Value="2 2 5 #55000000" />
|
||||
</Style>
|
||||
<Style Selector="Border.button:pointerover">
|
||||
<Setter Property="BoxShadow" Value="4 5 10 #55000000" />
|
||||
</Style>
|
||||
</Styles>
|
||||
|
||||
@@ -1,91 +1,183 @@
|
||||
<Styles xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="20" Background="Black">
|
||||
<StackPanel Spacing="5">
|
||||
<Button Classes="Hyperlink" Content="Code Font Family" />
|
||||
<Button Classes="CodeButton" Content="Code Font Family" />
|
||||
<Button Classes="flatbutton" Content="Code Font Family" />
|
||||
<Button Classes="action" Content="Code Font Family" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
<Styles.Resources>
|
||||
</Styles.Resources>
|
||||
<Style Selector="Button.CodeButton">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
</Style>
|
||||
<Style Selector="Button.CodeButton /template/ ContentPresenter">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
<Setter Property="Padding" Value="8 10" />
|
||||
</Style>
|
||||
<Style Selector="Button.CodeButton:pointerover /template/ ContentPresenter">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="Button.flatbutton:pressed /template/ ContentPresenter">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
</Style>
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="20" Background="Black">
|
||||
<StackPanel Spacing="5">
|
||||
<Button Classes="Hyperlink" Content="Code Font Family" />
|
||||
<Button Classes="CodeButton" Content="Code Font Family" />
|
||||
<Button Classes="flatbutton" Content="Code Font Family" />
|
||||
<Button Classes="action" Content="Code Font Family" />
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
<Styles.Resources>
|
||||
</Styles.Resources>
|
||||
|
||||
<Style Selector="Button.Hyperlink">
|
||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource SystemControlHyperlinkTextBrush}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>
|
||||
<Style Selector="Button">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left" />
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.Hyperlink TextBlock">
|
||||
<Setter Property="TextDecorations" Value="Underline" />
|
||||
</Style>
|
||||
<Style Selector="Button.CodeButton">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Margin" Value="0"/>
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
</Style>
|
||||
<Style Selector="Button.CodeButton /template/ ContentPresenter">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
<Setter Property="Padding" Value="8 10" />
|
||||
</Style>
|
||||
<Style Selector="Button.CodeButton:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="Button.CodeButton:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="Button.CodeButton:pressed /template/ ContentPresenter#BorderElement">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="Button.CodeButton:pointerover /template/ ContentPresenter#BorderElement">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.Hyperlink:pointerover /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource HyperLinkForeground}" />
|
||||
</Style>
|
||||
<Style Selector="Button.Hyperlink">
|
||||
<Setter Property="Background" Value="{DynamicResource HyperlinkButtonBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource HyperlinkButtonForeground}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource HyperlinkButtonBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="{DynamicResource HyperlinkButtonBorderThemeThickness}" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="HorizontalAlignment" Value="Left" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<ContentPresenter Name="ContentPresenter"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
Content="{TemplateBinding Content}"
|
||||
ContentTemplate="{TemplateBinding ContentTemplate}"
|
||||
Padding="{TemplateBinding Padding}"
|
||||
CornerRadius="{DynamicResource ControlCornerRadius}"
|
||||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
TextBlock.Foreground="{TemplateBinding Foreground}">
|
||||
<ContentPresenter.Styles>
|
||||
<Style Selector="TextBlock">
|
||||
<Setter Property="TextDecorations" Value="Underline" />
|
||||
</Style>
|
||||
</ContentPresenter.Styles>
|
||||
</ContentPresenter>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.Hyperlink:pressed /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>
|
||||
<Style Selector="Button.Hyperlink:pointerover /template/ ContentPresenter#ContentPresenter">
|
||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource HyperlinkButtonForegroundPointerOver}" />
|
||||
<Setter Property="Background" Value="{DynamicResource HyperlinkButtonBackgroundPointerOver}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource HyperlinkButtonBorderBrushPointerOver}" />
|
||||
</Style>
|
||||
<Style Selector="Button.Hyperlink:pressed /template/ ContentPresenter#ContentPresenter">
|
||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource HyperlinkButtonForegroundPressed}" />
|
||||
<Setter Property="Background" Value="{DynamicResource HyperlinkButtonBackgroundPressed}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource HyperlinkButtonBorderBrushPressed}" />
|
||||
</Style>
|
||||
<Style Selector="Button.Hyperlink:disabled /template/ ContentPresenter#ContentPresenter">
|
||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource HyperlinkButtonForegroundDisabled}" />
|
||||
<Setter Property="Background" Value="{DynamicResource HyperlinkButtonBackgroundDisabled}" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource HyperlinkButtonBorderBrushDisabled}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.flatbutton">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
</Style>
|
||||
<Style Selector="Button.flatbutton:pointerover /template/ ContentPresenter">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="Button.flatbutton:pressed /template/ ContentPresenter">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
</Style>
|
||||
<!--<Style Selector="Button.Hyperlink:pointerover /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource HyperlinkButtonBackground}" />
|
||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource HyperlinkButtonForeground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.action /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource ThemeAccentBrushKey}" />
|
||||
<Setter Property="Padding" Value="20 10" />
|
||||
<Setter Property="TextBlock.Foreground" Value="#FFFFFFFF" />
|
||||
</Style>
|
||||
<Style Selector="Button.action:pointerover /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource ThemeAccentPointerOverBrushKey}" />
|
||||
</Style>
|
||||
<Style Selector="Button.action:pressed /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource ThemeAccentPressedBrushKey}" />
|
||||
</Style>
|
||||
<Style Selector="Button.action:disabled /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource ThemeAccentDisabledBrushKey}" />
|
||||
</Style>
|
||||
<Style Selector="Button.Hyperlink:pressed /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>-->
|
||||
|
||||
<Style Selector="Button.plain">
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="Button.plain /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>
|
||||
<Style Selector="Button.flatbutton">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
</Style>
|
||||
<Style Selector="Button.flatbutton:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="Button.flatbutton:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="Button.flatbutton:pressed /template/ ContentPresenter#BorderElement">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="Button.flatbutton:pointerover /template/ ContentPresenter#BorderElement">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
</Style>
|
||||
|
||||
|
||||
<Style Selector="Button.action /template/ Border#BorderElement">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource AccentButtonBorderBrush}" />
|
||||
</Style>
|
||||
<Style Selector="Button.action /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource AccentButtonBackground}" />
|
||||
<!--<Setter Property="BorderBrush" Value="{DynamicResource AccentButtonBorderBrush}" />-->
|
||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource AccentButtonForeground}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.action:pointerover /template/ Border#BorderElement">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource AccentButtonBorderBrushPointerOver}" />
|
||||
</Style>
|
||||
<Style Selector="Button.action:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource AccentButtonBackgroundPointerOver}" />
|
||||
<!--<Setter Property="BorderBrush" Value="{DynamicResource AccentButtonBorderBrushPointerOver}" />-->
|
||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource AccentButtonForegroundPointerOver}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.action:pressed /template/ Border#BorderElement">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource AccentButtonBorderBrushPressed}" />
|
||||
</Style>
|
||||
<Style Selector="Button.action:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource AccentButtonBackgroundPressed}" />
|
||||
<!--<Setter Property="BorderBrush" Value="{DynamicResource AccentButtonBorderBrushPressed}" />-->
|
||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource AccentButtonForegroundPressed}" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.action:disabled /template/ Border#BorderElement">
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource AccentButtonBorderBrushDisabled}" />
|
||||
</Style>
|
||||
<Style Selector="Button.action:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource AccentButtonBackgroundDisabled}" />
|
||||
<!--<Setter Property="BorderBrush" Value="{DynamicResource AccentButtonBorderBrushDisabled}" />-->
|
||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource AccentButtonForegroundDisabled}" />
|
||||
</Style>
|
||||
|
||||
<!--<Style Selector="Button.action /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource SystemAccentColor}" />
|
||||
<Setter Property="Padding" Value="20 10" />
|
||||
<Setter Property="TextBlock.Foreground" Value="#FFFFFFFF" />
|
||||
</Style>
|
||||
<Style Selector="Button.action:pointerover /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource ThemeAccentPointerOverBrushKey}" />
|
||||
</Style>
|
||||
<Style Selector="Button.action:pressed /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource ThemeAccentPressedBrushKey}" />
|
||||
</Style>
|
||||
<Style Selector="Button.action:disabled /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource ThemeAccentDisabledBrushKey}" />
|
||||
</Style>-->
|
||||
|
||||
<Style Selector="Button.plain">
|
||||
<Setter Property="VerticalAlignment" Value="Stretch" />
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch" />
|
||||
<Setter Property="Cursor" Value="Hand" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
</Style>
|
||||
<Style Selector="Button.plain /template/ ContentPresenter">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="Button.clip">
|
||||
<Setter Property="Background" Value="Transparent" />
|
||||
@@ -99,4 +191,9 @@
|
||||
<Setter Property="Width" Value="30" />
|
||||
<Setter Property="CornerRadius" Value="15" />
|
||||
</Style>
|
||||
|
||||
|
||||
<Style Selector="ToggleButton">
|
||||
<Setter Property="BorderThickness" Value="0"/>
|
||||
</Style>
|
||||
</Styles>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<Styles xmlns="https://github.com/avaloniaui"
|
||||
<Styles xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="20" Background="White">
|
||||
@@ -55,30 +55,5 @@
|
||||
|
||||
<Style Selector="CheckBox.onlyCheckBox">
|
||||
<Setter Property="MinWidth" Value="20"></Setter>
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<Panel x:Name="RootGrid">
|
||||
<Border x:Name="PART_Border"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}" />
|
||||
|
||||
<Panel VerticalAlignment="Top" Height="32" Width="20">
|
||||
<Border x:Name="NormalRectangle"
|
||||
BorderThickness="{DynamicResource CheckBoxBorderThemeThickness}"
|
||||
UseLayoutRounding="False"
|
||||
Height="20"
|
||||
Width="20" />
|
||||
|
||||
<Viewbox UseLayoutRounding="False">
|
||||
<Panel>
|
||||
<Panel Height="16" Width="16" />
|
||||
<Path x:Name="CheckGlyph" Stretch="Uniform" VerticalAlignment="Center" />
|
||||
</Panel>
|
||||
</Viewbox>
|
||||
</Panel>
|
||||
</Panel>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
</Styles>
|
||||
|
||||
@@ -18,15 +18,25 @@
|
||||
</Styles.Resources>
|
||||
|
||||
<Style Selector="ListBox.metro ListBoxItem">
|
||||
<Setter Property="Padding" Value="0 0 0 0"></Setter>
|
||||
<Setter Property="Padding" Value="0"></Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="ListBox.metro ListBoxItem /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="CornerRadius" Value="0"></Setter>
|
||||
</Style>
|
||||
<Style Selector="ListBox.metro ListBoxItem /template/ Border#SelectionIndicator">
|
||||
<Setter Property="CornerRadius" Value="0"></Setter>
|
||||
</Style>
|
||||
|
||||
<!-- Disabled State -->
|
||||
<!--
|
||||
<Style Selector="ListBox.metro ListBoxItem:disabled /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource SystemControlDisabledBaseMediumLowBrush}" />
|
||||
</Style>
|
||||
|
||||
-->
|
||||
<!-- PointerOver State -->
|
||||
<!--
|
||||
<Style Selector="ListBox.metro ListBoxItem:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource SystemControlHighlightListLowBrush}" />
|
||||
</Style>
|
||||
@@ -34,7 +44,9 @@
|
||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource SystemControlHighlightAltBaseHighBrush}" />
|
||||
</Style>
|
||||
|
||||
-->
|
||||
<!-- Pressed State -->
|
||||
<!--
|
||||
<Style Selector="ListBox.metro ListBoxItem:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource SystemControlHighlightListMediumBrush}" />
|
||||
</Style>
|
||||
@@ -42,7 +54,9 @@
|
||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource SystemControlHighlightAltBaseHighBrush}" />
|
||||
</Style>
|
||||
|
||||
-->
|
||||
<!-- Selected State -->
|
||||
<!--
|
||||
<Style Selector="ListBox.metro ListBoxItem:selected /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundPointerOver}" />
|
||||
</Style>
|
||||
@@ -53,7 +67,9 @@
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource SystemControlHighlightListAccentLowBrush}" />
|
||||
</Style>
|
||||
|
||||
-->
|
||||
<!-- Selected Unfocused State -->
|
||||
<!--
|
||||
<Style Selector="ListBox.metro ListBoxItem:selected:not(:focus) /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundPointerOver}" />
|
||||
</Style>
|
||||
@@ -64,7 +80,9 @@
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource SystemControlHighlightListAccentLowBrush}" />
|
||||
</Style>
|
||||
|
||||
-->
|
||||
<!-- Selected PointerOver State -->
|
||||
<!--
|
||||
<Style Selector="ListBox.metro ListBoxItem:selected:pointerover /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource SystemControlHighlightListMediumBrush}" />
|
||||
</Style>
|
||||
@@ -72,11 +90,13 @@
|
||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource SystemControlHighlightAltBaseHighBrush}" />
|
||||
</Style>
|
||||
|
||||
-->
|
||||
<!-- Selected Pressed State -->
|
||||
<!--
|
||||
<Style Selector="ListBox.metro ListBoxItem:selected:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="Background" Value="{DynamicResource ButtonBackgroundPressed}" />
|
||||
</Style>
|
||||
<Style Selector="ListBox.metro ListBoxItem:selected:pressed /template/ ContentPresenter#PART_ContentPresenter">
|
||||
<Setter Property="TextBlock.Foreground" Value="{DynamicResource SystemControlHighlightAltBaseHighBrush}" />
|
||||
</Style>
|
||||
</Style>-->
|
||||
</Styles>
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
<Setter Property="FontSize" Value="16"></Setter>
|
||||
<Setter Property="MinHeight" Value="36"></Setter>
|
||||
</Style>
|
||||
<!--<Style Selector="TabControl.flat /template/ DockPanel">
|
||||
<Style Selector="TabControl.flat /template/ DockPanel">
|
||||
<Setter Property="Margin" Value="0 -10 0 0"></Setter>
|
||||
</Style>-->
|
||||
<Style Selector="TabControl.flat /template/ ItemsPresenter">
|
||||
<Setter Property="Margin" Value="{StaticResource PageMargin}"></Setter>
|
||||
</Style>
|
||||
<!--<Style Selector="TabControl.flat /template/ ItemsPresenter">
|
||||
<Setter Property="Margin" Value="{StaticResource PageMargin}"></Setter>
|
||||
</Style>-->
|
||||
|
||||
|
||||
<Style Selector="TabControl TabItem">
|
||||
|
||||
@@ -12,107 +12,125 @@
|
||||
</Design.PreviewWith>
|
||||
<Styles.Resources>
|
||||
<FontFamily x:Key="UnicodeFont">avares://System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Assets/Fonts#WenQuanYi Micro Hei</FontFamily>
|
||||
<Thickness x:Key="TextControlBorderThemeThickness">0,0,0,2</Thickness>
|
||||
<Thickness x:Key="TextControlBorderThemeThicknessFocused">0,0,0,2</Thickness>
|
||||
<Thickness x:Key="TextControlThemePadding">15,10,15,8</Thickness>
|
||||
|
||||
<Thickness x:Key="TextBoxIconMargin">12,0,0,0</Thickness>
|
||||
|
||||
<ContextMenu x:Key="DefaultTextBoxContextMenu" x:Name="TextBoxContextMenu">
|
||||
<MenuItem x:Name="TextBoxContextMenuCutItem" Header="{ReflectionBinding Path=Res.Cut,Mode=OneWay,Source={x:Static resx:R.Current}}" Command="{Binding $parent[TextBox].Cut}" IsEnabled="{Binding $parent[TextBox].CanCut}" InputGesture="{x:Static TextBox.CutGesture}" />
|
||||
<MenuItem x:Name="TextBoxContextMenuCopyItem" Header="{ReflectionBinding Path=Res.Copy,Mode=OneWay,Source={x:Static resx:R.Current}}" Command="{Binding $parent[TextBox].Copy}" IsEnabled="{Binding $parent[TextBox].CanCopy}" InputGesture="{x:Static TextBox.CopyGesture}"/>
|
||||
<MenuItem x:Name="TextBoxContextMenuPasteItem" Header="{ReflectionBinding Path=Res.Paste,Mode=OneWay,Source={x:Static resx:R.Current}}" Command="{Binding $parent[TextBox].Paste}" IsEnabled="{Binding $parent[TextBox].CanPaste}" InputGesture="{x:Static TextBox.PasteGesture}"/>
|
||||
<MenuItem x:Name="TextBoxContextMenuCutItem"
|
||||
Header="{ReflectionBinding Path=Res.Cut,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{Binding $parent[TextBox].Cut}"
|
||||
IsEnabled="{Binding $parent[TextBox].CanCut}"
|
||||
InputGesture="{x:Static TextBox.CutGesture}" />
|
||||
<MenuItem x:Name="TextBoxContextMenuCopyItem"
|
||||
Header="{ReflectionBinding Path=Res.Copy,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{Binding $parent[TextBox].Copy}"
|
||||
IsEnabled="{Binding $parent[TextBox].CanCopy}"
|
||||
InputGesture="{x:Static TextBox.CopyGesture}"/>
|
||||
<MenuItem x:Name="TextBoxContextMenuPasteItem"
|
||||
Header="{ReflectionBinding Path=Res.Paste,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{Binding $parent[TextBox].Paste}"
|
||||
IsEnabled="{Binding $parent[TextBox].CanPaste}"
|
||||
InputGesture="{x:Static TextBox.PasteGesture}"/>
|
||||
<MenuItem Header="-"/>
|
||||
<MenuItem x:Name="TextBoxContextMenuSelectAllItem"
|
||||
Header="{ReflectionBinding Path=Res.SelectAll,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{Binding $parent[TextBox].SelectAll}"
|
||||
IsEnabled="{Binding $parent[TextBox].Text,Converter={StaticResource IsNullConverter},ConverterParameter=invert}"
|
||||
InputGesture="Ctrl + A"/>
|
||||
</ContextMenu>
|
||||
</Styles.Resources>
|
||||
|
||||
<Style Selector="PathIcon.TextBoxIcon">
|
||||
<Setter Property="Height" Value="18"/>
|
||||
<Setter Property="Width" Value="18"/>
|
||||
<Setter Property="Opacity" Value="0.8"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Left"/>
|
||||
<Setter Property="Margin" Value="{StaticResource TextBoxIconMargin}"/>
|
||||
</Style>
|
||||
|
||||
<Style Selector="TextBox">
|
||||
<!--<Setter Property="FontFamily" Value="Microsoft YaHei UI,Microsoft YaHei,Simsun,苹方-简,宋体-简"></Setter>-->
|
||||
<!--<Setter Property="FontFamily" Value="avares://System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Assets/Fonts#WenQuanYi Micro Hei" />-->
|
||||
<!--<Setter Property="FontFamily" Value="{StaticResource UnicodeFont}" />-->
|
||||
<Setter Property="MinHeight" Value="38"/>
|
||||
<Setter Property="ContextMenu" Value="{StaticResource DefaultTextBoxContextMenu}" />
|
||||
|
||||
<Setter Property="Template">
|
||||
<ControlTemplate>
|
||||
<DockPanel>
|
||||
<DataValidationErrors>
|
||||
<Panel>
|
||||
<!-- This is flipped (scaleY(-1)) for the elevation brush effect
|
||||
-->
|
||||
<Border
|
||||
Name="PART_BorderElement"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
MinWidth="{TemplateBinding MinWidth}"
|
||||
MinHeight="{TemplateBinding MinHeight}"
|
||||
RenderTransform="scaleY(-1)">
|
||||
</Border>
|
||||
|
||||
<!--TODO bind Content -> Header and ContentTemplate -> HeaderTemplate-->
|
||||
<!--<ContentPresenter x:Name="PART_HeaderContentPresenter"
|
||||
DockPanel.Dock="Top"
|
||||
TextBlock.FontWeight="Normal"
|
||||
TextBlock.Foreground="{DynamicResource TextControlHeaderForeground}"
|
||||
IsVisible="False"
|
||||
Margin="{DynamicResource TextBoxTopHeaderMargin}" />-->
|
||||
|
||||
<!--<DataValidationErrors DockPanel.Dock="Bottom" Margin="0 10 0 0" />-->
|
||||
|
||||
<DockPanel>
|
||||
<!--<PathIcon Classes="checkMark checkMarkDataValidation" Margin="15 0" VerticalAlignment="Center" DockPanel.Dock="Right">
|
||||
</PathIcon>
|
||||
<PathIcon Classes="checkMark checkMarkBoolean"
|
||||
Margin="15 0"
|
||||
VerticalAlignment="Cenr"
|
||||
DockPanel.Dock="Right"
|
||||
Opacity="{Binding (validation:CheckMarkStatus.IsEnabled), RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static conv:BoolOpacityConverters.BoolToOpacity}}" />-->
|
||||
<Panel>
|
||||
<Border
|
||||
Name="PART_BorderElement"
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}"
|
||||
MinWidth="{TemplateBinding MinWidth}"
|
||||
MinHeight="{TemplateBinding MinHeight}">
|
||||
</Border>
|
||||
|
||||
<Border
|
||||
Margin="{TemplateBinding BorderThickness}">
|
||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
||||
<ContentPresenter Grid.Column="0" Grid.ColumnSpan="1" Content="{TemplateBinding InnerLeftContent}" />
|
||||
<DockPanel x:Name="PART_InnerDockPanel" Grid.Column="1" Grid.ColumnSpan="1" Margin="{TemplateBinding Padding}">
|
||||
<TextBlock Name="PART_FloatingWatermark"
|
||||
Foreground="{DynamicResource SystemAccentColor}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
Text="{TemplateBinding Watermark}"
|
||||
Margin="0 0 0 10"
|
||||
DockPanel.Dock="Top" />
|
||||
<ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
|
||||
VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}">
|
||||
<Panel>
|
||||
<TextBlock Name="PART_Watermark"
|
||||
Opacity="0.5"
|
||||
Text="{TemplateBinding Watermark}"
|
||||
TextAlignment="{TemplateBinding TextAlignment}"
|
||||
TextWrapping="{TemplateBinding TextWrapping}"
|
||||
IsVisible="{TemplateBinding Text, Converter={x:Static StringConverters.IsNullOrEmpty}}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
||||
<TextPresenter Name="PART_TextPresenter"
|
||||
FontFamily="{StaticResource UnicodeFont}"
|
||||
Text="{TemplateBinding Text, Mode=TwoWay}"
|
||||
CaretIndex="{TemplateBinding CaretIndex}"
|
||||
SelectionStart="{TemplateBinding SelectionStart}"
|
||||
SelectionEnd="{TemplateBinding SelectionEnd}"
|
||||
<Border
|
||||
Margin="{TemplateBinding BorderThickness}">
|
||||
<Grid ColumnDefinitions="Auto,*,Auto" >
|
||||
<ContentPresenter Grid.Column="0" Grid.ColumnSpan="1" Content="{TemplateBinding InnerLeftContent}"/>
|
||||
<DockPanel x:Name="PART_InnerDockPanel" Grid.Column="1" Grid.ColumnSpan="1" Margin="{TemplateBinding Padding}">
|
||||
<TextBlock Name="PART_FloatingWatermark"
|
||||
Foreground="{DynamicResource SystemAccentColor}"
|
||||
FontSize="{TemplateBinding FontSize}"
|
||||
Text="{TemplateBinding Watermark}"
|
||||
DockPanel.Dock="Top" />
|
||||
<ScrollViewer HorizontalScrollBarVisibility="{TemplateBinding (ScrollViewer.HorizontalScrollBarVisibility)}"
|
||||
VerticalScrollBarVisibility="{TemplateBinding (ScrollViewer.VerticalScrollBarVisibility)}">
|
||||
<Panel>
|
||||
<TextBlock Name="PART_Watermark"
|
||||
Text="{TemplateBinding Watermark}"
|
||||
TextAlignment="{TemplateBinding TextAlignment}"
|
||||
TextWrapping="{TemplateBinding TextWrapping}"
|
||||
PasswordChar="{TemplateBinding PasswordChar}"
|
||||
RevealPassword="{TemplateBinding RevealPassword}"
|
||||
SelectionBrush="{TemplateBinding SelectionBrush}"
|
||||
SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}"
|
||||
CaretBrush="{TemplateBinding CaretBrush}"
|
||||
IsVisible="{TemplateBinding Text, Converter={x:Static StringConverters.IsNullOrEmpty}}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
|
||||
</Panel>
|
||||
</ScrollViewer>
|
||||
</DockPanel>
|
||||
<ContentPresenter Grid.Column="2" Grid.ColumnSpan="1" Content="{TemplateBinding InnerRightContent}" />
|
||||
</Grid>
|
||||
</Border>
|
||||
</Panel>
|
||||
</DockPanel>
|
||||
</DockPanel>
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
|
||||
IsHitTestVisible="False"/>
|
||||
<TextPresenter Name="PART_TextPresenter"
|
||||
FontFamily="{StaticResource UnicodeFont}"
|
||||
Text="{TemplateBinding Text, Mode=TwoWay}"
|
||||
CaretIndex="{TemplateBinding CaretIndex}"
|
||||
SelectionStart="{TemplateBinding SelectionStart}"
|
||||
SelectionEnd="{TemplateBinding SelectionEnd}"
|
||||
TextAlignment="{TemplateBinding TextAlignment}"
|
||||
TextWrapping="{TemplateBinding TextWrapping}"
|
||||
PasswordChar="{TemplateBinding PasswordChar}"
|
||||
RevealPassword="{TemplateBinding RevealPassword}"
|
||||
SelectionBrush="{TemplateBinding SelectionBrush}"
|
||||
SelectionForegroundBrush="{TemplateBinding SelectionForegroundBrush}"
|
||||
CaretBrush="{TemplateBinding CaretBrush}"
|
||||
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
|
||||
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
|
||||
</Panel>
|
||||
</ScrollViewer>
|
||||
</DockPanel>
|
||||
<ContentPresenter Grid.Column="2" Grid.ColumnSpan="1" Content="{TemplateBinding InnerRightContent}"/>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Panel>
|
||||
</DataValidationErrors>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="TextBox /template/ Border#PART_BorderElement">
|
||||
<Style Selector="TextBox[AcceptsReturn=False]">
|
||||
<Setter Property="VerticalContentAlignment" Value="Center">
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
<!--<Style Selector="TextBox /template/ Border#PART_BorderElement">
|
||||
<Setter Property="CornerRadius" Value="0" />
|
||||
</Style>
|
||||
|
||||
-->
|
||||
<!-- TODO: temporary fix to prevent layout issue when error occurs -->
|
||||
<!--
|
||||
<Style Selector="TextBox /template/ DataValidationErrors">
|
||||
<Setter Property="MinHeight" Value="20" />
|
||||
</Style>
|
||||
@@ -165,8 +183,8 @@
|
||||
</ScrollViewer>
|
||||
</ControlTemplate>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
</Style>-->
|
||||
|
||||
<Style Selector="TextBox.revealPasswordButton[AcceptsReturn=False]:not(TextBox:empty)">
|
||||
<Setter Property="InnerRightContent">
|
||||
<Template>
|
||||
@@ -175,8 +193,8 @@
|
||||
</Template>
|
||||
</Setter>
|
||||
</Style>
|
||||
|
||||
|
||||
|
||||
|
||||
<Style Selector="TextBox.readonlybox">
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<Styles xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||
<Design.PreviewWith>
|
||||
<Border Padding="20" Background="White">
|
||||
</Border>
|
||||
</Design.PreviewWith>
|
||||
|
||||
<Styles.Resources>
|
||||
<x:Double x:Key="ToggleSwitchThemeMinWidth">0</x:Double>
|
||||
</Styles.Resources>
|
||||
|
||||
<Style Selector="ToggleSwitch.onlyToggleSwitch">
|
||||
<Setter Property="Content" Value=""></Setter>
|
||||
<Setter Property="OffContent" Value=""></Setter>
|
||||
<Setter Property="OnContent" Value=""></Setter>
|
||||
<Setter Property="Width" Value="40"></Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="RadioButton">
|
||||
<Setter Property="MinWidth" Value="0" />
|
||||
</Style>
|
||||
</Styles>
|
||||
@@ -26,7 +26,7 @@
|
||||
<StreamGeometry x:Key="QRCodeDrawing">
|
||||
M10.75 15C11.9926 15 13 16.0074 13 17.25V22.75C13 23.9926 11.9926 25 10.75 25H5.25C4.00736 25 3 23.9926 3 22.75V17.25C3 16.0074 4.00736 15 5.25 15H10.75ZM18.3347 15V18.3333H21.6671V21.6667L18.3347 21.6661V24.9994H15.0014V21.6661L18.3338 21.6667V18.3333H15.0014V15H18.3347ZM25.0004 21.6661V24.9994H21.6671V21.6661H25.0004ZM10.75 16.5H5.25C4.83579 16.5 4.5 16.8358 4.5 17.25V22.75C4.5 23.1642 4.83579 23.5 5.25 23.5H10.75C11.1642 23.5 11.5 23.1642 11.5 22.75V17.25C11.5 16.8358 11.1642 16.5 10.75 16.5ZM9.5 18.5V21.5H6.5V18.5H9.5ZM25.0004 15V18.3333H21.6671V15H25.0004ZM10.75 3C11.9926 3 13 4.00736 13 5.25V10.75C13 11.9926 11.9926 13 10.75 13H5.25C4.00736 13 3 11.9926 3 10.75V5.25C3 4.00736 4.00736 3 5.25 3H10.75ZM22.75 3C23.9926 3 25 4.00736 25 5.25V10.75C25 11.9926 23.9926 13 22.75 13H17.25C16.0074 13 15 11.9926 15 10.75V5.25C15 4.00736 16.0074 3 17.25 3H22.75ZM10.75 4.5H5.25C4.83579 4.5 4.5 4.83579 4.5 5.25V10.75C4.5 11.1642 4.83579 11.5 5.25 11.5H10.75C11.1642 11.5 11.5 11.1642 11.5 10.75V5.25C11.5 4.83579 11.1642 4.5 10.75 4.5ZM22.75 4.5H17.25C16.8358 4.5 16.5 4.83579 16.5 5.25V10.75C16.5 11.1642 16.8358 11.5 17.25 11.5H22.75C23.1642 11.5 23.5 11.1642 23.5 10.75V5.25C23.5 4.83579 23.1642 4.5 22.75 4.5ZM9.5 6.5V9.5H6.5V6.5H9.5ZM21.5 6.5V9.5H18.5V6.5H21.5Z
|
||||
</StreamGeometry>
|
||||
|
||||
|
||||
<StreamGeometry x:Key="WindowDrawing">
|
||||
M5.49707 3C4.11636 3 2.99707 4.11929 2.99707 5.5V14.5C2.99707 15.8807 4.11636 17 5.49707 17H14.4971C15.8778 17 16.9971 15.8807 16.9971 14.5V7H3V6H16.9971V5.5C16.9971 4.11929 15.8778 3 14.4971 3H5.49707Z
|
||||
</StreamGeometry>
|
||||
@@ -234,48 +234,86 @@
|
||||
<StreamGeometry x:Key="InfoDrawing">
|
||||
M14,2 C20.6274,2 26,7.37258 26,14 C26,20.6274 20.6274,26 14,26 C7.37258,26 2,20.6274 2,14 C2,7.37258 7.37258,2 14,2 Z M14,3.5 C8.20101,3.5 3.5,8.20101 3.5,14 C3.5,19.799 8.20101,24.5 14,24.5 C19.799,24.5 24.5,19.799 24.5,14 C24.5,8.20101 19.799,3.5 14,3.5 Z M14,11 C14.3796833,11 14.6934889,11.2821653 14.7431531,11.6482323 L14.75,11.75 L14.75,19.25 C14.75,19.6642 14.4142,20 14,20 C13.6203167,20 13.3065111,19.7178347 13.2568469,19.3517677 L13.25,19.25 L13.25,11.75 C13.25,11.3358 13.5858,11 14,11 Z M14,7 C14.5523,7 15,7.44772 15,8 C15,8.55228 14.5523,9 14,9 C13.4477,9 13,8.55228 13,8 C13,7.44772 13.4477,7 14,7 Z
|
||||
</StreamGeometry>
|
||||
|
||||
|
||||
<StreamGeometry x:Key="ClockArrowDownloadDrawing">
|
||||
M3 9.5C3 5.35786 6.35786 2 10.5 2C14.6421 2 18 5.35786 18 9.5C18 13.6421 14.6421 17 10.5 17C10.4668 17 10.4336 16.9998 10.4005 16.9994C10.5633 16.6808 10.6959 16.3442 10.7947 15.9934C14.2478 15.8394 17 12.9911 17 9.5C17 5.91015 14.0899 3 10.5 3C7.00897 3 4.16073 5.75214 4.00657 9.20514C3.6558 9.30386 3.31924 9.43651 3.00064 9.5993C3.00022 9.56625 3 9.53315 3 9.5ZM10.5 5C10.7761 5 11 5.22386 11 5.5V9H13.5C13.7761 9 14 9.22386 14 9.5C14 9.77614 13.7761 10 13.5 10H10.5C10.2239 10 10 9.77614 10 9.5V5.5C10 5.22386 10.2239 5 10.5 5ZM5 10.0275C2.75002 10.2762 1 12.1837 1 14.5C1 16.9853 3.01472 19 5.5 19C7.98528 19 10 16.9853 10 14.5C10 12.1837 8.24998 10.2762 6 10.0275V13.7929L6.64645 13.1464C6.84171 12.9512 7.15829 12.9512 7.35355 13.1464C7.54882 13.3417 7.54882 13.6583 7.35355 13.8536L5.85355 15.3536C5.65829 15.5488 5.34171 15.5488 5.14645 15.3536L3.64645 13.8536C3.45118 13.6583 3.45118 13.3417 3.64645 13.1464C3.84171 12.9512 4.15829 12.9512 4.35355 13.1464L5 13.7929V10.0275ZM3.5 16H7.5C7.77614 16 8 16.2239 8 16.5C8 16.7761 7.77614 17 7.5 17H3.5C3.22386 17 3 16.7761 3 16.5C3 16.2239 3.22386 16 3.5 16Z
|
||||
</StreamGeometry>
|
||||
|
||||
<!--菜单图标-->
|
||||
<StreamGeometry x:Key="LocalAuthPageSvg">
|
||||
M512 960.16002l-9.515724-3.685949C196.871833 838.349743 161.529907 683.948187 161.529907 578.089208L161.529907 173.769672l27.282367 0.935302c212.432227 7.233752 302.889425-88.641853 303.741839-89.577155l19.472494-21.286816 19.444864 21.286816c0.715291 0.77055 86.441744 89.961918 281.052071 89.961918 0 0 0 0 0.027629 0 7.398504 0 14.96176-0.110517 22.63451-0.384763l27.282367-0.935302L862.468047 578.089208c0 105.85898-35.340903 260.259512-340.953346 378.384863L512 960.16002zM214.281341 227.840148 214.281341 578.089208c0 56.930617 0.027629 207.234855 297.718659 325.4697C809.718659 785.324062 809.718659 635.019825 809.718659 578.089208l0-350.249059c-164.852582-0.632403-259.709997-59.296501-297.718659-89.604784C473.963709 168.516018 379.105271 227.152487 214.281341 227.840148z
|
||||
M713.318 368.64a32.222 32.222 0 0 0-45.329 0L449.195 587.435l-93.184-93.116a32.222 32.222 0 0 0-45.33 0 32.222 32.222 0 0 0 0 45.26l115.85 115.85a32.29 32.29 0 0 0 45.328 0L713.32 413.9a32.222 32.222 0 0 0 0-45.33z
|
||||
</StreamGeometry>
|
||||
<DrawingGroup x:Key="LocalAuthPageSvg">
|
||||
<GeometryDrawing Brush="#D2EEFF" Geometry="M512 914.432l-2.048-0.512c-333.824-111.104-330.24-415.744-329.728-428.544V179.712h10.752c187.904 0 284.672-45.568 317.952-65.024l3.584-2.048 3.584 2.048c32.768 19.456 129.536 65.024 317.952 65.024h10.752v305.152c0 3.584-8.704 323.584-329.728 428.544l-3.072 1.024z"/>
|
||||
<GeometryDrawing Brush="#5090F3" Geometry="M934.912 89.088c-4.608-4.608-11.776-7.168-18.944-7.168-275.456 6.144-386.048-75.264-386.56-75.776-9.216-7.68-24.064-7.68-33.28 0-1.536 0-103.936 75.776-357.376 75.776-9.728 0-19.968 0-30.72-0.512-7.68 0-13.824 2.56-18.432 7.168-5.12 5.12-8.192 11.776-8.192 18.944v372.224c0 4.096-5.12 405.504 422.4 542.72 2.56 1.024 5.632 1.024 8.192 1.024s5.632-0.512 8.192-1.024c413.184-129.024 422.4-537.6 422.912-542.208V107.52c-0.512-6.656-3.072-13.824-8.192-18.432z m-45.568 45.056v346.112c0 3.584-10.24 370.176-377.344 489.984-381.952-126.976-377.856-474.624-377.856-489.472V134.144h4.096c217.6 0 331.264-51.712 373.248-76.8 42.496 25.088 155.648 76.8 373.248 76.8h4.608z"/>
|
||||
<GeometryDrawing Brush="#5090F3" Geometry="M844.288 364.032L271.872 750.592c9.728 12.8 20.48 25.088 32.256 37.376l540.16-365.056V364.032zM844.288 206.848L208.896 635.904c10.752 28.672 25.088 58.88 45.056 89.088l590.336-398.848V206.848z"/>
|
||||
</DrawingGroup>
|
||||
|
||||
<StreamGeometry x:Key="AboutPageSvg">
|
||||
M546.1 241.4c-31.5 0-57 25.4-57.2 56.9-0.2 15.1 5.9 29.7 16.8 40.1 22.3 22 58.2 22 80.6 0 22.2-22.2 22.2-58.1 0-80.3-10.7-10.7-25.2-16.7-40.2-16.7z m19.3 515.1c-11.2 0-18.9-2.6-23.5-7.9-4.6-5.3-6.7-15.1-6.7-29.5 0.2-8.6 0.9-17.1 2.1-25.6 1.4-11.3 2.9-21.3 4.7-29.9l21.5-109.1c2.2-10.9 3.6-21.9 4.3-33 0.8-12 1.2-20.3 1.2-25.1 0-23-5.7-41.9-17-56.2-11.3-14.3-27.2-21.6-48-21.6-11.5 0-23.7 3.1-36.6 8.9-12.8 6-26.4 12.9-40.5 21.3l-5.7 33.8c4.8-2.7 9.8-5.1 15-7.2 5.4-2.5 11.3-3.8 17.2-3.8 11.3 0 19 2.8 23 8.4s6 15.1 6 29.2c-0.1 8.6-0.7 17.1-1.9 25.6-1.3 9.3-2.9 19.4-4.8 29.9l-21.5 109.6c-1.9 11.5-3.4 21.8-4.2 30.9-0.8 9.1-1.3 17.9-1.3 26.8 0 22.5 5.8 41 17.3 55.7 11.7 14.6 27.9 21.8 48.8 21.8 13.6 0 25.5-2.6 35.8-7.6s24.1-12.5 41.3-22.3l5.7-33.8c-4.6 2.8-9.4 5.1-14.3 7-5.8 2.2-11.8 3.6-17.9 3.7z
|
||||
M517.1 2C238.3 2 2 239.8 2 518.1S238.3 1022 517.1 1022 1022 796.4 1022 518.1 795.9 2 517.1 2z m-4.9 962.3c-248.5 0-450-201.4-450-450s201.4-450 450-450 450 201.5 450 450-201.4 450-450 450z
|
||||
</StreamGeometry>
|
||||
<DrawingGroup x:Key="AboutPageSvg">
|
||||
<GeometryDrawing Brush="#2196F3" Geometry="M789.333333 853.333333H234.666667l-128 128V256c0-70.4 57.6-128 128-128h554.666666c70.4 0 128 57.6 128 128v469.333333c0 70.4-57.6 128-128 128z"/>
|
||||
<GeometryDrawing Brush="#FFFFFF" Geometry="M469.333333 426.666667h85.333334v234.666666h-85.333334z"/>
|
||||
<GeometryDrawing Brush="#FFFFFF" Geometry="M512 320m-42.666667 0a42.666667 42.666667 0 1 0 85.333334 0 42.666667 42.666667 0 1 0-85.333334 0Z"/>
|
||||
</DrawingGroup>
|
||||
|
||||
<StreamGeometry x:Key="ProxyScriptManagePageSvg">
|
||||
M942 703.9v-50h-81.8c-4.2-29.6-15.9-56.9-33.1-79.8l57.8-57.8-35.3-35.3-57.8 57.8c-22.9-17.2-50.2-28.8-79.8-33.1v-81.8h-50v81.8c-29.6 4.2-56.9 15.9-79.8 33.1L524.3 481 489 516.3l57.8 57.8c-17.2 22.9-28.8 50.2-33.1 79.8H432v50h81.8c4.2 29.6 15.9 56.9 33.1 79.8L489 841.6l35.4 35.4 57.8-57.8c22.9 17.2 50.2 28.8 79.8 33.1v81.8h50v-81.8c29.6-4.2 56.9-15.9 79.8-33.1l57.8 57.8 35.4-35.4-57.8-57.8c17.2-22.9 28.8-50.2 33.1-79.8H942z m-131.3-7c-2.9 20.6-11.1 40.2-23.6 56.9l-10.8 14.5-14.5 10.8c-16.7 12.5-36.3 20.6-56.9 23.6l-17.9 2.6-17.9-2.6c-20.6-2.9-40.2-11.1-56.9-23.6l-14.5-10.8-10.8-14.5c-12.5-16.7-20.6-36.3-23.6-56.9l-2.6-17.9 2.6-17.9c2.9-20.6 11.1-40.2 23.6-56.9l10.8-14.5 14.5-10.8c16.7-12.5 36.3-20.6 56.9-23.6l17.9-2.6 17.9 2.6c20.6 2.9 40.2 11.1 56.9 23.6l14.5 10.8 10.8 14.5c12.5 16.7 20.6 36.3 23.6 56.9l2.6 17.9-2.6 17.9zM374 848.1h-96.3l-57.1-639.3c-1.4-17.9 4.6-35 16.8-48.2 12.2-13.2 28.9-20.5 46.9-20.5h19c23.4 26.3 37.7 61 37.7 99 0 25.7-6.5 49.9-18 71h414.4l6.5 58h50.3l-6.5-58H926v-57c0-90-73-163-163-163H284.3c-66.5 0-118.8 56.7-113.5 122.9l42.3 473.1H83l-1 54c0 84.6 66.4 153.6 150 157.8v0.2h142v-50z m169-708h220c30.2 0 58.6 11.8 79.9 33.1s33.1 49.7 33.1 79.9v7H389.9c0.7-7 1.1-14 1.1-21 0-36-9.4-69.8-26-99h178zM163.7 816.4c-20.3-20.3-31.5-47.3-31.6-76l0.1-4.4h85.4l9.9 111.3c-24.1-2.7-46.4-13.5-63.8-30.9z
|
||||
</StreamGeometry>
|
||||
<DrawingGroup x:Key="ProxyScriptManagePageSvg">
|
||||
<GeometryDrawing Brush="#E9EDED" Geometry="M847.872 240.128v688c0 26.56-21.408 48-48 48h-576c-26.56 0-48-21.44-48-48v-832c0-26.592 21.44-48 48-48h432z"/>
|
||||
<GeometryDrawing Brush="#25B39E" Geometry="M160 768.128v160c0 35.456 28.544 64 64 64h576c35.456 0 64-28.544 64-64v-160H160z"/>
|
||||
<GeometryDrawing Brush="#25B39E" Geometry="M847.872 240.128h-144c-26.56 0-48-21.44-48-48v-144"/>
|
||||
<GeometryDrawing Brush="#25B39E" Geometry="M432.256 320.128c-35.2 0-64 28.8-64 64v32c0 18.016-14.016 32-32 32a16 16 0 0 0-3.2 0.256 16 16 0 0 0-12.384 11.232 16 16 0 0 0-0.352 1.504 16 16 0 0 0 0 0.064 16 16 0 0 0 15.936 18.944c17.984 0 32 13.984 32 32v32c0 35.2 28.8 64 64 64a16 16 0 1 0 0-32c-18.016 0-32-13.984-32-32v-32c0-19.136-8.736-36.256-22.208-48a63.68 63.68 0 0 0 22.208-48v-32c0-18.016 13.984-32 32-32a16 16 0 1 0 0-32z m157.856 0a16 16 0 0 0 1.632 32c18.016 0 32 13.984 32 32v32c0 19.168 8.736 36.224 22.208 48-13.44 11.744-22.208 28.864-22.208 48v32c0 18.016-13.984 32-32 32a16 16 0 1 0 0 32c35.2 0 64-28.8 64-64v-32c0-18.016 14.016-32 32-32a16 16 0 0 0 10.368-3.616 16 16 0 0 0 1.216-1.152 16 16 0 0 0-11.584-27.232c-17.984 0-32-13.984-32-32v-32c0-35.2-28.8-64-64-64a16 16 0 0 0-1.6 0zM512 367.936a32 32 0 0 0-32 32 32 32 0 0 0 32 32 32 32 0 0 0 32-32 32 32 0 0 0-32-32z m0 96a32 32 0 0 0-32 32 32 32 0 0 0 16.256 27.872l-14.4 28.864a16 16 0 1 0 28.64 14.272l24-48.256a32 32 0 0 0 9.44-21.504 16 16 0 0 0 0-0.192 32 32 0 0 0 0.064-1.056 32 32 0 0 0-32-32z"/>
|
||||
<GeometryDrawing Brush="#E9EDED" Geometry="M335.872 800a16 16 0 0 0-15.744 16.256V912c0 9.152-6.848 16-16 16a15.616 15.616 0 0 1-16-16 16 16 0 0 0-16.256-16.192 16 16 0 0 0-15.744 16.192c0 26.304 21.696 48 48 48 24.768 0 45.12-19.296 47.488-43.52a16 16 0 0 0 0.512-4.224v-96a16 16 0 0 0-16.256-16.256z m94.4 0.128a16 16 0 0 0-2.016 0.384c-24.64 1.92-44.384 22.528-44.384 47.616 0 25.28 20.096 46.08 44.992 47.68a16 16 0 0 0 3.008 0.32h32c9.152 0 16 6.848 16 16 0 9.152-6.848 16-16 16h-64a16 16 0 1 0 0 32h64a16 16 0 0 0 3.328-0.384 48.096 48.096 0 0 0 44.672-47.616c0-25.152-19.84-45.888-44.544-47.68a16 16 0 0 0-3.456-0.32h-30.88a16 16 0 0 0-1.12 0 15.616 15.616 0 0 1-16-16c0-9.152 6.848-16 16-16h64a16 16 0 1 0 0-32h-62.88a16 16 0 0 0-1.12 0 16 16 0 0 0-1.6 0z"/>
|
||||
</DrawingGroup>
|
||||
|
||||
<StreamGeometry x:Key="GameListPageSvg">
|
||||
M697.9 459.8m-98.9 0a98.9 98.9 0 1 0 197.8 0 98.9 98.9 0 1 0-197.8 0Z
|
||||
M418.1 429.4h-57.2c-2.6 0-4.7-2.1-4.7-4.7v-58.1c0-2.6-2.1-4.7-4.7-4.7H299c-2.6 0-4.7 2.1-4.7 4.7v58.1c0 2.6-2.1 4.7-4.7 4.7h-58.1c-2.6 0-4.7 2.1-4.7 4.7v51.6c0 2.6 2.1 4.7 4.7 4.7h58.1c2.6 0 4.7 2.1 4.7 4.7v58.1c0 2.6 2.1 4.7 4.7 4.7h52.5c2.6 0 4.7-2.1 4.7-4.7V496c0-2.6 2.1-4.7 4.7-4.7h57.2c2.6 0 4.7-2.1 4.7-4.7v-52.5c0-2.6-2.1-4.7-4.7-4.7zM174.3 797.7c-4.6 0-9.3-0.3-13.9-0.9-19.2-2.5-37.6-10.1-53.2-22s-27.8-27.7-35.3-45.6c-8-19.1-10.3-40.1-6.8-61l41.6-248.5c8.9-53.3 36.6-101.9 77.8-136.8 41.2-34.9 93.7-54.1 147.8-54.1h356.4c54 0 106.5 19.2 147.8 54.1 41.2 34.9 68.9 83.5 77.8 136.8l41.6 248.5c3.5 20.9 1.1 42-6.8 61-7.5 17.9-19.7 33.6-35.3 45.6-15.6 11.9-34 19.5-53.2 22-20.5 2.7-41.4-0.6-60.6-9.5l-1.5-0.7-163.1-109.3c-75.9-51-174-51-250 0L222.5 786.6l-1.5 0.7c-14.8 6.8-30.8 10.4-46.7 10.4z m157.9-526.9c-91.6 0-169 65.5-184.1 155.9l-41.6 248.5c-4.3 25.7 5.5 50.4 26.2 66.2 20.3 15.5 46.1 18.6 69.4 8.4l160-107.4c44-29.6 95.3-45.2 148.4-45.2s104.3 15.6 148.4 45.2l160 107.4c23.3 10.2 49.1 7 69.4-8.4 20.7-15.8 30.5-40.6 26.2-66.2l-41.6-248.5c-15.1-90.3-92.6-155.9-184.1-155.9H332.2z
|
||||
</StreamGeometry>
|
||||
<DrawingGroup x:Key="GameListPageSvg">
|
||||
<GeometryDrawing Brush="#8C9EFF" Geometry="M912.31 414.51C843.52 269.59 725.6 195.76 648.92 249.6c-0.14 0.1-0.29 0.2-0.43 0.31-35.38 25.12-74.75 40.74-115.72 40.74h-41.54c-40.97 0-80.34-15.62-115.72-40.74-0.14-0.1-0.29-0.2-0.43-0.31-76.67-53.84-194.6 19.99-263.39 164.91-68.79 144.92-62.4 306.05 14.27 359.89 60.52 42.5 146.72 5.43 214.19-83.34 39.88-52.47 97.07-80.37 155.82-80.37h32.05c58.75 0 115.94 27.9 155.82 80.37 67.47 88.77 153.67 125.84 214.19 83.34 76.68-53.84 83.07-214.97 14.28-359.89z"/>
|
||||
<GeometryDrawing Brush="#546a79" Geometry="M32.786 30.268a4 4 0 1 0 8 0a4 4 0 1 0 -8 0z"/>
|
||||
<GeometryDrawing Brush="#ebba16" Geometry="M9.786 20.268a4 4 0 1 0 8 0a4 4 0 1 0 -8 0z"/>
|
||||
<GeometryDrawing Brush="#546a79" Geometry="M41.786 16.268a2 2 0 1 0 4 0a2 2 0 1 0 -4 0z"/>
|
||||
<GeometryDrawing Brush="#7383bf" Geometry="M37.786 20.268a2 2 0 1 0 4 0a2 2 0 1 0 -4 0z"/>
|
||||
<GeometryDrawing Brush="#d75a4a" Geometry="M45.786 20.268a2 2 0 1 0 4 0a2 2 0 1 0 -4 0z"/>
|
||||
<GeometryDrawing Brush="#61b872" Geometry="M41.786 24.268a2 2 0 1 0 4 0a2 2 0 1 0 -4 0z"/>
|
||||
<GeometryDrawing Brush="#313FA0" Geometry="M800.33 500.89m-42 0a42 42 0 1 0 84 0 42 42 0 1 0-84 0Z"/>
|
||||
<GeometryDrawing Brush="#FFD600" Geometry="M662.6 453.75m-42 0a42 42 0 1 0 84 0 42 42 0 1 0-84 0Z"/>
|
||||
<GeometryDrawing Brush="#FFFFFF" Geometry="M307.34 558.75c-11.6 0-21-9.4-21-21v-168c0-11.6 9.4-21 21-21s21 9.4 21 21v168c0 11.6-9.4 21-21 21z"/>
|
||||
<GeometryDrawing Brush="#FFFFFF" Geometry="M391.34 474.75h-168c-11.6 0-21-9.4-21-21s9.4-21 21-21h168c11.6 0 21 9.4 21 21s-9.4 21-21 21z"/>
|
||||
</DrawingGroup>
|
||||
|
||||
<StreamGeometry x:Key="GameRelatedPageSvg">
|
||||
M140.08,152.85H59.92A15.85,15.85,0,0,1,44.08,137V79.63A15.86,15.86,0,0,1,59.92,63.79H77.85V56.42a9.28,9.28,0,0,1,9.27-9.27h25.76a9.28,9.28,0,0,1,9.27,9.27v7.37h17.93a15.86,15.86,0,0,1,15.84,15.84V137A15.85,15.85,0,0,1,140.08,152.85Zm-90.6-50V137a10.44,10.44,0,0,0,10.44,10.43h80.16A10.44,10.44,0,0,0,150.52,137V102.82H113.41a14.3,14.3,0,1,1-26.77,0Zm43.21,0a8.9,8.9,0,1,0,14.67,0ZM49.48,97.41h101V79.63A10.45,10.45,0,0,0,140.08,69.2H59.92A10.45,10.45,0,0,0,49.48,79.63ZM83.26,63.79h33.48V56.42a3.86,3.86,0,0,0-3.86-3.86H87.12a3.86,3.86,0,0,0-3.86,3.86Z
|
||||
</StreamGeometry>
|
||||
<DrawingGroup x:Key="GameRelatedPageSvg">
|
||||
<GeometryDrawing Brush="#90A4AE" Geometry="M682.666667 170.666667l21.333333 42.666666v320h128V213.333333l23.04-42.666666L832 64h-128l-21.333333 106.666667z"/>
|
||||
<GeometryDrawing Brush="#B0BEC5" Geometry="M768 192c62.506667 0 64-128 64-128h-128s1.706667 128 64 128z"/>
|
||||
<GeometryDrawing Brush="#3F51B5" Geometry="M680.746667 533.333333h174.506666l38.826667 183.253334a81.92 81.92 0 0 1 1.92 17.706666V874.666667a85.333333 85.333333 0 0 1-85.333333 85.333333h-85.333334a85.333333 85.333333 0 0 1-85.333333-85.333333v-140.373334a81.92 81.92 0 0 1 1.92-17.706666z"/>
|
||||
<GeometryDrawing Brush="#5C6BC0" Geometry="M661.333333 448m21.333334 0l170.666666 0q21.333333 0 21.333334 21.333333l0 42.666667q0 21.333333-21.333334 21.333333l-170.666666 0q-21.333333 0-21.333334-21.333333l0-42.666667q0-21.333333 21.333334-21.333333Z"/>
|
||||
<GeometryDrawing Brush="#FF9800" Geometry="M234.666667 359.04V832a128 128 0 0 0 256 0V359.04zM362.666667 896a64 64 0 1 1 64-64 64 64 0 0 1-64 64z"/>
|
||||
<GeometryDrawing Brush="#EF6C00" Geometry="M490.666667 410.666667H234.666667v45.44l256 87.893333v-133.333333z"/>
|
||||
<GeometryDrawing Brush="#FF9800" Geometry="M466.986667 85.333333v209.92h-208.64V85.333333A234.666667 234.666667 0 0 0 128 294.186667 177.92 177.92 0 0 0 277.333333 469.333333a528 528 0 0 0 85.333334 7.253334 528 528 0 0 0 85.333333-7.253334 177.92 177.92 0 0 0 149.333333-175.36A234.666667 234.666667 0 0 0 466.986667 85.333333z"/>
|
||||
</DrawingGroup>
|
||||
|
||||
<StreamGeometry x:Key="CommunityProxyPageSvg">
|
||||
M888 188.4l-2.6-14.3-14.2-3.2c-79.1-18.1-167.1-12.2-254.3 17.1-78.4 26.3-153.2 70.8-218.2 129.4-56 7.3-110.3 30-157.6 65.7-34.6 26.2-63.4 57.9-85.6 94.2-4.4 7.1-4.7 16.2-0.8 23.6 3.9 7.5 11.5 12.4 19.9 12.8 24.8 1.4 50.3 4.1 76.1 8.2-13 32.4-22.3 65.8-27.6 100.1l-1.7 11.1 17 17c-1.5 1.2-3 2.5-4.4 3.9l-1.8 1.8c-8.8 8.8-13.7 20.7-13.7 33.2 0 2.5 0.2 4.9 0.6 7.3-1.6 1.5-3.2 3-4.7 4.5-52.4 52.3-44.5 96.1-36.2 142.4l2.6 14.3 14.2 3.2c19.5 4.5 37.8 8 55.9 8 30.6 0 60.3-10.1 92.8-42.8 0.8-0.8 1.5-1.6 2.3-2.3 2.5 0.4 5.1 0.6 7.7 0.6 12 0 24-4.6 33.2-13.6l1.8-1.8c1.4-1.4 2.7-2.9 3.9-4.5l17.8 17.8 10.8-1.4c35.9-4.8 70.8-13.8 104.6-26.8 4.4 26.7 7.3 53.4 8.7 79.7 0.5 8.4 5.4 16.1 12.8 20 3.4 1.8 7.3 2.7 11.1 2.7 4.3 0 8.7-1.2 12.5-3.4 36.4-22.2 68-51 94.2-85.6 35.6-47.1 58.2-101.3 65.6-157 59.4-64 105.2-138.2 133-216.1 29.8-83.5 38.2-168.4 24.3-245.8zM212.2 472.5c15.8-20.3 34.3-38.4 55.3-54.3 22.5-17 46.8-30.6 72.1-40.5-28.1 32.8-51.4 67.1-69.9 102.8-19.3-3.4-38.6-6.1-57.5-8zM219 821c-5.8-36.6-4.4-57.4 24.7-87.3l65 65c-31 29-55.2 29.4-89.7 22.3z m138.5-43.4l-1.8 1.8c-1.1 1.1-3.1 1.1-4.2 0L263.2 691c-0.7-0.7-0.8-1.5-0.8-2.1s0.1-1.4 0.8-2.1l1.8-1.8c0.7-0.7 1.5-0.8 2.1-0.8 0.6 0 1.4 0.1 2.1 0.8l88.3 88.4c1.1 1.1 1.1 3.1 0 4.2z m272.5 3.1c-15.8 21-34 39.5-54.2 55.3-2-20.2-4.8-40.4-8.4-60.5 36-18 70.6-40.8 103.7-68.5-9.9 25.9-23.7 50.7-41.1 73.7z m192.2-361.3C794 498.5 745.7 573.7 682.4 637 605.3 714.1 519.1 760.6 426 775.5L268.5 618c7.6-41.3 21.4-81.3 41.2-119.2 23.1-44 54.9-86.5 94.6-126.2 65.8-65.8 144.1-115.2 226.6-142.9 74.2-24.9 148.5-31.4 216-18.9 9.1 65.9 0.6 137.7-24.7 208.6z
|
||||
M608.7 339.9c-55 0-99.7 44.7-99.7 99.7s44.7 99.7 99.7 99.7 99.7-44.7 99.7-99.7-44.7-99.7-99.7-99.7z m0 155.3c-30.7 0-55.7-25-55.7-55.7s25-55.7 55.7-55.7 55.7 25 55.7 55.7-25 55.7-55.7 55.7
|
||||
</StreamGeometry>
|
||||
<DrawingGroup x:Key="CommunityProxyPageSvg">
|
||||
<GeometryDrawing Brush="#e45a6e" Geometry="m221.799 139.528c-2.922-4.879-8.353-7.68-14.024-7.249l-121.895 9.416c-12.341.954-23.334 7.422-30.162 17.748l-51.155 77.372c-5.177 7.831-6.001 17.63-2.203 26.214 3.797 8.584 11.602 14.565 20.877 16.002l98.84 15.309c.769.119 1.537.178 2.299.178 5.063-.001 9.853-2.568 12.636-6.922l84.557-132.283c3.063-4.793 3.151-10.905.23-15.785z"/>
|
||||
<GeometryDrawing Brush="#d82e44" Geometry="m372.475 290.205c-4.88-2.922-10.993-2.833-15.785.23l-132.282 84.557c-5.009 3.202-7.654 9.06-6.745 14.935l15.308 98.84c1.437 9.276 7.419 17.08 16.004 20.878 3.57 1.579 7.35 2.358 11.112 2.358 5.281 0 10.528-1.538 15.101-4.561l77.373-51.156c10.326-6.826 16.795-17.82 17.747-30.162l9.416-121.894c.439-5.671-2.369-11.102-7.249-14.025z"/>
|
||||
<GeometryDrawing Brush="#f1f1fb" Geometry="m192.87 412.278c5.97 5.97 14.453 8.763 22.78 7.37 122.112-20.418 218.741-121.522 255.528-192.645 40.849-78.974 42.362-162.43 40.227-201.57-.732-13.412-11.423-24.103-24.835-24.835-39.14-2.134-122.595-.621-201.57 40.228-71.122 36.787-172.226 133.416-192.644 255.528-1.392 8.327 1.4 16.81 7.37 22.78z"/>
|
||||
<GeometryDrawing Brush="#d7d6fb" Geometry="m503.743 8.261-357.445 357.445 46.572 46.572c5.97 5.97 14.453 8.762 22.78 7.37 122.112-20.418 218.741-121.522 255.528-192.644 40.849-78.974 42.362-162.43 40.227-201.57-.366-6.706-3.222-12.732-7.662-17.173z"/>
|
||||
<GeometryDrawing Brush="#466288" Geometry="m350.731 236.238c-19.209.001-38.41-7.309-53.033-21.932-14.166-14.165-21.968-33-21.968-53.033s7.802-38.868 21.968-53.033c29.241-29.242 76.822-29.243 106.065 0 14.166 14.165 21.967 33 21.967 53.033s-7.801 38.868-21.967 53.033c-14.619 14.62-33.829 21.93-53.032 21.932zm-42.427-117.391h.01z"/>
|
||||
<GeometryDrawing Brush="#466288" Geometry="m92.356 296.354c-1.392 8.327 1.4 16.81 7.37 22.78l93.144 93.144c5.97 5.97 14.453 8.762 22.78 7.37 26.571-4.443 51.933-12.709 75.737-23.652l-175.379-175.378c-10.943 23.803-19.209 49.166-23.652 75.736z"/>
|
||||
<GeometryDrawing Brush="#fdb43a" Geometry="m15.304 421.938c3.838 0 7.678-1.465 10.606-4.394l48.973-48.973c5.858-5.857 5.858-15.355 0-21.213-5.857-5.858-15.354-5.858-21.213 0l-48.972 48.973c-5.858 5.857-5.858 15.355 0 21.213 2.929 2.93 6.767 4.394 10.606 4.394z"/>
|
||||
<GeometryDrawing Brush="#fdb43a" Geometry="m119.764 392.24c-5.857-5.857-15.355-5.857-21.213 0l-94.154 94.154c-5.858 5.857-5.858 15.355 0 21.213 2.929 2.929 6.768 4.393 10.607 4.393s7.678-1.465 10.606-4.394l94.154-94.154c5.858-5.857 5.858-15.355 0-21.212z"/>
|
||||
<GeometryDrawing Brush="#f57a21" Geometry="m164.645 437.121c-5.857-5.857-15.355-5.857-21.213 0l-48.972 48.972c-5.858 5.857-5.858 15.355 0 21.213 2.929 2.929 6.768 4.394 10.606 4.394s7.678-1.465 10.606-4.394l48.973-48.973c5.858-5.857 5.858-15.355 0-21.212z"/>
|
||||
<GeometryDrawing Brush="#f57a21" Geometry="m4.397 507.607c2.929 2.929 6.768 4.393 10.607 4.393s7.678-1.465 10.606-4.394l94.154-94.154c5.858-5.857 5.858-15.355 0-21.213z"/>
|
||||
<GeometryDrawing Brush="#354a67" Geometry="m146.298 365.706 46.572 46.572c5.97 5.97 14.453 8.762 22.78 7.37 26.571-4.443 51.933-12.709 75.737-23.652l-87.689-87.689z"/>
|
||||
<GeometryDrawing Brush="#354a67" Geometry="m297.698 214.306c14.623 14.623 33.824 21.934 53.033 21.932 19.203-.002 38.413-7.313 53.032-21.932 14.166-14.166 21.967-33 21.967-53.033s-7.801-38.868-21.967-53.033z"/>
|
||||
<GeometryDrawing Brush="#4bbefd" Geometry="m350.73 116.295c-11.523 0-23.047 4.386-31.819 13.159-8.499 8.499-13.181 19.799-13.181 31.819s4.682 23.32 13.181 31.819c17.545 17.545 46.095 17.546 63.64 0 8.499-8.5 13.18-19.8 13.18-31.82s-4.681-23.32-13.18-31.819c-8.773-8.772-20.296-13.158-31.821-13.158z"/>
|
||||
<GeometryDrawing Brush="#0590fb" Geometry="m382.55 129.454-63.639 63.639c17.545 17.545 46.095 17.546 63.639 0 8.499-8.5 13.18-19.8 13.18-31.82s-4.68-23.32-13.18-31.819z"/>
|
||||
</DrawingGroup>
|
||||
|
||||
<StreamGeometry x:Key="SettingsPageSvg">
|
||||
M586.7125 1024H438.966226a56.284295 56.284295 0 0 1-50.527946-36.456873l-18.548233-55.6447a90.822385 90.822385 0 0 0-35.817279-46.690381 90.822385 90.822385 0 0 0-57.563483 0l-55.6447 19.827422a56.923889 56.923889 0 0 1-58.203078-17.908639L69.92034 768.162297A59.482266 59.482266 0 0 1 64.803586 704.202871l30.700524-49.888352a94.65995 94.65995 0 0 0 13.431479-57.563483 91.461979 91.461979 0 0 0-36.456872-46.050786l-46.690381-28.781742A58.203077 58.203077 0 0 1 0.84416 463.715431l33.898496-147.746274a57.563483 57.563483 0 0 1 46.050786-42.213221l57.563483-6.395942A90.822385 90.822385 0 0 0 192.722437 242.415817a95.299544 95.299544 0 0 0 12.152291-57.563483L195.920409 128.56804a57.563483 57.563483 0 0 1 30.06093-57.563484L359.016944 7.045131a57.563483 57.563483 0 0 1 63.959426 10.873102l37.736061 39.654844A87.624413 87.624413 0 0 0 512.519566 83.796442a88.903602 88.903602 0 0 0 51.807135-26.223365l40.934032-41.573627a58.203077 58.203077 0 0 1 63.959426-10.873102l133.035606 63.959426a57.563483 57.563483 0 0 1 30.06093 55.6447l-6.395943 58.203078a94.020356 94.020356 0 0 0 12.152291 57.563483 89.543196 89.543196 0 0 0 52.446729 24.944176l56.923889 6.395942a57.563483 57.563483 0 0 1 46.050786 42.213221L1024.194972 463.715431a58.203077 58.203077 0 0 1-23.664988 58.203077l-48.609163 31.340119a90.18279 90.18279 0 0 0-36.456873 45.411192 94.020356 94.020356 0 0 0 13.431479 57.563483L960.235546 704.202871a58.842672 58.842672 0 0 1-3.197971 63.959426l-92.101573 118.324938a58.203077 58.203077 0 0 1-59.482266 17.269045l-54.365512-19.187828a88.903602 88.903602 0 0 0-57.563483 0 90.822385 90.822385 0 0 0-35.177684 46.690381l-19.187828 55.6447a56.284295 56.284295 0 0 1-50.527946 36.456873z m-278.223502-191.878277a108.731024 108.731024 0 0 1 46.690381 9.593914 135.593983 135.593983 0 0 1 60.12186 74.832528l18.548233 55.6447a11.512697 11.512697 0 0 0 5.116754 3.837566h147.10668a11.512697 11.512697 0 0 0 5.116754-3.837566l19.187827-55.6447a137.512765 137.512765 0 0 1 59.482266-74.192934 133.6752 133.6752 0 0 1 95.299545 0l54.365511 19.827422h5.116755l91.461978-117.685343a14.071074 14.071074 0 0 0 0-8.314726l-30.700524-49.248758a139.431548 139.431548 0 0 1-19.827422-93.380761A137.512765 137.512765 0 0 1 924.418268 512.324594l48.609163-31.340119a13.431479 13.431479 0 0 0 0-7.675131l-30.06093-146.467085a12.152291 12.152291 0 0 0-5.116754-6.395942l-56.284295-6.395943a134.954388 134.954388 0 0 1-85.066036-43.492409 139.431548 139.431548 0 0 1-21.746205-92.741168l6.395943-58.842671a12.791885 12.791885 0 0 0-3.837566-7.035537l-133.035605-63.959426-3.837566 2.558377-39.654844 40.934033A134.314794 134.314794 0 0 1 512.519566 132.405605a133.035606 133.035606 0 0 1-86.345225-40.934032L384.600714 49.897946h-3.837565l-133.6752 63.959426a13.431479 13.431479 0 0 0 0 7.035537l3.837566 58.842671a140.071142 140.071142 0 0 1-21.746205 92.741168 136.233577 136.233577 0 0 1-85.066036 43.492409l-57.563484 4.47716a15.350262 15.350262 0 0 0-4.477159 5.116754L49.453324 474.588533a12.791885 12.791885 0 0 0 0 7.675131l51.16754 30.06093a136.873171 136.873171 0 0 1 57.563483 76.111717 139.431548 139.431548 0 0 1-19.827422 93.380761l-30.700524 49.888352a15.350262 15.350262 0 0 0 0 8.314726l92.101573 117.685343h5.756348l51.167541-17.269045a145.187896 145.187896 0 0 1 51.807135-8.314725z m0 0
|
||||
M512.519566 290.385387A221.939207 221.939207 0 1 0 734.458773 512.324594 221.939207 221.939207 0 0 0 512.519566 290.385387z m0 393.990062A172.690449 172.690449 0 1 1 685.210015 512.324594 172.690449 172.690449 0 0 1 512.519566 684.375449z
|
||||
</StreamGeometry>
|
||||
<DrawingGroup x:Key="SettingsPageSvg">
|
||||
<GeometryDrawing Brush="#8C9EFF" Geometry="
|
||||
M960 568V456c0-15.46-12.54-28-28-28h-94.59c-7.93-30.82-20.2-59.9-35.99-86.63l66.96-66.96c10.93-10.93 10.93-28.66 0-39.6l-79.2-79.2c-10.93-10.93-28.66-10.93-39.6 0l-66.96 66.96c-26.74-15.8-55.81-28.06-86.63-35.99V92c0-15.46-12.54-28-28-28H456c-15.46 0-28 12.54-28 28v94.59c-30.82 7.93-59.9 20.19-86.63 35.99l-66.96-66.96c-10.93-10.93-28.66-10.93-39.6 0l-79.2 79.2c-10.93 10.93-10.93 28.66 0 39.6l66.96 66.96c-15.8 26.73-28.06 55.81-35.99 86.63H92c-15.46 0-28 12.54-28 28v112c0 15.46 12.54 28 28 28h94.59c7.93 30.82 20.19 59.9 35.99 86.63l-66.96 66.96c-10.93 10.93-10.93 28.66 0 39.6l79.2 79.2c10.93 10.93 28.66 10.93 39.6 0l66.96-66.96c26.74 15.8 55.81 28.06 86.63 35.99V932c0 15.46 12.54 28 28 28h112c15.46 0 28-12.54 28-28v-94.59c30.82-7.93 59.9-20.19 86.63-35.99l66.96 66.96c10.93 10.93 28.66 10.93 39.6 0l79.2-79.2c10.93-10.93 10.93-28.66 0-39.6l-66.96-66.96c15.8-26.73 28.06-55.81 35.99-86.63H932c15.46 0.01 28-12.53 28-27.99z"/>
|
||||
<GeometryDrawing Brush="#FFFFFF" Geometry="M512 512m-168 0a168 168 0 1 0 336 0 168 168 0 1 0-336 0Z"/>
|
||||
<GeometryDrawing Brush="#FFD600" Geometry="M512 512m-56 0a56 56 0 1 0 112 0 56 56 0 1 0-112 0Z"/>
|
||||
</DrawingGroup>
|
||||
|
||||
<StreamGeometry x:Key="SteamAccountPageSvg">
|
||||
M722.995 541.05c83.58-43.31 140.734-130.544 140.734-231.177 0-143.755-116.537-260.28-260.28-260.28-143.75 0-260.286 116.53-260.286 260.28 0 99.425 55.772 185.8 137.718 229.632-174.065 52.06-303.135 214.753-298.814 399.728 0 36.46 49.29 31.447 49.29 1.808 0-204.831 166.052-370.883 370.888-370.883 204.83 0 370.883 166.057 370.883 370.883 0 24.852 43.269 21.1 43.269-1.808 4.08-183.219-122.122-344.448-293.402-398.182zM599.24 522.06c-5.028 0-10.015 0.206-15.007 0.39-108.754-9.15-194.181-100.26-194.181-211.38 0-117.191 95.001-212.187 212.193-212.187 117.192 0 217.487 95.001 217.487 212.188 0 111.641-91.033 203.08-200.975 211.497a411.674 411.674 0 0 0-19.517-0.507zM336.43 552.05c0.338 0 0.67 0.025 1.004 0.025 30.56 0 31.221-49.643-1.004-49.643-0.824 0-1.638-0.046-2.463-0.057l-0.046-0.937c-4.29 0-8.53 0.18-12.764 0.343-91.105-7.214-167.004-78.284-167.004-170.741 0-97.587 84.536-176.691 182.277-176.691 32.277 0 23.772-41.048-9.595-41.048-119.9 0-217.093 97.04-217.093 216.735 0 79.55 47.631 151.383 114.76 190.659C91.397 569.42 3.676 704.722 7.168 854.103c0 30.372 46.403 26.189 46.403 1.505 0-170.562 112.015-303.534 282.86-303.534v-0.025z
|
||||
</StreamGeometry>
|
||||
<DrawingGroup x:Key="SteamAccountPageSvg">
|
||||
<GeometryDrawing Brush="#A9D8FF" Geometry="M632 344m-120 0a120 120 0 1 0 240 0 120 120 0 1 0-240 0Z"/>
|
||||
<GeometryDrawing Brush="#A9D8FF" Geometry="M809 800H503c-48.1 0-87-39-87-87 0-111 90-201 201-201h78c111 0 201 90 201 201 0 48-39 87-87 87z"/>
|
||||
<GeometryDrawing Brush="#298DF7" Geometry="M440 296m-168 0a168 168 0 1 0 336 0 168 168 0 1 0-336 0Z"/>
|
||||
<GeometryDrawing Brush="#298DF7" Geometry="M638.2 896H241.8C179 896 128 845 128 782.2 128 633 249 512 398.2 512h83.6C631 512 752 633 752 782.2 752 845 701 896 638.2 896z"/>
|
||||
</DrawingGroup>
|
||||
|
||||
<StreamGeometry x:Key="StartPageSvg">
|
||||
M786.68 960H237.31c-49.93 0-90.55-43.49-90.55-96.95v-484c0-14.55 11.8-26.35 26.35-26.35s26.35 11.8 26.35 26.35v484c0 24.4 16.98 44.24 37.84 44.24h549.37c20.87 0 37.84-19.85 37.84-44.24v-484c0-14.55 11.8-26.35 26.35-26.35s26.35 11.8 26.35 26.35v484c0.02 53.46-40.61 96.95-90.53 96.95z
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<Styles xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:ms="clr-namespace:System.Application.Models.Settings;assembly=System.Application.SteamTools.Client.Desktop">
|
||||
<Design.PreviewWith>
|
||||
</Design.PreviewWith>
|
||||
<Styles.Resources>
|
||||
<!--<FontFamily x:Key="ContentControlThemeFontFamily">Null</FontFamily>-->
|
||||
</Styles.Resources>
|
||||
|
||||
<Style Selector=":is(TemplatedControl)">
|
||||
<Setter Property="FontFamily" Value="{Binding Source={x:Static ms:UISettings.FontName},Path=Value, Mode=OneWay,Converter={StaticResource NameToFontFamilyConverter}}"></Setter>
|
||||
</Style>
|
||||
|
||||
<Style Selector="Window">
|
||||
<Setter Property="Title" Value="{Binding Title,Mode=OneWay}"/>
|
||||
<!--<Setter Property="FontSize" Value="14"></Setter>-->
|
||||
<Setter Property="FontFamily" Value="{Binding Source={x:Static ms:UISettings.FontName},Path=Value, Mode=OneWay,Converter={StaticResource NameToFontFamilyConverter}}"></Setter>
|
||||
<Setter Property="Background" Value="Transparent"></Setter>
|
||||
<Setter Property="TransparencyLevelHint" Value="AcrylicBlur"></Setter>
|
||||
<Setter Property="Icon" Value="avares://System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Assets/Icon.ico"/>
|
||||
</Style>
|
||||
|
||||
</Styles>
|
||||
@@ -1,46 +0,0 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
Width="150"
|
||||
Height="225"
|
||||
Background="Transparent"
|
||||
x:Class="System.Application.UI.Views.Controls.CardView">
|
||||
<UserControl.Styles>
|
||||
<Style Selector="Image:pointerover">
|
||||
<Style.Animations>
|
||||
<Animation Duration="0:0:0.15" FillMode="Forward">
|
||||
<KeyFrame Cue="0%">
|
||||
<Setter Property="Width" Value="150"/>
|
||||
<Setter Property="Height" Value="225"/>
|
||||
</KeyFrame>
|
||||
<KeyFrame Cue="100%">
|
||||
<Setter Property="Width" Value="160"/>
|
||||
<Setter Property="Height" Value="245"/>
|
||||
</KeyFrame>
|
||||
</Animation>
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
<Style Selector="Border">
|
||||
<Style.Animations>
|
||||
<Animation Duration="0:0:0.1" FillMode="Forward">
|
||||
<KeyFrame Cue="0%">
|
||||
<Setter Property="BorderBrush" Value="#FF2F2F37"/>
|
||||
<Setter Property="BorderThickness" Value=".88"/>
|
||||
</KeyFrame>
|
||||
<KeyFrame Cue="100%">
|
||||
<Setter Property="BorderBrush" Value="#FF616167"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
</KeyFrame>
|
||||
</Animation>
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
</UserControl.Styles>
|
||||
<Border>
|
||||
<Panel>
|
||||
<Image Source="avares://System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Assets/AppResources/app.png"></Image>
|
||||
<Label IsHitTestVisible="False" Content="Test" HorizontalAlignment="Center" VerticalAlignment="Bottom" FontSize="18"></Label>
|
||||
</Panel>
|
||||
</Border>
|
||||
</UserControl>
|
||||
@@ -1,19 +0,0 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Markup.Xaml;
|
||||
|
||||
namespace System.Application.UI.Views.Controls
|
||||
{
|
||||
public class CardView : UserControl
|
||||
{
|
||||
public CardView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -154,7 +154,8 @@ namespace System.Application.UI.Views.Controls
|
||||
|
||||
if (nC.Intersects(nR))
|
||||
using (context.PushPostTransform(Matrix.CreateTranslation(offset, padding.Top)))
|
||||
TextLayout.Draw(context, new Point(Padding.Left, Padding.Top));
|
||||
//TextLayout.Draw(context, new Point(Padding.Left, Padding.Top));
|
||||
TextLayout.Draw(context);
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -162,7 +163,8 @@ namespace System.Application.UI.Views.Controls
|
||||
_animate = false;
|
||||
|
||||
using (context.PushPostTransform(Matrix.CreateTranslation(padding.Left, padding.Top)))
|
||||
TextLayout.Draw(context, new Point(Padding.Left, Padding.Top));
|
||||
//TextLayout.Draw(context, new Point(Padding.Left, Padding.Top));
|
||||
TextLayout.Draw(context);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,23 +4,42 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ms="clr-namespace:System.Application.Models.Settings;assembly=System.Application.SteamTools.Client.Desktop"
|
||||
mc:Ignorable="d"
|
||||
x:Name="u" IsHitTestVisible="False"
|
||||
x:Name="u"
|
||||
IsHitTestVisible="False"
|
||||
Background="Transparent"
|
||||
x:Class="System.Application.UI.Views.Controls.TitleBar">
|
||||
<DockPanel HorizontalAlignment="Stretch">
|
||||
<ExperimentalAcrylicBorder DockPanel.Dock="Top" IsHitTestVisible="False" Height="{StaticResource TitleBarHeight}">
|
||||
<ExperimentalAcrylicBorder.Material>
|
||||
<ExperimentalAcrylicMaterial TintColor="{DynamicResource BackgroundColorKey}" MaterialOpacity="{ReflectionBinding Value,Source={x:Static ms:UISettings.AcrylicOpacity},Mode=OneWay}" TintOpacity="1"/>
|
||||
</ExperimentalAcrylicBorder.Material>
|
||||
<StackPanel x:Name="title" Orientation="Horizontal" VerticalAlignment="Top" Margin="10 6 10 6">
|
||||
<Image Source="/Application/UI/Assets/Icon.ico" Height="18" Width="18" Margin="0,0,10,0"/>
|
||||
<TextBlock IsHitTestVisible="False" Grid.Column="1" Text="{ReflectionBinding $parent[Window].Title}" VerticalAlignment="Center" Foreground="{DynamicResource HighlightForegroundBrushKey}" FontSize="14"/>
|
||||
</StackPanel>
|
||||
</ExperimentalAcrylicBorder>
|
||||
<ExperimentalAcrylicBorder DockPanel.Dock="Bottom" IsHitTestVisible="False" Opacity="{StaticResource ContentOpacity}">
|
||||
<ExperimentalAcrylicBorder.Material>
|
||||
<ExperimentalAcrylicMaterial TintColor="{DynamicResource ThemeColorKey}" MaterialOpacity="{ReflectionBinding Value,Source={x:Static ms:UISettings.AcrylicOpacity},Mode=OneWay}" TintOpacity="1"/>
|
||||
</ExperimentalAcrylicBorder.Material>
|
||||
</ExperimentalAcrylicBorder>
|
||||
</DockPanel>
|
||||
<Panel>
|
||||
<Panel.Background>
|
||||
<ImageBrush Source="{ReflectionBinding Source={x:Static ms:UISettings.BackgroundImagePath},Path=Value, Mode=OneWay,Converter={StaticResource BitmapAssetValueConverter}}"
|
||||
Stretch="UniformToFill"
|
||||
Opacity="{ReflectionBinding Source={x:Static ms:UISettings.EnableCustomBackgroundImage},Path=Value, Mode=OneWay,Converter={StaticResource IsVisibleToOpacity},ConverterParameter=0.8}"/>
|
||||
</Panel.Background>
|
||||
<!--<Image IsHitTestVisible="False"
|
||||
IsVisible="{ReflectionBinding Source={x:Static ms:UISettings.EnableCustomBackgroundImage},Path=Value, Mode=OneWay}"
|
||||
Source="{ReflectionBinding Source={x:Static ms:UISettings.BackgroundImagePath},Path=Value, Mode=OneWay,Converter={StaticResource BitmapAssetValueConverter}}"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Stretch"
|
||||
Stretch="UniformToFill"
|
||||
Opacity="0.8">
|
||||
</Image>-->
|
||||
<DockPanel HorizontalAlignment="Stretch">
|
||||
<ExperimentalAcrylicBorder DockPanel.Dock="Top" IsHitTestVisible="False" Height="{StaticResource TitleBarHeight}">
|
||||
<ExperimentalAcrylicBorder.Material>
|
||||
<ExperimentalAcrylicMaterial TintColor="{DynamicResource BackgroundColorKey}" MaterialOpacity="{ReflectionBinding Value,Source={x:Static ms:UISettings.AcrylicOpacity},Mode=OneWay}" TintOpacity="1"/>
|
||||
</ExperimentalAcrylicBorder.Material>
|
||||
</ExperimentalAcrylicBorder>
|
||||
<ExperimentalAcrylicBorder DockPanel.Dock="Bottom"
|
||||
x:Name="Back"
|
||||
IsHitTestVisible="False">
|
||||
<!--Opacity="{StaticResource ContentOpacity}"-->
|
||||
<ExperimentalAcrylicBorder.Material>
|
||||
<ExperimentalAcrylicMaterial TintColor="{DynamicResource ThemeColorKey}" MaterialOpacity="{ReflectionBinding Value,Source={x:Static ms:UISettings.AcrylicOpacity},Mode=OneWay}" TintOpacity="1"/>
|
||||
</ExperimentalAcrylicBorder.Material>
|
||||
</ExperimentalAcrylicBorder>
|
||||
</DockPanel>
|
||||
<StackPanel x:Name="title" Orientation="Horizontal" VerticalAlignment="Top" Margin="10 6 10 6">
|
||||
<Image Source="/Application/UI/Assets/Icon.ico" Height="18" Width="18" Margin="0,0,10,0"/>
|
||||
<TextBlock IsHitTestVisible="False" Grid.Column="1" Text="{ReflectionBinding $parent[Window].Title}" VerticalAlignment="Center" Foreground="{DynamicResource HighlightForegroundBrushKey}" FontSize="14"/>
|
||||
</StackPanel>
|
||||
</Panel>
|
||||
</UserControl>
|
||||
|
||||
@@ -7,15 +7,28 @@ namespace System.Application.UI.Views.Controls
|
||||
{
|
||||
public class TitleBar : UserControl
|
||||
{
|
||||
public static readonly StyledProperty<bool> IsVisibleBackgroundProperty =
|
||||
AvaloniaProperty.Register<TitleBar, bool>(nameof(IsVisibleBackground), true);
|
||||
|
||||
public bool IsVisibleBackground
|
||||
{
|
||||
get { return GetValue(IsVisibleBackgroundProperty); }
|
||||
set { SetValue(IsVisibleBackgroundProperty, value); }
|
||||
}
|
||||
|
||||
public TitleBar()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
if (DI.IsmacOS)
|
||||
if (OperatingSystem2.IsMacOS)
|
||||
{
|
||||
var title = this.FindControl<StackPanel>("title");
|
||||
title.HorizontalAlignment = HorizontalAlignment.Center;
|
||||
}
|
||||
|
||||
var back = this.FindControl<ExperimentalAcrylicBorder>("Back");
|
||||
this.GetObservable(IsVisibleBackgroundProperty)
|
||||
.Subscribe(x => back.IsVisible = x);
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
|
||||
@@ -10,44 +10,46 @@
|
||||
xmlns:resx="clr-namespace:System.Application.UI.Resx;assembly=System.Application.SteamTools.Client.Desktop"
|
||||
xmlns:ms="clr-namespace:System.Application.Models.Settings;assembly=System.Application.SteamTools.Client.Desktop"
|
||||
xmlns:controls="clr-namespace:System.Application.UI.Views.Controls"
|
||||
xmlns:ui="using:FluentAvalonia.UI.Controls"
|
||||
x:Class="System.Application.UI.Views.MainView"
|
||||
FontSize="14"
|
||||
FontFamily="{Binding Source={x:Static ms:UISettings.FontName},Path=Value, Mode=OneWay,Converter={StaticResource NameToFontFamilyConverter}}"
|
||||
x:DataType="vm:MainWindowViewModel"
|
||||
x:CompileBindings="True">
|
||||
<Panel>
|
||||
<!--<Image IsHitTestVisible="False"
|
||||
Source="avares://System.Application.SteamTools.Client.Desktop.Avalonia/Application/UI/Assets/AppResources/Placeholders/0.png"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Bottom"
|
||||
Stretch="Fill"
|
||||
Opacity="0.8">
|
||||
</Image>-->
|
||||
<!--Title-->
|
||||
<controls:TitleBar IsVisibleBackground="False"/>
|
||||
|
||||
<!--Background-->
|
||||
<DockPanel HorizontalAlignment="Stretch" ZIndex="0" IsHitTestVisible="False">
|
||||
<ExperimentalAcrylicBorder IsHitTestVisible="False" DockPanel.Dock="Left" Width="240">
|
||||
<DockPanel IsHitTestVisible="False" Margin="{StaticResource TitleBarAfterMargin}">
|
||||
<ExperimentalAcrylicBorder x:Name="NavBarBackground"
|
||||
IsHitTestVisible="False"
|
||||
DockPanel.Dock="Left"
|
||||
Width="240">
|
||||
<ExperimentalAcrylicBorder.Material>
|
||||
<ExperimentalAcrylicMaterial TintColor="{DynamicResource BackgroundColorKey}" MaterialOpacity="{ReflectionBinding Value,Source={x:Static ms:UISettings.AcrylicOpacity},Mode=OneWay}" TintOpacity="1"/>
|
||||
</ExperimentalAcrylicBorder.Material>
|
||||
</ExperimentalAcrylicBorder>
|
||||
<ExperimentalAcrylicBorder IsHitTestVisible="False">
|
||||
<ExperimentalAcrylicBorder IsHitTestVisible="False" DockPanel.Dock="Right">
|
||||
<ExperimentalAcrylicBorder.Material>
|
||||
<ExperimentalAcrylicMaterial TintColor="{DynamicResource ThemeColorKey}" MaterialOpacity="{ReflectionBinding Value,Source={x:Static ms:UISettings.AcrylicOpacity},Mode=OneWay}" TintOpacity="1"/>
|
||||
<ExperimentalAcrylicMaterial TintColor="{DynamicResource ThemeColorKey}"
|
||||
MaterialOpacity="{ReflectionBinding Value,Source={x:Static ms:UISettings.AcrylicOpacity},Mode=OneWay}"
|
||||
TintOpacity="1"/>
|
||||
</ExperimentalAcrylicBorder.Material>
|
||||
</ExperimentalAcrylicBorder>
|
||||
</DockPanel>
|
||||
|
||||
<!--Title-->
|
||||
<Grid ColumnDefinitions="240,*,Auto">
|
||||
<!--<Grid ColumnDefinitions="240,*,Auto">
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Height="110" VerticalAlignment="Top">
|
||||
<Image Source="/Application/UI/Assets/Icon.ico" Height="64" Width="64" VerticalAlignment="Center" Margin="-8,0,0,0"/>
|
||||
<Label Content="{ReflectionBinding Path=Title}" Foreground="{DynamicResource HighlightForegroundBrushKey}" VerticalContentAlignment="Center" FontSize="20" Margin="8,0,0,0"/>
|
||||
</StackPanel>
|
||||
<TextBlock IsHitTestVisible="False" Grid.Column="1" Text="{ReflectionBinding SelectedItem.Name}" Foreground="{DynamicResource HighlightForegroundBrushKey}"
|
||||
<TextBlock IsHitTestVisible="False" Grid.Column="1" Text="{Binding SelectedItem.Name}" Foreground="{DynamicResource HighlightForegroundBrushKey}"
|
||||
Padding="15 8 0 0" FontSize="24" FontWeight="Regular"/>
|
||||
<StackPanel Grid.Column="2" x:Name="titleMenu" Orientation="Horizontal" VerticalAlignment="Top">
|
||||
<!--<Menu Items="{Binding SelectedItem.MenuItems}" IsVisible="{Binding !SelectedItem.MenuItems,Converter={StaticResource IsNullConverter}}" Classes="BindMenu">
|
||||
</Menu>-->
|
||||
|
||||
<Menu Items="{Binding SelectedItem.MenuItems}" IsVisible="{Binding !SelectedItem.MenuItems,Converter={StaticResource IsNullConverter}}" Classes="BindMenu">
|
||||
</Menu>
|
||||
|
||||
<Menu Classes="BindMenu">
|
||||
<MenuItem Items="{Binding SelectedItem.MenuItems}" Classes="BindItem"
|
||||
IsVisible="{Binding !SelectedItem.MenuItems,Converter={StaticResource IsNullConverter}}">
|
||||
@@ -63,9 +65,11 @@
|
||||
Stretch="Uniform"
|
||||
Height="20"
|
||||
Width="20">
|
||||
<!--<Image.Clip>
|
||||
<EllipseGeometry Rect="0,0,20,20" />
|
||||
</Image.Clip>-->
|
||||
|
||||
<Image.Clip>
|
||||
<EllipseGeometry Rect="0,0,20,20" />
|
||||
</Image.Clip>
|
||||
|
||||
</Image>
|
||||
</MenuItem.Header>
|
||||
</MenuItem>
|
||||
@@ -80,15 +84,18 @@
|
||||
HorizontalAlignment="Stretch"
|
||||
CornerRadius="{DynamicResource OverlayCornerRadius}">
|
||||
<StackPanel>
|
||||
<Panel x:Name="UserMenu" Width="300" Margin="0 20">
|
||||
<Panel x:Name="UserMenu" Width="250" Margin="0 20">
|
||||
<StackPanel>
|
||||
<Image Source="{ReflectionBinding Path=AvaterPath, Source={x:Static service:UserService.Current},Mode=OneWay,Converter={StaticResource BitmapAssetValueConverter},ConverterParameter=100}"
|
||||
Stretch="Uniform"
|
||||
Height="100" Width="100"
|
||||
Height="100"
|
||||
Width="100"
|
||||
HorizontalAlignment="Center">
|
||||
<!--<Image.Clip>
|
||||
|
||||
<Image.Clip>
|
||||
<EllipseGeometry Rect="0,0,80,80" />
|
||||
</Image.Clip>-->
|
||||
</Image.Clip>
|
||||
|
||||
</Image>
|
||||
<TextBlock
|
||||
Text="{ReflectionBinding Path=User.NickName,Mode=OneWay,Source={x:Static service:UserService.Current}}"
|
||||
@@ -99,9 +106,14 @@
|
||||
</StackPanel>
|
||||
</Panel>
|
||||
<Separator Classes="Separator"></Separator>
|
||||
<ListBox SelectionMode="Single" Classes="metro" Background="Transparent" ScrollViewer.VerticalScrollBarVisibility="Disabled" ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
||||
<ListBox SelectionMode="Single"
|
||||
Classes="metro"
|
||||
Background="Transparent"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Disabled"
|
||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
||||
<ListBox.Styles>
|
||||
<Style Selector="Button">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left"></Setter>
|
||||
<Setter Property="Width" Value="{Binding #UserMenu.Width}"></Setter>
|
||||
</Style>
|
||||
<Style Selector="Button > TextBlock">
|
||||
@@ -129,13 +141,15 @@
|
||||
Command="{ReflectionBinding Path=ShowWindow,Source={x:Static service:UserService.Current}}"
|
||||
CommandParameter="BindPhoneNumber"></Button>
|
||||
</ListBoxItem>
|
||||
<!--<ListBoxItem>
|
||||
|
||||
<ListBoxItem>
|
||||
<Button
|
||||
Classes="CodeButton"
|
||||
Content="{ReflectionBinding Path=Res.DelAccount,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{ReflectionBinding Path=ShowWindow,Source={x:Static service:UserService.Current}}"
|
||||
CommandParameter="ChangeBindPhoneNumber"></Button>
|
||||
</ListBoxItem>-->
|
||||
</ListBoxItem>
|
||||
|
||||
<ListBoxItem>
|
||||
<Button
|
||||
Classes="CodeButton"
|
||||
@@ -147,18 +161,154 @@
|
||||
</Border>
|
||||
</Popup>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>-->
|
||||
|
||||
<!--Content-->
|
||||
<TabControl
|
||||
<ui:NavigationView x:Name="NavigationView"
|
||||
Margin="{StaticResource TitleBarAfterMargin}"
|
||||
Background="Transparent"
|
||||
PaneDisplayMode="Left"
|
||||
AlwaysShowHeader="False"
|
||||
IsSettingsVisible="False"
|
||||
OpenPaneLength="240"
|
||||
MenuItems="{Binding TabItems}"
|
||||
FooterMenuItems="{Binding FooterTabItems}"
|
||||
SelectedItem="{Binding SelectedItem}">
|
||||
<!--<ui:NavigationView.PaneHeader>
|
||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Height="110" VerticalAlignment="Top">
|
||||
<Image Source="/Application/UI/Assets/Icon.ico" Height="64" Width="64" VerticalAlignment="Center" Margin="-8,0,0,0"/>
|
||||
<Label Content="{ReflectionBinding Path=Title}" Foreground="{DynamicResource HighlightForegroundBrushKey}" VerticalContentAlignment="Center" FontSize="20" Margin="8,0,0,0"/>
|
||||
</StackPanel>
|
||||
</ui:NavigationView.PaneHeader>-->
|
||||
|
||||
<ui:NavigationView.Content>
|
||||
<ui:Frame Content="{Binding SelectedItem,Mode=OneWay}">
|
||||
<ui:Frame.DataTemplates>
|
||||
<DataTemplate DataType="vm:ProxyScriptManagePageViewModel">
|
||||
<pages:ProxyScriptManagePage/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="vm:DebugPageViewModel">
|
||||
<pages:DebugPage/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="vm:AboutPageViewModel">
|
||||
<pages:AboutPage/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="vm:SettingsPageViewModel">
|
||||
<pages:SettingsPage/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="vm:StartPageViewModel">
|
||||
<pages:StartPage/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="vm:SteamAccountPageViewModel">
|
||||
<pages:SteamAccountPage/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="vm:GameListPageViewModel">
|
||||
<pages:GameListPage/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="vm:CommunityProxyPageViewModel">
|
||||
<pages:CommunityProxyPage/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="vm:LocalAuthPageViewModel">
|
||||
<pages:LocalAuthPage/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="vm:GameRelatedPageViewModel">
|
||||
<pages:GameRelatedPage/>
|
||||
</DataTemplate>
|
||||
<DataTemplate DataType="vm:ArchiSteamFarmPlusPageViewModel">
|
||||
<pages:ArchiSteamFarmPlusPage/>
|
||||
</DataTemplate>
|
||||
</ui:Frame.DataTemplates>
|
||||
</ui:Frame>
|
||||
</ui:NavigationView.Content>
|
||||
|
||||
<ui:NavigationView.PaneCustomContent>
|
||||
<ui:Button Cursor="Hand"
|
||||
Margin="6"
|
||||
Padding="10 5"
|
||||
MaxWidth="240"
|
||||
BorderThickness="0"
|
||||
Background="Transparent"
|
||||
HorizontalContentAlignment="Stretch"
|
||||
HorizontalAlignment="Stretch"
|
||||
Command="{Binding OpenUserMenu}">
|
||||
<DockPanel
|
||||
HorizontalAlignment="Stretch">
|
||||
<!--<Image x:Name="avater" Source="/Application/UI/Assets/Icon.ico" Height="64" Width="64"/>
|
||||
<Label Content="{ReflectionBinding Path=Title}" Foreground="{DynamicResource HighlightForegroundBrushKey}" VerticalContentAlignment="Center" FontSize="18" Margin="8,0,0,0"/>-->
|
||||
<Image x:Name="avater"
|
||||
Source="{ReflectionBinding Path=AvaterPath, Source={x:Static service:UserService.Current},Mode=OneWay,Converter={StaticResource BitmapAssetValueConverter},ConverterParameter=64}"
|
||||
Stretch="Uniform"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Left"
|
||||
Height="64"
|
||||
Width="64"/>
|
||||
<StackPanel Spacing="5" VerticalAlignment="Center">
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.User_UnLogin,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
IsVisible="{ReflectionBinding Path=User,Mode=OneWay,Source={x:Static service:UserService.Current},Converter={StaticResource IsNullConverter}}"
|
||||
Foreground="{DynamicResource HighlightForegroundBrushKey}"
|
||||
FontSize="14"
|
||||
VerticalAlignment="Center"/>
|
||||
<controls:ScrollingTextBlock Text="{ReflectionBinding Path=User.NickName,Mode=OneWay,Source={x:Static service:UserService.Current}}"
|
||||
IsVisible="{ReflectionBinding Path=User,Mode=OneWay,Source={x:Static service:UserService.Current},Converter={StaticResource IsNullConverter},ConverterParameter=invert}"
|
||||
Foreground="{DynamicResource HighlightForegroundBrushKey}"
|
||||
FontSize="14"
|
||||
VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{ReflectionBinding Path=PhoneNumber,Mode=OneWay,Source={x:Static service:UserService.Current}}"
|
||||
IsVisible="{ReflectionBinding Path=User.HasPhoneNumber,Mode=OneWay,Source={x:Static service:UserService.Current}}"
|
||||
Foreground="{DynamicResource InactiveForegroundBrushKey}"
|
||||
FontSize="12"
|
||||
VerticalAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
</DockPanel>
|
||||
<ui:Button.Flyout>
|
||||
<ui:MenuFlyout Placement="RightEdgeAlignedTop">
|
||||
<ui:MenuFlyoutItem Text="{ReflectionBinding Path=Res.RefreshAvatar,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{ReflectionBinding Path=RefreshUserAvaterAsync,Source={x:Static service:UserService.Current}}"/>
|
||||
<ui:MenuFlyoutItem Text="{ReflectionBinding Path=Res.UserProfile,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{ReflectionBinding Path=ShowWindow,Source={x:Static service:UserService.Current}}"
|
||||
CommandParameter="UserProfile"/>
|
||||
<ui:MenuFlyoutItem Text="{ReflectionBinding Path=Res.User_ChangePhoneNum,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
IsVisible="{ReflectionBinding Path=HasPhoneNumber,Source={x:Static service:UserService.Current}}}"
|
||||
Command="{ReflectionBinding Path=ShowWindow,Source={x:Static service:UserService.Current}}"
|
||||
CommandParameter="ChangeBindPhoneNumber"/>
|
||||
<ui:MenuFlyoutItem Text="{ReflectionBinding Path=Res.User_BindPhoneNum,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
IsVisible="{ReflectionBinding Path=!HasPhoneNumber,Source={x:Static service:UserService.Current}}}"
|
||||
Command="{ReflectionBinding Path=ShowWindow,Source={x:Static service:UserService.Current}}"
|
||||
CommandParameter="BindPhoneNumber"/>
|
||||
<ui:MenuFlyoutItem Text="{ReflectionBinding Path=Res.SignOut,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{ReflectionBinding Path=SignOut,Source={x:Static service:UserService.Current}}"/>
|
||||
</ui:MenuFlyout>
|
||||
</ui:Button.Flyout>
|
||||
</ui:Button>
|
||||
|
||||
</ui:NavigationView.PaneCustomContent>
|
||||
|
||||
<ui:NavigationView.MenuItemTemplate>
|
||||
<DataTemplate DataType="{x:Type vm:TabItemViewModel}">
|
||||
<ui:NavigationViewItem Content="{Binding Name,StringFormat={} {0}}">
|
||||
<ui:NavigationViewItem.Icon>
|
||||
<!--<ui:PathIcon Data="{Binding IconKey,Converter={StaticResource DrawingKeyValueConverter}}"/>-->
|
||||
<ui:ImageIcon>
|
||||
<DrawingImage Drawing="{Binding IconKey,Converter={StaticResource DrawingKeyValueConverter}}"/>
|
||||
</ui:ImageIcon>
|
||||
</ui:NavigationViewItem.Icon>
|
||||
</ui:NavigationViewItem>
|
||||
</DataTemplate>
|
||||
</ui:NavigationView.MenuItemTemplate>
|
||||
</ui:NavigationView>
|
||||
|
||||
<!--<TabControl
|
||||
Items="{Binding TabItems}"
|
||||
SelectedItem="{Binding SelectedItem}"
|
||||
Margin="0 22 0 0"
|
||||
Classes="NavBar">
|
||||
<TabControl.DataTemplates>
|
||||
<!--<DataTemplate DataType="vm:DebugWebViewPageViewModel">
|
||||
-->
|
||||
<!--<DataTemplate DataType="vm:DebugWebViewPageViewModel">
|
||||
<pages:DebugWebViewPage/>
|
||||
</DataTemplate>-->
|
||||
<!--
|
||||
<DataTemplate DataType="vm:ProxyScriptManagePageViewModel">
|
||||
<pages:ProxyScriptManagePage/>
|
||||
</DataTemplate>
|
||||
@@ -207,7 +357,7 @@
|
||||
</DockPanel>
|
||||
</DataTemplate>
|
||||
</TabControl.ItemTemplate>
|
||||
</TabControl>
|
||||
</TabControl>-->
|
||||
<!--Toast-->
|
||||
<controls:ToastMessage />
|
||||
</Panel>
|
||||
|
||||
@@ -4,6 +4,7 @@ using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Markup.Xaml;
|
||||
using Avalonia.Platform;
|
||||
using Avalonia.ReactiveUI;
|
||||
using FluentAvalonia.UI.Controls;
|
||||
using System.Application.UI.ViewModels;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
@@ -14,19 +15,59 @@ namespace System.Application.UI.Views
|
||||
public MainView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
//var sp = this.FindControl<StackPanel>("titleMenu");
|
||||
//if (sp != null)
|
||||
// if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
// sp.Margin = new Avalonia.Thickness(0, 0, 140, 0);
|
||||
// else
|
||||
// sp.Margin = new Avalonia.Thickness(0, 6, 10, 0);
|
||||
|
||||
var avater = this.FindControl<Image>("avater");
|
||||
var nav = this.FindControl<NavigationView>("NavigationView");
|
||||
var back = this.FindControl<ExperimentalAcrylicBorder>("NavBarBackground");
|
||||
|
||||
if (back != null && nav != null)
|
||||
{
|
||||
nav.GetObservable(NavigationView.IsPaneOpenProperty)
|
||||
.Subscribe(x =>
|
||||
{
|
||||
if (nav.PaneDisplayMode == NavigationViewPaneDisplayMode.Top)
|
||||
{
|
||||
back.IsVisible = false;
|
||||
//back.Width = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
back.Width = x ? 240 : 48;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (back != null && nav != null)
|
||||
{
|
||||
nav.GetObservable(NavigationView.IsPaneOpenProperty)
|
||||
.Subscribe(x =>
|
||||
{
|
||||
if (!x)
|
||||
{
|
||||
avater.Width = 26;
|
||||
avater.Height = 26;
|
||||
avater.Margin = new Thickness(-4, 0, 10, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
avater.Width = 64;
|
||||
avater.Height = 64;
|
||||
avater.Margin = new Thickness(10, 0);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
|
||||
var sp = this.FindControl<StackPanel>("titleMenu");
|
||||
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
sp.Margin = new Avalonia.Thickness(0, 0, 140, 0);
|
||||
else
|
||||
sp.Margin = new Avalonia.Thickness(0, 6, 10, 0);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
mc:Ignorable="d"
|
||||
d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="System.Application.UI.Views.Pages.AboutPage">
|
||||
<TabControl Classes="flat">
|
||||
<TabControl Classes="flat" Margin="0 5 0 0">
|
||||
<TabItem Header="{ReflectionBinding Path=Res.About_ThisSoft,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<pages:About_SoftwarePage>
|
||||
<pages:About_SoftwarePage.DataContext>
|
||||
|
||||
+65
-55
@@ -41,7 +41,7 @@
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
<Style Selector="TextBlock#LogoText3">
|
||||
<Setter Property="Foreground" Value="{DynamicResource ThemeAccentBrushKey}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource SystemAccentColor}" />
|
||||
<Setter Property="RenderTransformOrigin" Value="50%,50%" />
|
||||
<Style.Animations>
|
||||
<Animation Delay="0.34" Duration="0.37" Easing="{StaticResource FluentEasing}">
|
||||
@@ -65,11 +65,6 @@
|
||||
<Style Selector="TextBlock.Header">
|
||||
<Setter Property="FontWeight" Value="Regular" />
|
||||
</Style>
|
||||
<Style Selector="TextBlock.Hyperlink">
|
||||
<Setter Property="TextDecorations" Value="Underline" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource SystemAccentColor}" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
<Style Selector="TextBox.Content">
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSizeH6}" />
|
||||
@@ -79,7 +74,7 @@
|
||||
</UserControl.Styles>
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
Padding="{StaticResource PageMargin2}">
|
||||
Padding="{StaticResource PageMargin}">
|
||||
<DockPanel>
|
||||
<StackPanel Spacing="10" DockPanel.Dock="Top">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
@@ -97,49 +92,59 @@
|
||||
IsReadOnly="True"
|
||||
MinWidth="10"
|
||||
Text="{Binding VersionDisplay,Mode=OneTime}"/>
|
||||
<Button Classes="plain"
|
||||
<Button Classes="Hyperlink"
|
||||
Content="{ReflectionBinding Path=Res.CheckUpdate,Source={x:Static resx:R.Current},Mode=OneWay}"
|
||||
Command="{Binding CheckUpdateCommand}"
|
||||
VerticalAlignment="Center"
|
||||
VerticalContentAlignment="Center">
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.CheckUpdate,Source={x:Static resx:R.Current},Mode=OneWay}" Classes="Hyperlink" />
|
||||
</Button>
|
||||
<Button Classes="plain"
|
||||
VerticalContentAlignment="Center"/>
|
||||
<Button Classes="Hyperlink"
|
||||
Content="{ReflectionBinding Path=Res.About_UpdateLog,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.ChangeLogLink}"
|
||||
VerticalAlignment="Center"
|
||||
VerticalContentAlignment="Center">
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.About_UpdateLog,Mode=OneWay,Source={x:Static resx:R.Current}}" Classes="Hyperlink" />
|
||||
</Button>
|
||||
VerticalContentAlignment="Center"/>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Classes="Header light"
|
||||
Margin="0,0,6,0"
|
||||
Text="Developers:"
|
||||
VerticalAlignment="Center"/>
|
||||
<Button Classes="plain" Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.RmbadminLink}">
|
||||
<TextBlock Text="@软妹币玩家" Classes="Hyperlink" />
|
||||
</Button>
|
||||
<Button Classes="Hyperlink"
|
||||
Content="@软妹币玩家"
|
||||
Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.RmbadminLink}"/>
|
||||
<TextBlock Classes="LinkSeparatorPadding" Text="-" />
|
||||
<Button Classes="plain" Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.AigioLLink}">
|
||||
<TextBlock Text="@AigioL" Classes="Hyperlink" />
|
||||
</Button>
|
||||
<Button Classes="Hyperlink"
|
||||
Content="@AigioL"
|
||||
Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.AigioLLink}"/>
|
||||
<TextBlock Classes="LinkSeparatorPadding" Text="-" />
|
||||
<Button Classes="plain" Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.MossimosLink}">
|
||||
<TextBlock Text="@Mossimos" Classes="Hyperlink" />
|
||||
</Button>
|
||||
<Button Classes="Hyperlink"
|
||||
Content="@Mossimos"
|
||||
Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.MossimosLink}"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Classes="Header light"
|
||||
Margin="0,0,6,0"
|
||||
Text="Desktop UI Desgin:"
|
||||
VerticalAlignment="Center"/>
|
||||
<Button Classes="Hyperlink"
|
||||
Content="@Pixel Mover"
|
||||
Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="https://space.bilibili.com/18356231"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Classes="Header light"
|
||||
Margin="0,0,6,0"
|
||||
Text="Business Cooperation Contact:"
|
||||
VerticalAlignment="Center"/>
|
||||
<Button Classes="plain" Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.CliencerLink}">
|
||||
<TextBlock Text="@Cliencer克总" Classes="Hyperlink" />
|
||||
</Button>
|
||||
<Button Classes="Hyperlink"
|
||||
Content="@Cliencer克总"
|
||||
Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.CliencerLink}"/>
|
||||
</StackPanel>
|
||||
|
||||
<WrapPanel>
|
||||
@@ -147,15 +152,15 @@
|
||||
VerticalAlignment="Center"
|
||||
Text="This open source software is licensed with " />
|
||||
<StackPanel Orientation="Horizontal" Spacing="5" Margin="2">
|
||||
<Button Classes="plain"
|
||||
<Button Classes="Hyperlink"
|
||||
Content="GPLv3 License"
|
||||
Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.LicenseLink}">
|
||||
<TextBlock Text="GPLv3 License" Classes="Hyperlink" />
|
||||
</Button>
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.LicenseLink}"/>
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
|
||||
<TextBox Classes="readonlybox"
|
||||
IsReadOnly="True"
|
||||
Padding="0"
|
||||
TextWrapping="Wrap">
|
||||
<TextBox.Text>
|
||||
@@ -183,58 +188,63 @@
|
||||
DockPanel.Dock="Bottom" HorizontalAlignment="Center" Orientation="Vertical">
|
||||
<WrapPanel Margin="0 0 0 10" HorizontalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal" Spacing="5" Margin="2">
|
||||
<Button Classes="plain" Command="{Binding OpenBrowserCommand}"
|
||||
<Button Classes="Hyperlink"
|
||||
Content="Source Code (Github)"
|
||||
Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.SourceCodeLink}">
|
||||
<TextBlock Text="Source Code (Github)" Classes="Hyperlink" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<TextBlock Classes="LinkSeparatorPadding" Text="-" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="5" Margin="2">
|
||||
<Button Classes="plain"
|
||||
<Button Classes="Hyperlink"
|
||||
Content="Website"
|
||||
Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.OfficialLink}">
|
||||
<TextBlock Text="Website" Classes="Hyperlink" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<TextBlock Classes="LinkSeparatorPadding" Text="-" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="5" Margin="2">
|
||||
<Button Classes="plain" Command="{Binding OpenBrowserCommand}"
|
||||
<Button Classes="Hyperlink"
|
||||
Content="User Support"
|
||||
Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.UserSupportLink}">
|
||||
<TextBlock Text="User Support" Classes="Hyperlink" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<TextBlock Classes="LinkSeparatorPadding" Text="-" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="5" Margin="2">
|
||||
<Button Classes="plain" Command="{Binding OpenBrowserCommand}"
|
||||
<Button Classes="Hyperlink"
|
||||
Content="Bug Reporting"
|
||||
Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.BugReportLink}">
|
||||
<TextBlock Text="Bug Reporting" Classes="Hyperlink" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<TextBlock Classes="LinkSeparatorPadding" Text="-" />
|
||||
<StackPanel Orientation="Horizontal" Spacing="5" Margin="2">
|
||||
<Button Classes="plain"
|
||||
<Button Classes="Hyperlink"
|
||||
Content="FAQ"
|
||||
Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.FAQLink}">
|
||||
<TextBlock Text="FAQ" Classes="Hyperlink" />
|
||||
</Button>
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="5" HorizontalAlignment="Center">
|
||||
<Button Classes="plain" Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.AgreementLink}">
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.User_Agreement,Mode=OneWay,Source={x:Static resx:R.Current}}" Classes="Hyperlink" />
|
||||
<Button Classes="Hyperlink"
|
||||
Content="{ReflectionBinding Path=Res.User_Agreement,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.AgreementLink}">
|
||||
</Button>
|
||||
<TextBlock Classes="LinkSeparatorPadding" Text="-" />
|
||||
<Button Classes="plain" Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.PrivacyLink}">
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.User_Privacy,Mode=OneWay,Source={x:Static resx:R.Current}}" Classes="Hyperlink" />
|
||||
<Button Classes="Hyperlink"
|
||||
Content="{ReflectionBinding Path=Res.User_Privacy,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.PrivacyLink}">
|
||||
</Button>
|
||||
<TextBlock Classes="LinkSeparatorPadding" Text="-"
|
||||
IsVisible="{ReflectionBinding Path=IsAuthenticated,Source={x:Static service:UserService.Current}}" />
|
||||
<Button Classes="plain"
|
||||
Command="{Binding DelAccountCommand}"
|
||||
IsVisible="{ReflectionBinding Path=IsAuthenticated,Source={x:Static service:UserService.Current}}">
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.DelAccount,Mode=OneWay,Source={x:Static resx:R.Current}}" Classes="Hyperlink" />
|
||||
<Button Classes="Hyperlink"
|
||||
Content="{ReflectionBinding Path=Res.DelAccount,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{Binding DelAccountCommand}"
|
||||
IsVisible="{ReflectionBinding Path=IsAuthenticated,Source={x:Static service:UserService.Current}}">
|
||||
</Button>
|
||||
</StackPanel>
|
||||
<WrapPanel HorizontalAlignment="Center">
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
x:DataType="vm:ArchiSteamFarmPlusPageViewModel"
|
||||
x:CompileBindings="True"
|
||||
x:Class="System.Application.UI.Views.Pages.ASF_GlobalConfigPage">
|
||||
<StackPanel Spacing="20" Margin="20 0">
|
||||
<StackPanel Spacing="20" Margin="10 0">
|
||||
<StackPanel.Styles>
|
||||
<Style Selector="TextBlock">
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSizeH7}"/>
|
||||
|
||||
+6
-22
@@ -20,8 +20,11 @@
|
||||
x:Class="System.Application.UI.Views.Pages.ArchiSteamFarmPlusPage">
|
||||
<DockPanel>
|
||||
|
||||
<Border Padding="10" DockPanel.Dock="Top" Margin="10 0 10 10"
|
||||
Classes="paper" Background="{DynamicResource ThemeBrushKey}">
|
||||
<Border Margin="10"
|
||||
Padding="10"
|
||||
DockPanel.Dock="Top"
|
||||
Classes="paper"
|
||||
Background="{DynamicResource ThemeBrushKey}">
|
||||
<DockPanel>
|
||||
<StackPanel
|
||||
Orientation="Horizontal"
|
||||
@@ -74,30 +77,11 @@
|
||||
|
||||
<TabControl Classes="flat">
|
||||
<TabItem Header="ASF控制台">
|
||||
<controls:ConsoleShell x:Name="ConsoleLog" Margin="20 0"
|
||||
<controls:ConsoleShell x:Name="ConsoleLog" Margin="10 0"
|
||||
LogText="{ReflectionBinding Source={x:Static service:ASFService.Current},Path=ConsoleLogText,Mode=TwoWay}"
|
||||
IsMask="{ReflectionBinding Source={x:Static ccl_service:IArchiSteamFarmService.Instance},Path=IsReadPasswordLine}">
|
||||
</controls:ConsoleShell>
|
||||
</TabItem>
|
||||
<TabItem Header="ASF Web UI">
|
||||
<Panel Margin="20 0">
|
||||
<!--<StackPanel Spacing="20"
|
||||
VerticalAlignment="Center">
|
||||
<StackPanel Orientation="Horizontal" Spacing="8" HorizontalAlignment="Center">
|
||||
<Ellipse Height="6" Width="6" Fill="#FF4F58" Margin="0 0 5 0" VerticalAlignment="Center"/>
|
||||
|
||||
<Ellipse Height="6" Width="6" Fill="#47A42B" Margin="0 0 5 0" VerticalAlignment="Center" />
|
||||
|
||||
<TextBlock Text="ArchiSteamFarm 未运行" VerticalAlignment="Center"></TextBlock>
|
||||
</StackPanel>
|
||||
<Button Content="启动ASF" Width="200"
|
||||
Classes="action" Command="{ReflectionBinding RunOrStopASF}"
|
||||
HorizontalAlignment="Center"/>
|
||||
</StackPanel>-->
|
||||
|
||||
<!--<controls:WebView3 Url="{ReflectionBinding Source={x:Static service:ASFService.Current},Path=IPCUrl}"/>-->
|
||||
</Panel>
|
||||
</TabItem>
|
||||
|
||||
<TabItem Header="Bot配置">
|
||||
<pages:ASF_BotPage/>
|
||||
|
||||
+102
-87
@@ -17,29 +17,71 @@
|
||||
<Grid IsVisible="{ReflectionBinding Source={x:Static service:ProxyService.Current},Path=!ProxyStatus,Mode=OneWay}"
|
||||
ColumnDefinitions="Auto,*"
|
||||
RowDefinitions="Auto,*">
|
||||
<!--<Border Margin="10 0 10 10" Padding="20" Classes="paper" Background="{DynamicResource ThemeBrushKey}">
|
||||
<Button
|
||||
Content="{ReflectionBinding Path=Res.CommunityFix_Acceleration,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{Binding StartProxyButton_Click}"
|
||||
Background="{DynamicResource SystemAccentColor}"
|
||||
HorizontalAlignment="Stretch"
|
||||
FontSize="18"
|
||||
VerticalContentAlignment="Center"
|
||||
<Border DockPanel.Dock="Top"
|
||||
Grid.Row="0"
|
||||
Grid.ColumnSpan="2"
|
||||
Margin="10"
|
||||
Padding="20 10"
|
||||
Classes="paper"
|
||||
Background="{DynamicResource ThemeBrushKey}">
|
||||
<DockPanel>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
Spacing="15"
|
||||
HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center">
|
||||
<!--<TextBlock Text="{ReflectionBinding Path=Res.CommunityFix_ProxyMode,Mode=OneWay,Source={x:Static resx:R.Current}}" Margin="0 5"
|
||||
Foreground="{DynamicResource HighlightForegroundBrushKey}"></TextBlock>-->
|
||||
<RadioButton Content="{ReflectionBinding Path=Res.CommunityFix_ProxyMode_Hosts,Mode=OneWay,Source={x:Static resx:R.Current}}" ToolTip.Tip="{ReflectionBinding Path=Res.CommunityFix_ProxyMode_HostsTip,Mode=OneWay,Source={x:Static resx:R.Current}}" IsChecked="{Binding Source={x:Static ms:ProxySettings.EnableWindowsProxy},Path=!Value, Mode=TwoWay}"></RadioButton>
|
||||
<RadioButton Content="{ReflectionBinding Path=Res.CommunityFix_ProxyMode_WinSystem,Mode=OneWay,Source={x:Static resx:R.Current}}" ToolTip.Tip="{ReflectionBinding Path=Res.CommunityFix_ProxyMode_WinSystemTip,Mode=OneWay,Source={x:Static resx:R.Current}}" IsChecked="{Binding Source={x:Static ms:ProxySettings.EnableWindowsProxy},Path=Value, Mode=TwoWay}"></RadioButton>
|
||||
<Menu Classes="BindMenu">
|
||||
<MenuItem Items="{Binding MenuItems}"
|
||||
Classes="BindItem"
|
||||
IsVisible="{Binding !MenuItems,Converter={StaticResource IsNullConverter}}">
|
||||
<MenuItem.Header>
|
||||
<PathIcon Data="{StaticResource MoreDrawing}" Width="14"></PathIcon>
|
||||
</MenuItem.Header>
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
</StackPanel>
|
||||
<StackPanel Orientation="Horizontal"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center">
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.CommunityFix_EnableScriptService,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Margin="0 3 0 0"
|
||||
VerticalAlignment="Center"/>
|
||||
<ToggleSwitch Classes="onlyToggleSwitch"
|
||||
VerticalAlignment="Center"
|
||||
IsChecked="{Binding Source={x:Static service:ProxyService.Current},Path=IsEnableScript}"
|
||||
Margin="10 0 15 0"/>
|
||||
<Button Classes="action"
|
||||
Content="{ReflectionBinding Path=Res.CommunityFix_StartProxy,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
FontSize="16"
|
||||
MinWidth="150"
|
||||
Width="200"
|
||||
MinHeight="40"
|
||||
HorizontalContentAlignment="Center"
|
||||
Height="50"
|
||||
VerticalAlignment="Bottom"></Button>
|
||||
</Border>-->
|
||||
VerticalContentAlignment="Center"
|
||||
Command="{Binding StartProxyButton_Click}"
|
||||
CommandParameter="True"></Button>
|
||||
|
||||
<Border Grid.RowSpan="2"
|
||||
<!--<ToggleSwitch Content="{ReflectionBinding Path=Res.CommunityFix_StartProxy,Mode=OneWay,Source={x:Static resx:R.Current}}" IsChecked="{Binding Source={x:Static service:ProxyService.Current},Path=ProxyStatus}"></ToggleSwitch>-->
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
<Border Grid.Column="0"
|
||||
Grid.Row="1"
|
||||
Margin="10 0 10 10"
|
||||
Classes="paper"
|
||||
Background="{DynamicResource ThemeBrushKey}">
|
||||
<ListBox x:Name="items" Classes="metro" Width="350"
|
||||
Items="{ReflectionBinding Source={x:Static service:ProxyService.Current},Path=ProxyDomainsList,Mode=OneWay}"
|
||||
SelectedItem="{ReflectionBinding Source={x:Static service:ProxyService.Current},Path=SelectGroup,Mode=TwoWay}"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
AutoScrollToSelectedItem="True"
|
||||
Background="Transparent">
|
||||
<ListBox x:Name="items"
|
||||
Classes="metro"
|
||||
Width="350"
|
||||
Items="{ReflectionBinding Source={x:Static service:ProxyService.Current},Path=ProxyDomainsList,Mode=OneWay}"
|
||||
SelectedItem="{ReflectionBinding Source={x:Static service:ProxyService.Current},Path=SelectGroup,Mode=TwoWay}"
|
||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||
AutoScrollToSelectedItem="True"
|
||||
Background="Transparent">
|
||||
<ListBox.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<!--<Border Classes="paper" Background="{DynamicResource ThemeBrushKey}">-->
|
||||
@@ -69,85 +111,58 @@
|
||||
</ListBox>
|
||||
</Border>
|
||||
|
||||
<DockPanel Grid.Column="1" Grid.RowSpan="2">
|
||||
<Border DockPanel.Dock="Top" Grid.Row="0" Grid.RowSpan="2" Grid.Column="1" Margin="0 0 10 10" Padding="20" Classes="paper" Background="{DynamicResource ThemeBrushKey}">
|
||||
<WrapPanel>
|
||||
<WrapPanel Orientation="Horizontal" VerticalAlignment="Center">
|
||||
<Button Classes="action"
|
||||
Content="{ReflectionBinding Path=Res.CommunityFix_StartProxy,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
FontSize="16"
|
||||
MinWidth="150"
|
||||
Width="220"
|
||||
MinHeight="40"
|
||||
HorizontalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Command="{Binding StartProxyButton_Click}"
|
||||
CommandParameter="True"></Button>
|
||||
<ToggleSwitch Content="{ReflectionBinding Path=Res.CommunityFix_EnableScriptService,Mode=OneWay,Source={x:Static resx:R.Current}}" IsChecked="{Binding Source={x:Static service:ProxyService.Current},Path=IsEnableScript}" Margin="20 0"></ToggleSwitch>
|
||||
<!--<ToggleSwitch Content="{ReflectionBinding Path=Res.CommunityFix_StartProxy,Mode=OneWay,Source={x:Static resx:R.Current}}" IsChecked="{Binding Source={x:Static service:ProxyService.Current},Path=ProxyStatus}"></ToggleSwitch>-->
|
||||
</WrapPanel>
|
||||
<StackPanel HorizontalAlignment="Right">
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.CommunityFix_ProxyMode,Mode=OneWay,Source={x:Static resx:R.Current}}" Margin="0 5"
|
||||
Foreground="{DynamicResource HighlightForegroundBrushKey}"></TextBlock>
|
||||
<RadioButton Content="{ReflectionBinding Path=Res.CommunityFix_ProxyMode_Hosts,Mode=OneWay,Source={x:Static resx:R.Current}}" ToolTip.Tip="{ReflectionBinding Path=Res.CommunityFix_ProxyMode_HostsTip,Mode=OneWay,Source={x:Static resx:R.Current}}" IsChecked="{Binding Source={x:Static ms:ProxySettings.EnableWindowsProxy},Path=!Value, Mode=TwoWay}"></RadioButton>
|
||||
<RadioButton Content="{ReflectionBinding Path=Res.CommunityFix_ProxyMode_WinSystem,Mode=OneWay,Source={x:Static resx:R.Current}}" ToolTip.Tip="{ReflectionBinding Path=Res.CommunityFix_ProxyMode_WinSystemTip,Mode=OneWay,Source={x:Static resx:R.Current}}" IsChecked="{Binding Source={x:Static ms:ProxySettings.EnableWindowsProxy},Path=Value, Mode=TwoWay}"></RadioButton>
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
</Border>
|
||||
|
||||
<Border DockPanel.Dock="Bottom" Grid.Column="1" Grid.Row="1" Classes="paper" Margin="0 0 10 10" Background="{DynamicResource ThemeBrushKey}">
|
||||
<Panel Margin="20 0">
|
||||
<DockPanel>
|
||||
<DockPanel Margin="0 10" DockPanel.Dock="Top">
|
||||
<CheckBox MinWidth="20"
|
||||
Content="{ReflectionBinding Path=Res.CommunityFix_AllCheck,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
IsChecked="{Binding #items.SelectedItem.ThreeStateEnable,Mode=TwoWay}">
|
||||
</CheckBox>
|
||||
<TextBlock Text="{Binding #items.SelectedItem.Name}"
|
||||
FontSize="20"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
Foreground="{DynamicResource HighlightForegroundBrushKey}"></TextBlock>
|
||||
</DockPanel>
|
||||
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" DockPanel.Dock="Bottom">
|
||||
<ItemsControl Items="{ReflectionBinding #items.SelectedItem.ObservableItems}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<DockPanel>
|
||||
<CheckBox HorizontalAlignment="Left" IsChecked="{Binding Enable}">
|
||||
<TextBlock Text="{Binding Name}"></TextBlock>
|
||||
</CheckBox>
|
||||
<TextBlock Text="{Binding DomainNamesArray[0]}"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource HighlightForegroundBrushKey}"></TextBlock>
|
||||
</DockPanel>
|
||||
<Separator Classes="Separator" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
<Border Grid.Column="1" Grid.Row="1" Classes="paper" Margin="0 0 10 10" Background="{DynamicResource ThemeBrushKey}">
|
||||
<Panel Margin="20 0">
|
||||
<DockPanel>
|
||||
<DockPanel Margin="0 10" DockPanel.Dock="Top">
|
||||
<CheckBox MinWidth="20"
|
||||
Content="{ReflectionBinding Path=Res.CommunityFix_AllCheck,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
IsChecked="{Binding #items.SelectedItem.ThreeStateEnable,Mode=TwoWay}">
|
||||
</CheckBox>
|
||||
<TextBlock Text="{Binding #items.SelectedItem.Name}"
|
||||
FontSize="20"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
Foreground="{DynamicResource HighlightForegroundBrushKey}"></TextBlock>
|
||||
</DockPanel>
|
||||
</Panel>
|
||||
</Border>
|
||||
</DockPanel>
|
||||
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" DockPanel.Dock="Bottom">
|
||||
<ItemsControl Items="{ReflectionBinding #items.SelectedItem.ObservableItems}">
|
||||
<ItemsControl.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<StackPanel>
|
||||
<DockPanel>
|
||||
<CheckBox HorizontalAlignment="Left" IsChecked="{Binding Enable}">
|
||||
<TextBlock Text="{Binding Name}"></TextBlock>
|
||||
</CheckBox>
|
||||
<TextBlock Text="{Binding DomainNamesArray[0]}"
|
||||
HorizontalAlignment="Right"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource HighlightForegroundBrushKey}"></TextBlock>
|
||||
</DockPanel>
|
||||
<Separator Classes="Separator" />
|
||||
</StackPanel>
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
</ItemsControl>
|
||||
</ScrollViewer>
|
||||
</DockPanel>
|
||||
</Panel>
|
||||
</Border>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Grid RowDefinitions="Auto,*,Auto"
|
||||
HorizontalAlignment="Stretch" IsVisible="{Binding Source={x:Static service:ProxyService.Current},Path=ProxyStatus,Mode=OneWay}">
|
||||
<StackPanel Grid.Row="0" HorizontalAlignment="Center" Margin="0 10 0 0" Spacing="10">
|
||||
<WrapPanel>
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.CommunityFix_AlreadyProxy,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
FontSize="26"
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.CommunityFix_AlreadyProxy,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
FontSize="26"
|
||||
Margin="0 0 10 0"
|
||||
VerticalAlignment="Center"></TextBlock>
|
||||
<TextBlock FontSize="26"
|
||||
<TextBlock FontSize="26"
|
||||
Text="{Binding AccelerateTime,Source={x:Static service:ProxyService.Current},StringFormat={}{0:HH:mm:ss}}" VerticalAlignment="Center"></TextBlock>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
<WrapPanel HorizontalAlignment="Center">
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.CommunityFix_ProxyModeTip,Mode=OneWay,Source={x:Static resx:R.Current}}" FontSize="14"/>
|
||||
|
||||
|
||||
@@ -70,7 +70,11 @@
|
||||
Header="筛选"
|
||||
ExpandDirection="Down"
|
||||
Margin="20 0 20 10">-->
|
||||
<Border DockPanel.Dock="Top" Margin="20 0 20 10">
|
||||
<Border DockPanel.Dock="Top"
|
||||
Margin="{StaticResource ScrollMargin}"
|
||||
Padding="10"
|
||||
Classes="paper"
|
||||
Background="{DynamicResource ThemeBrushKey}">
|
||||
<DockPanel>
|
||||
<StackPanel
|
||||
Orientation="Horizontal"
|
||||
@@ -85,11 +89,15 @@
|
||||
</StackPanel.Styles>
|
||||
|
||||
<Button
|
||||
HorizontalContentAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
Width="200" Height="35">
|
||||
<Button.Content>
|
||||
<DockPanel>
|
||||
<TextBlock VerticalAlignment="Center" Text="{Binding TypeFilterString}" TextTrimming="CharacterEllipsis"/>
|
||||
<TextBlock VerticalAlignment="Center"
|
||||
Text="{Binding TypeFilterString}"
|
||||
TextTrimming="CharacterEllipsis"/>
|
||||
<PathIcon VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
Data="{StaticResource ChevronDownDrawing}"
|
||||
@@ -111,21 +119,21 @@
|
||||
<DockPanel>
|
||||
<CheckBox IsChecked="{Binding Enable,Mode=TwoWay}"
|
||||
VerticalAlignment="Center">
|
||||
<WrapPanel>
|
||||
<WrapPanel.Styles>
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<StackPanel.Styles>
|
||||
<Style Selector="TextBlock.count">
|
||||
<Setter Property="VerticalAlignment" Value="Center"></Setter>
|
||||
<Setter Property="FontSize" Value="12"></Setter>
|
||||
<Setter Property="Foreground" Value="{DynamicResource InactiveForegroundBrushKey}"></Setter>
|
||||
</Style>
|
||||
</WrapPanel.Styles>
|
||||
</StackPanel.Styles>
|
||||
<TextBlock Text="{Binding Name_Localiza}"
|
||||
VerticalAlignment="Center"/>
|
||||
<TextBlock Margin="5 0 0 0" Text="(" Classes="count"/>
|
||||
<TextBlock Classes="count"
|
||||
Text="{Binding Count}"/>
|
||||
<TextBlock Classes="count" Text=")"/>
|
||||
</WrapPanel>
|
||||
</StackPanel>
|
||||
</CheckBox>
|
||||
</DockPanel>
|
||||
</DataTemplate>
|
||||
@@ -181,6 +189,16 @@
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.GameList_IdleGamesManger,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<PathIcon Data="{StaticResource TopSpeedDrawing}" />
|
||||
</Button>
|
||||
|
||||
<Menu Classes="BindMenu">
|
||||
<MenuItem Items="{Binding MenuItems}"
|
||||
Classes="BindItem"
|
||||
IsVisible="{Binding !MenuItems,Converter={StaticResource IsNullConverter}}">
|
||||
<MenuItem.Header>
|
||||
<PathIcon Data="{StaticResource MoreDrawing}" Width="14"></PathIcon>
|
||||
</MenuItem.Header>
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
</StackPanel>
|
||||
<StackPanel
|
||||
Orientation="Horizontal"
|
||||
@@ -195,23 +213,14 @@
|
||||
MinWidth="150">
|
||||
<TextBox.InnerLeftContent>
|
||||
<PathIcon Data="{StaticResource SearchDrawing}"
|
||||
Width="18" Height="18"
|
||||
Opacity="0.8"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Left"
|
||||
Margin="15,8,0,0" />
|
||||
Classes="TextBoxIcon"/>
|
||||
</TextBox.InnerLeftContent>
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
<!--</Expander>-->
|
||||
<!--<TreeView DockPanel.Dock="Left">
|
||||
<TreeView.ItemTemplate>
|
||||
<TreeDataTemplate ItemsSource="{Binding Children}">
|
||||
<TextBlock Text="{Binding Name}"/>
|
||||
</TreeDataTemplate>
|
||||
</TreeView.ItemTemplate>
|
||||
</TreeView>-->
|
||||
|
||||
<Panel>
|
||||
<StackPanel IsVisible="{ReflectionBinding Source={x:Static service:SteamConnectService.Current},Path=IsLoadingGameList,Mode=OneWay}"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" Spacing="10">
|
||||
@@ -229,13 +238,13 @@
|
||||
<ScrollViewer
|
||||
HorizontalScrollBarVisibility="Disabled"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
Padding="0 0 0 10">
|
||||
Padding="10 0 10 10">
|
||||
<ItemsRepeater x:Name="Apps" Items="{Binding SteamApps}">
|
||||
<ItemsRepeater.Layout>
|
||||
<UniformGridLayout ItemsJustification="SpaceEvenly"
|
||||
<UniformGridLayout ItemsJustification="SpaceBetween"
|
||||
MinRowSpacing="10"
|
||||
MinColumnSpacing="10"
|
||||
MaximumRowsOrColumns="10"
|
||||
MaximumRowsOrColumns="15"
|
||||
ItemsStretch="Fill" />
|
||||
</ItemsRepeater.Layout>
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
@@ -353,35 +362,34 @@
|
||||
Text="{Binding DisplayName}"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
TextWrapping="WrapWithOverflow"
|
||||
TextTrimming="CharacterEllipsis"
|
||||
TextAlignment="Center"
|
||||
FontSize="20"
|
||||
FontSize="18"
|
||||
Foreground="#FFFFFFFF"
|
||||
IsVisible="{Binding LibraryLogoStream^,Converter={StaticResource IsNullConverter}}"/>
|
||||
|
||||
|
||||
<Border IsVisible="{Binding IsInstalled}"
|
||||
Margin="20 0 20 -3"
|
||||
Margin="10 0 10 -3"
|
||||
CornerRadius="3"
|
||||
Classes="paper"
|
||||
Background="#3D4450"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Bottom">
|
||||
<StackPanel Margin="15 3"
|
||||
<WrapPanel Margin="10 3"
|
||||
Orientation="Horizontal"
|
||||
Spacing="3"
|
||||
HorizontalAlignment="Center">
|
||||
<TextBlock Text="{Binding InstalledDrive}"
|
||||
Foreground="#FFFFFFFF"
|
||||
IsVisible="{Binding InstalledDrive,Converter={StaticResource IsNullConverter},ConverterParameter=invert}"
|
||||
VerticalAlignment="Center"
|
||||
FontSize="12"/>
|
||||
Margin="0 0 5 0"
|
||||
FontSize="11"/>
|
||||
<TextBlock Text="{Binding SizeOnDisk,Converter={StaticResource SizeConverter}}"
|
||||
Foreground="#FFFFFFFF"
|
||||
TextWrapping="Wrap"
|
||||
VerticalAlignment="Center"
|
||||
TextAlignment="Center"
|
||||
FontSize="12"/>
|
||||
</StackPanel>
|
||||
FontSize="11"/>
|
||||
</WrapPanel>
|
||||
</Border>
|
||||
</Panel>
|
||||
</Border>
|
||||
|
||||
@@ -8,138 +8,196 @@
|
||||
xmlns:controls="clr-namespace:System.Application.UI.Views.Controls"
|
||||
xmlns:i="using:Avalonia.Xaml.Interactivity"
|
||||
xmlns:ia="using:Avalonia.Xaml.Interactions.Core"
|
||||
xmlns:ui="using:FluentAvalonia.UI.Controls"
|
||||
x:Name="u"
|
||||
x:DataType="vm:LocalAuthPageViewModel"
|
||||
x:CompileBindings="True"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="System.Application.UI.Views.Pages.LocalAuthPage">
|
||||
<Panel HorizontalAlignment="Stretch">
|
||||
<DockPanel>
|
||||
<Border DockPanel.Dock="Top"
|
||||
Classes="paper"
|
||||
Background="{DynamicResource ThemeBrushKey}"
|
||||
Padding="10"
|
||||
Margin="{StaticResource ScrollMargin}">
|
||||
<ui:CommandBar DefaultLabelPosition="Right">
|
||||
<ui:CommandBar.PrimaryCommands>
|
||||
<ui:CommandBarButton Icon="Add"
|
||||
Command="{Binding AddAuthCommand}"
|
||||
Label="{ReflectionBinding Path=Res.Add,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
|
||||
<TextBlock IsVisible="{CompiledBinding IsAuthenticatorsEmpty}"
|
||||
Text="{ReflectionBinding Path=Res.LocalAuth_NoAuthTip,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
TextWrapping="WrapWithOverflow"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
|
||||
<ui:CommandBarButton
|
||||
Command="{Binding EncryptionAuthCommand}"
|
||||
Label="{ReflectionBinding Path=Res.Encrypt,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<ui:CommandBarButton.Icon>
|
||||
<ui:PathIcon Data="{StaticResource ShieldLockDrawing}"/>
|
||||
</ui:CommandBarButton.Icon>
|
||||
</ui:CommandBarButton>
|
||||
|
||||
<!--<StackPanel IsVisible="{CompiledBinding IsAuthenticatorsEmptyAndHasPassword}" VerticalAlignment="Center" HorizontalAlignment="Center" Spacing="10">
|
||||
<ui:CommandBarButton
|
||||
Command="{Binding ExportAuthCommand}"
|
||||
Label="{ReflectionBinding Path=Res.Export,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<ui:CommandBarButton.Icon>
|
||||
<ui:PathIcon Data="{StaticResource ExportDrawing}"/>
|
||||
</ui:CommandBarButton.Icon>
|
||||
</ui:CommandBarButton>
|
||||
|
||||
<ui:CommandBarSeparator/>
|
||||
|
||||
<ui:CommandBarButton
|
||||
Command="{Binding LockCommand}"
|
||||
Label="{ReflectionBinding Path=Res.Lock,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<ui:CommandBarButton.Icon>
|
||||
<ui:PathIcon Data="{StaticResource LockDrawing}"/>
|
||||
</ui:CommandBarButton.Icon>
|
||||
</ui:CommandBarButton>
|
||||
|
||||
<ui:CommandBarButton
|
||||
Command="{Binding RefreshAuthCommand}"
|
||||
Label="{ReflectionBinding Path=Res.Refresh,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<ui:CommandBarButton.Icon>
|
||||
<ui:PathIcon Data="{StaticResource RefreshDrawing}"/>
|
||||
</ui:CommandBarButton.Icon>
|
||||
</ui:CommandBarButton>
|
||||
|
||||
</ui:CommandBar.PrimaryCommands>
|
||||
<ui:CommandBar.SecondaryCommands>
|
||||
<ui:CommandBarButton Icon="Help"
|
||||
Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="https://keylol.com/t710508-1-1"
|
||||
Label="{ReflectionBinding Path=Res.Helper,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
</ui:CommandBar.SecondaryCommands>
|
||||
</ui:CommandBar>
|
||||
</Border>
|
||||
|
||||
<Panel HorizontalAlignment="Stretch" DockPanel.Dock="Bottom">
|
||||
|
||||
<TextBlock IsVisible="{CompiledBinding IsAuthenticatorsEmpty}"
|
||||
Text="{ReflectionBinding Path=Res.LocalAuth_NoAuthTip,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
TextWrapping="WrapWithOverflow"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
|
||||
|
||||
<!--<StackPanel IsVisible="{CompiledBinding IsAuthenticatorsEmptyAndHasPassword}" VerticalAlignment="Center" HorizontalAlignment="Center" Spacing="10">
|
||||
<TextBlock
|
||||
Text="{ReflectionBinding Path=Res.LocalAuth_NoAuthTip,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
TextWrapping="WrapWithOverflow"></TextBlock>
|
||||
</StackPanel>-->
|
||||
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
Padding="20 0 20 10">
|
||||
<ItemsRepeater Items="{Binding Authenticators,Mode=OneWay}">
|
||||
<ItemsRepeater.Layout>
|
||||
<UniformGridLayout ItemsJustification="SpaceAround"
|
||||
MinRowSpacing="20"
|
||||
MaximumRowsOrColumns="8"/>
|
||||
<!--<WrapLayout HorizontalSpacing="40"
|
||||
VerticalSpacing="20" Orientation="Horizontal"></WrapLayout>-->
|
||||
</ItemsRepeater.Layout>
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border x:Name="panel"
|
||||
Classes="paper"
|
||||
Width="250"
|
||||
Height="250"
|
||||
Background="{DynamicResource ThemeBrushKey}">
|
||||
<Border.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem
|
||||
Header="{ReflectionBinding Path=Res.LocalAuth_Copy,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{ReflectionBinding #u.DataContext.CopyCodeCilp}"
|
||||
CommandParameter="{Binding}">
|
||||
<MenuItem.Icon>
|
||||
<PathIcon Data="{StaticResource CopyDrawing}" Width="14"></PathIcon>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="-"></MenuItem>
|
||||
<MenuItem
|
||||
Header="{ReflectionBinding Path=Res.MoveUp,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{ReflectionBinding #u.DataContext.UpMoveOrderById}"
|
||||
CommandParameter="{Binding}">
|
||||
<MenuItem.Icon>
|
||||
<PathIcon Data="{StaticResource ChevronDownDrawing}" Width="14">
|
||||
<PathIcon.RenderTransform>
|
||||
<RotateTransform Angle="180"></RotateTransform>
|
||||
</PathIcon.RenderTransform>
|
||||
</PathIcon>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
Header="{ReflectionBinding Path=Res.MoveDown,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{ReflectionBinding #u.DataContext.DownMoveOrderById}"
|
||||
CommandParameter="{Binding}">
|
||||
<MenuItem.Icon>
|
||||
<PathIcon Data="{StaticResource ChevronDownDrawing}" Width="14">
|
||||
</PathIcon>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</Border.ContextMenu>
|
||||
<i:Interaction.Behaviors>
|
||||
<ia:EventTriggerBehavior EventName="PointerEnter" SourceObject="{ReflectionBinding #panel}">
|
||||
<ia:ChangePropertyAction TargetObject="{ReflectionBinding #delete_btn}" PropertyName="IsVisible" Value="True"/>
|
||||
</ia:EventTriggerBehavior>
|
||||
<ia:EventTriggerBehavior EventName="PointerLeave" SourceObject="{ReflectionBinding #panel}">
|
||||
<ia:ChangePropertyAction TargetObject="{ReflectionBinding #delete_btn}" PropertyName="IsVisible" Value="False"/>
|
||||
</ia:EventTriggerBehavior>
|
||||
</i:Interaction.Behaviors>
|
||||
<Grid RowDefinitions="30,165,Auto">
|
||||
<DockPanel VerticalAlignment="Center">
|
||||
<WrapPanel>
|
||||
<TextBlock VerticalAlignment="Center"
|
||||
Text="{Binding Name,Mode=TwoWay}"
|
||||
DockPanel.Dock="Left"
|
||||
Padding="10,5"
|
||||
FontSize="16"
|
||||
Foreground="{DynamicResource HighlightForegroundBrushKey}"/>
|
||||
<Button Command="{ReflectionBinding EditNameAsync}"
|
||||
Cursor="Hand"
|
||||
Classes="plain"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.LocalAuth_AuthName,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
VerticalAlignment="Center"
|
||||
VerticalContentAlignment="Center">
|
||||
<PathIcon Data="{StaticResource EditDrawing}"
|
||||
Width="10" Height="10"
|
||||
Opacity="0.8"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
Margin="0">
|
||||
</PathIcon>
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled"
|
||||
VerticalScrollBarVisibility="Auto"
|
||||
Padding="10 0 10 10">
|
||||
<ItemsRepeater Items="{Binding Authenticators,Mode=OneWay}">
|
||||
<ItemsRepeater.Layout>
|
||||
<UniformGridLayout ItemsJustification="SpaceAround"
|
||||
MinRowSpacing="10"
|
||||
MinColumnSpacing="10"
|
||||
MaximumRowsOrColumns="8"/>
|
||||
<!--<WrapLayout HorizontalSpacing="10"
|
||||
VerticalSpacing="10" Orientation="Horizontal"/>-->
|
||||
</ItemsRepeater.Layout>
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border x:Name="panel"
|
||||
Classes="paper"
|
||||
Width="250"
|
||||
Height="250"
|
||||
Background="{DynamicResource ThemeBrushKey}">
|
||||
<Border.ContextMenu>
|
||||
<ContextMenu>
|
||||
<MenuItem
|
||||
Header="{ReflectionBinding Path=Res.LocalAuth_Copy,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{ReflectionBinding #u.DataContext.CopyCodeCilp}"
|
||||
CommandParameter="{Binding}">
|
||||
<MenuItem.Icon>
|
||||
<PathIcon Data="{StaticResource CopyDrawing}" Width="14"></PathIcon>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem Header="-"></MenuItem>
|
||||
<MenuItem
|
||||
Header="{ReflectionBinding Path=Res.MoveUp,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{ReflectionBinding #u.DataContext.UpMoveOrderById}"
|
||||
CommandParameter="{Binding}">
|
||||
<MenuItem.Icon>
|
||||
<PathIcon Data="{StaticResource ChevronDownDrawing}" Width="14">
|
||||
<PathIcon.RenderTransform>
|
||||
<RotateTransform Angle="180"></RotateTransform>
|
||||
</PathIcon.RenderTransform>
|
||||
</PathIcon>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
<MenuItem
|
||||
Header="{ReflectionBinding Path=Res.MoveDown,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{ReflectionBinding #u.DataContext.DownMoveOrderById}"
|
||||
CommandParameter="{Binding}">
|
||||
<MenuItem.Icon>
|
||||
<PathIcon Data="{StaticResource ChevronDownDrawing}" Width="14">
|
||||
</PathIcon>
|
||||
</MenuItem.Icon>
|
||||
</MenuItem>
|
||||
</ContextMenu>
|
||||
</Border.ContextMenu>
|
||||
<i:Interaction.Behaviors>
|
||||
<ia:EventTriggerBehavior EventName="PointerEnter" SourceObject="{ReflectionBinding #panel}">
|
||||
<ia:ChangePropertyAction TargetObject="{ReflectionBinding #delete_btn}" PropertyName="IsVisible" Value="True"/>
|
||||
</ia:EventTriggerBehavior>
|
||||
<ia:EventTriggerBehavior EventName="PointerLeave" SourceObject="{ReflectionBinding #panel}">
|
||||
<ia:ChangePropertyAction TargetObject="{ReflectionBinding #delete_btn}" PropertyName="IsVisible" Value="False"/>
|
||||
</ia:EventTriggerBehavior>
|
||||
</i:Interaction.Behaviors>
|
||||
<Grid RowDefinitions="30,165,Auto">
|
||||
<DockPanel VerticalAlignment="Center">
|
||||
<WrapPanel>
|
||||
<TextBlock VerticalAlignment="Center"
|
||||
Text="{Binding Name,Mode=TwoWay}"
|
||||
DockPanel.Dock="Left"
|
||||
Padding="10,5"
|
||||
FontSize="16"
|
||||
Foreground="{DynamicResource HighlightForegroundBrushKey}"/>
|
||||
<Button Command="{ReflectionBinding EditNameAsync}"
|
||||
Cursor="Hand"
|
||||
Classes="plain"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.LocalAuth_AuthName,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
VerticalAlignment="Center"
|
||||
VerticalContentAlignment="Center">
|
||||
<PathIcon Data="{StaticResource EditDrawing}"
|
||||
Width="10" Height="10"
|
||||
Opacity="0.8"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
Margin="0">
|
||||
</PathIcon>
|
||||
</Button>
|
||||
</WrapPanel>
|
||||
|
||||
<Button DockPanel.Dock="Right" x:Name="delete_btn" Classes="flatbutton" IsVisible="False" Background="Transparent" HorizontalAlignment="Right" Cursor="Hand" ToolTip.Tip="{ReflectionBinding Path=Res.UserChange_DeleteUser,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{ReflectionBinding #u.DataContext.DeleteAuth}" CommandParameter="{Binding}">
|
||||
<PathIcon Data="{DynamicResource CloseDrawing}" Width="12"></PathIcon>
|
||||
</Button>
|
||||
</WrapPanel>
|
||||
</DockPanel>
|
||||
|
||||
<Button DockPanel.Dock="Right" x:Name="delete_btn" Classes="flatbutton" IsVisible="False" Background="Transparent" HorizontalAlignment="Right" Cursor="Hand" ToolTip.Tip="{ReflectionBinding Path=Res.UserChange_DeleteUser,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{ReflectionBinding #u.DataContext.DeleteAuth}" CommandParameter="{Binding}">
|
||||
<PathIcon Data="{DynamicResource CloseDrawing}" Width="12"></PathIcon>
|
||||
</Button>
|
||||
</DockPanel>
|
||||
|
||||
<TextBlock Grid.Row="1" Text="------" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="64" IsVisible="{Binding !IsShowCode}" Foreground="{DynamicResource HighlightForegroundBrushKey}"></TextBlock>
|
||||
<TextBlock Grid.Row="1" Text="{Binding CurrentCode}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="54" IsVisible="{Binding IsShowCode}" Foreground="{DynamicResource HighlightForegroundBrushKey}">
|
||||
</TextBlock>
|
||||
<TextBlock Grid.Row="1" Text="------" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="64" IsVisible="{Binding !IsShowCode}" Foreground="{DynamicResource HighlightForegroundBrushKey}"></TextBlock>
|
||||
<TextBlock Grid.Row="1" Text="{Binding CurrentCode}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="54" IsVisible="{Binding IsShowCode}" Foreground="{DynamicResource HighlightForegroundBrushKey}">
|
||||
</TextBlock>
|
||||
|
||||
|
||||
<DockPanel Grid.Row="2" HorizontalAlignment="Stretch" VerticalAlignment="Center">
|
||||
<Panel DockPanel.Dock="Top">
|
||||
<Separator Height="13" IsVisible="{Binding !IsShowCode}"></Separator>
|
||||
<ProgressBar Value="{Binding CodeCountdown,Mode=TwoWay}" IsVisible="{Binding IsShowCode}" Margin="0 10 0 4"/>
|
||||
<Separator Classes="Separator" Margin="0 14 0 4"/>
|
||||
</Panel>
|
||||
<DockPanel Grid.Row="2" HorizontalAlignment="Stretch" VerticalAlignment="Center">
|
||||
<Panel DockPanel.Dock="Top">
|
||||
<Separator Height="13" IsVisible="{Binding !IsShowCode}"></Separator>
|
||||
<ProgressBar Value="{Binding CodeCountdown,Mode=TwoWay}" IsVisible="{Binding IsShowCode}" Margin="0 10 0 4"/>
|
||||
<Separator Classes="Separator" Margin="0 14 0 4"/>
|
||||
</Panel>
|
||||
|
||||
<!--<controls:ScrollingTextBlock HorizontalAlignment="Center" Width="{Binding #panel.Width}" Text="{Binding}" FontSize="14" Foreground="{DynamicResource HighlightForegroundBrushKey}" ></controls:ScrollingTextBlock>-->
|
||||
<!--<controls:ScrollingTextBlock HorizontalAlignment="Center" Width="{Binding #panel.Width}" Text="{Binding}" FontSize="14" Foreground="{DynamicResource HighlightForegroundBrushKey}" ></controls:ScrollingTextBlock>-->
|
||||
|
||||
<StackPanel Orientation="Horizontal" Spacing="5">
|
||||
<Button Cursor="Hand"
|
||||
Classes="flatbutton"
|
||||
Command="{ReflectionBinding #u.DataContext.ShowAuthCode}"
|
||||
CommandParameter="{Binding}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.LocalAuth_ShowAuthCode,Mode=OneWay,Source={x:Static resx:R.Current}}" >
|
||||
<PathIcon Data="{DynamicResource SearchDrawing}" Width="20"></PathIcon>
|
||||
</Button>
|
||||
<StackPanel Orientation="Horizontal" Spacing="5">
|
||||
<Button Cursor="Hand"
|
||||
Classes="flatbutton"
|
||||
Command="{ReflectionBinding #u.DataContext.ShowAuthCode}"
|
||||
CommandParameter="{Binding}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.LocalAuth_ShowAuthCode,Mode=OneWay,Source={x:Static resx:R.Current}}" >
|
||||
<PathIcon Data="{DynamicResource SearchDrawing}" Width="20"></PathIcon>
|
||||
</Button>
|
||||
|
||||
<!--<Button Cursor="Hand"
|
||||
<!--<Button Cursor="Hand"
|
||||
Classes="flatbutton"
|
||||
Command="{ReflectionBinding #u.DataContext.CopyCodeCilp}"
|
||||
CommandParameter="{Binding}"
|
||||
@@ -147,55 +205,56 @@
|
||||
<PathIcon Data="{DynamicResource CopyDrawing}" Width="20"></PathIcon>
|
||||
</Button>-->
|
||||
|
||||
<Button Cursor="Hand" Classes="flatbutton" Command="{ReflectionBinding #u.DataContext.ShowSteamAuthTrade}" CommandParameter="{Binding}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.LocalAuth_AuthTrade,Mode=OneWay,Source={x:Static resx:R.Current}}" >
|
||||
<PathIcon Data="{DynamicResource TradeDrawing}" Width="20"></PathIcon>
|
||||
</Button>
|
||||
<Button Cursor="Hand" Classes="flatbutton" Command="{ReflectionBinding #u.DataContext.ShowSteamAuthTrade}" CommandParameter="{Binding}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.LocalAuth_AuthTrade,Mode=OneWay,Source={x:Static resx:R.Current}}" >
|
||||
<PathIcon Data="{DynamicResource TradeDrawing}" Width="20"></PathIcon>
|
||||
</Button>
|
||||
|
||||
<!--<Button Cursor="Hand" Classes="flatbutton"
|
||||
<!--<Button Cursor="Hand" Classes="flatbutton"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.LocalAuth_CloudSync,Mode=OneWay,Source={x:Static resx:R.Current}}" >
|
||||
<PathIcon Data="{DynamicResource CloudDrawing}" Width="20"></PathIcon>
|
||||
</Button>-->
|
||||
|
||||
<Button Cursor="Hand"
|
||||
Classes="flatbutton"
|
||||
Command="{ReflectionBinding #u.DataContext.ShowSteamAuthData}"
|
||||
CommandParameter="{Binding}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.LocalAuth_ShowAuthInfo,Mode=OneWay,Source={x:Static resx:R.Current}}" >
|
||||
<PathIcon Data="{DynamicResource SlideSearchDrawing}" Width="20"></PathIcon>
|
||||
</Button>
|
||||
|
||||
<Button Cursor="Hand"
|
||||
Classes="flatbutton"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.LocalAuth_ExportAuth_ToQRCode,Mode=OneWay,Source={x:Static resx:R.Current}}" >
|
||||
<Button.Content>
|
||||
<PathIcon Data="{DynamicResource QRCodeDrawing}" Width="20"></PathIcon>
|
||||
</Button.Content>
|
||||
<Button.Flyout>
|
||||
<Flyout>
|
||||
<Image
|
||||
Width="200"
|
||||
Height="200"
|
||||
Source="{Binding QrCodeStream^,Converter={StaticResource BitmapAssetValueConverter},Mode=OneWay}"/>
|
||||
</Flyout>
|
||||
</Button.Flyout>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<Button Cursor="Hand"
|
||||
Classes="flatbutton"
|
||||
Command="{ReflectionBinding #u.DataContext.ShowSteamAuthData}"
|
||||
Command="{ReflectionBinding #u.DataContext.CopyCodeCilp}"
|
||||
CommandParameter="{Binding}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.LocalAuth_ShowAuthInfo,Mode=OneWay,Source={x:Static resx:R.Current}}" >
|
||||
<PathIcon Data="{DynamicResource SlideSearchDrawing}" Width="20"></PathIcon>
|
||||
HorizontalAlignment="Right"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.LocalAuth_Copy,Mode=OneWay,Source={x:Static resx:R.Current}}" >
|
||||
<PathIcon Data="{DynamicResource CopyDrawing}" Width="20"></PathIcon>
|
||||
</Button>
|
||||
|
||||
<Button Cursor="Hand"
|
||||
Classes="flatbutton"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.LocalAuth_ExportAuth_ToQRCode,Mode=OneWay,Source={x:Static resx:R.Current}}" >
|
||||
<Button.Content>
|
||||
<PathIcon Data="{DynamicResource QRCodeDrawing}" Width="20"></PathIcon>
|
||||
</Button.Content>
|
||||
<Button.Flyout>
|
||||
<Flyout>
|
||||
<Image
|
||||
Width="200"
|
||||
Height="200"
|
||||
Source="{Binding QrCodeStream^,Converter={StaticResource BitmapAssetValueConverter},Mode=OneWay}"/>
|
||||
</Flyout>
|
||||
</Button.Flyout>
|
||||
</Button>
|
||||
</StackPanel>
|
||||
|
||||
<Button Cursor="Hand"
|
||||
Classes="flatbutton"
|
||||
Command="{ReflectionBinding #u.DataContext.CopyCodeCilp}"
|
||||
CommandParameter="{Binding}"
|
||||
HorizontalAlignment="Right"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.LocalAuth_Copy,Mode=OneWay,Source={x:Static resx:R.Current}}" >
|
||||
<PathIcon Data="{DynamicResource CopyDrawing}" Width="20"></PathIcon>
|
||||
</Button>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsRepeater.ItemTemplate>
|
||||
</ItemsRepeater>
|
||||
</ScrollViewer>
|
||||
</Panel>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</ItemsRepeater.ItemTemplate>
|
||||
</ItemsRepeater>
|
||||
</ScrollViewer>
|
||||
</Panel>
|
||||
</DockPanel>
|
||||
</UserControl>
|
||||
|
||||
+35
-14
@@ -24,27 +24,41 @@
|
||||
Margin="{StaticResource ScrollMargin}">
|
||||
<DockPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="8" HorizontalAlignment="Left">
|
||||
<ToggleSwitch Content="" OnContent="" OffContent=""
|
||||
<ToggleSwitch Classes="onlyToggleSwitch"
|
||||
Margin="5 0 0 5"
|
||||
IsChecked="{Binding Source={x:Static service:ProxyService.Current},Path=IsEnableScript}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.CommunityFix_EnableScriptService,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
VerticalAlignment="Center"></ToggleSwitch>
|
||||
|
||||
<controls:ProgressRing IsIndeterminate="True" ToolTip.Tip="{ReflectionBinding Path=Res.Script_ImportLoading,Mode=OneWay,Source={x:Static resx:R.Current}}" HorizontalAlignment="Stretch" Height="30" Width="30" IsVisible="{Binding Source={x:Static service:ProxyService.Current},Path=IsLoading,Mode=OneWay}" />
|
||||
<Button IsVisible="{Binding Source={x:Static service:ProxyService.Current},Path=!IsLoading,Mode=OneWay}" Background="Transparent" Cursor="Hand" Command="{Binding AddNewScriptButton_Click}"
|
||||
<Button IsVisible="{Binding Source={x:Static service:ProxyService.Current},Path=!IsLoading,Mode=OneWay}"
|
||||
Background="Transparent"
|
||||
Cursor="Hand"
|
||||
Command="{Binding AddNewScriptButton_Click}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.Import,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<PathIcon Width="16" Data="{StaticResource AddDrawing}" />
|
||||
</Button>
|
||||
<Button Background="Transparent" Cursor="Hand"
|
||||
<Button Background="Transparent"
|
||||
Cursor="Hand"
|
||||
Command="{ReflectionBinding RefreshScriptButton}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.Refresh,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<PathIcon Width="16" Data="{StaticResource RefreshDrawing}" />
|
||||
</Button>
|
||||
<Button Background="Transparent" Cursor="Hand"
|
||||
<Button Background="Transparent"
|
||||
Cursor="Hand"
|
||||
Command="{Binding ScriptStoreCommand}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.ScriptStore,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<PathIcon Width="16" Data="{StaticResource JavaScriptDrawing}" />
|
||||
</Button>
|
||||
<Menu Classes="BindMenu">
|
||||
<MenuItem Items="{Binding MenuItems}"
|
||||
Classes="BindItem"
|
||||
IsVisible="{Binding !MenuItems,Converter={StaticResource IsNullConverter}}">
|
||||
<MenuItem.Header>
|
||||
<PathIcon Data="{StaticResource MoreDrawing}" Width="14"></PathIcon>
|
||||
</MenuItem.Header>
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal"
|
||||
@@ -59,10 +73,7 @@
|
||||
MinWidth="200">
|
||||
<TextBox.InnerLeftContent>
|
||||
<PathIcon Data="{StaticResource SearchDrawing}"
|
||||
Width="20" Height="20"
|
||||
Opacity="0.8"
|
||||
VerticalAlignment="Top" HorizontalAlignment="Left"
|
||||
Margin="15,8,0,0" />
|
||||
Classes="TextBoxIcon"/>
|
||||
</TextBox.InnerLeftContent>
|
||||
</TextBox>
|
||||
</StackPanel>
|
||||
@@ -80,13 +91,13 @@
|
||||
Padding="0 0 0 10">
|
||||
<ItemsRepeater Items="{Binding ProxyScripts}">
|
||||
<ItemsRepeater.Layout>
|
||||
<StackLayout Spacing="20" Orientation="Vertical"/>
|
||||
<StackLayout Spacing="10" Orientation="Vertical"/>
|
||||
<!--<UniformGridLayout ItemsJustification="Start" ItemsStretch="Uniform" MinColumnSpacing="20" MinRowSpacing="20" MaximumRowsOrColumns="2" Orientation="Horizontal"/>-->
|
||||
</ItemsRepeater.Layout>
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Classes="paper"
|
||||
Margin="20 0"
|
||||
Margin="10 0"
|
||||
Background="{DynamicResource ThemeBrushKey}"
|
||||
Padding="20 10">
|
||||
<DockPanel>
|
||||
@@ -128,9 +139,15 @@
|
||||
|
||||
<DockPanel VerticalAlignment="Bottom">
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<ToggleSwitch OnContent="" OffContent="" IsChecked="{Binding Enable,Mode=TwoWay}">
|
||||
<ToggleSwitch Classes="onlyToggleSwitch"
|
||||
Margin="0 -5 0 0"
|
||||
IsChecked="{Binding Enable,Mode=TwoWay}"
|
||||
VerticalAlignment="Center">
|
||||
</ToggleSwitch>
|
||||
<Button Background="Transparent" Cursor="Hand"
|
||||
|
||||
<Button Background="Transparent"
|
||||
Cursor="Hand"
|
||||
VerticalAlignment="Center"
|
||||
Command="{ReflectionBinding #u.DataContext.EditScriptItemButton}"
|
||||
CommandParameter="{Binding}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.Script_Edit,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
@@ -138,6 +155,7 @@
|
||||
</Button>
|
||||
|
||||
<Button Background="Transparent" Cursor="Hand"
|
||||
VerticalAlignment="Center"
|
||||
Command="{ReflectionBinding #u.DataContext.RefreshScriptItemButton}"
|
||||
CommandParameter="{Binding}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.Script_Refresh,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
@@ -145,13 +163,16 @@
|
||||
</Button>
|
||||
|
||||
<Button Background="Transparent" Cursor="Hand"
|
||||
VerticalAlignment="Center"
|
||||
Command="{ReflectionBinding #u.DataContext.OpenHomeScriptItemButton}"
|
||||
CommandParameter="{Binding}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.Script_Home,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<PathIcon Width="16" Data="{StaticResource HomeDrawing}" />
|
||||
</Button>
|
||||
|
||||
<Button Background="Transparent" IsVisible="{Binding !IsBasics}" Cursor="Hand" HorizontalAlignment="Right"
|
||||
<Button Background="Transparent" IsVisible="{Binding !IsBasics}" Cursor="Hand"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Right"
|
||||
Command="{ReflectionBinding #u.DataContext.DeleteScriptItemButton}"
|
||||
CommandParameter="{Binding}"
|
||||
ToolTip.Tip="{ReflectionBinding Path=Res.Delete,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
@@ -180,7 +201,7 @@
|
||||
CommandParameter="{Binding}"
|
||||
Content="{Binding NewVersion,StringFormat={}v{0}}"
|
||||
FontSize="{DynamicResource FontSizeH7}"
|
||||
VerticalContentAlignment="Center"
|
||||
VerticalContentAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="{DynamicResource HighlightForegroundBrushKey}"/>
|
||||
<Ellipse VerticalAlignment="Center"
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
xmlns:pages="clr-namespace:System.Application.UI.Views.Pages"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="System.Application.UI.Views.Pages.SettingsPage">
|
||||
<TabControl Classes="flat" Padding="{StaticResource PageMargin2}">
|
||||
<TabControl Classes="flat" Margin="0 5 0 0">
|
||||
<TabItem Header="{ReflectionBinding Path=Res.Settings_UI,Mode=OneWay,Source={x:Static resx:R.Current}}">
|
||||
<pages:Settings_UI x:DataType="vm:SettingsPageViewModel" x:CompileBindings="True">
|
||||
<pages:Settings_UI.DataContext>
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="System.Application.UI.Views.Pages.Settings_General">
|
||||
<ScrollViewer>
|
||||
<ScrollViewer Padding="{StaticResource PageMargin}">
|
||||
<StackPanel Orientation="Vertical"
|
||||
HorizontalAlignment="Stretch"
|
||||
Spacing="20">
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="System.Application.UI.Views.Pages.Settings_Steam">
|
||||
<ScrollViewer>
|
||||
<ScrollViewer Padding="{StaticResource PageMargin}">
|
||||
<StackPanel Orientation="Vertical"
|
||||
HorizontalAlignment="Stretch"
|
||||
Spacing="20">
|
||||
|
||||
+66
-12
@@ -3,17 +3,29 @@
|
||||
xmlns:vm="clr-namespace:System.Application.UI.ViewModels;assembly=System.Application.SteamTools.Client.Desktop"
|
||||
xmlns:resx="clr-namespace:System.Application.UI.Resx;assembly=System.Application.SteamTools.Client.Desktop"
|
||||
xmlns:ms="clr-namespace:System.Application.Models.Settings;assembly=System.Application.SteamTools.Client.Desktop"
|
||||
xmlns:converters="clr-namespace:System.Application.Converters;assembly=System.Application.SteamTools.Client.Desktop.Avalonia"
|
||||
xmlns:ui="using:FluentAvalonia.UI.Controls"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="System.Application.UI.Views.Pages.Settings_UI">
|
||||
<ScrollViewer>
|
||||
<UserControl.Resources>
|
||||
<converters:StringEqualsConverter x:Key="StringEqualsConverter" />
|
||||
<converters:ColorStringToBrush x:Key="ColorStringToBrush" />
|
||||
</UserControl.Resources>
|
||||
<ScrollViewer Padding="10 0 10 20">
|
||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Stretch" Spacing="20">
|
||||
<StackPanel.Styles>
|
||||
<Style Selector="TextBlock">
|
||||
<Setter Property="FontSize" Value="{StaticResource FontSizeH7}"/>
|
||||
<Setter Property="Foreground" Value="{DynamicResource HighlightForegroundBrushKey}" />
|
||||
</Style>
|
||||
<Style Selector="TextBlock.prompt">
|
||||
<Setter Property="FontSize" Value="12" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource InactiveForegroundBrushKey}" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="Margin" Value="10 0" />
|
||||
</Style>
|
||||
<Style Selector="DockPanel > TextBlock">
|
||||
<Setter Property="Margin" Value="0 0 20 0" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
@@ -28,7 +40,35 @@
|
||||
</Style>
|
||||
</StackPanel.Styles>
|
||||
|
||||
<StackPanel Orientation="Vertical" Spacing="10" Margin="0 5 0 0">
|
||||
<StackPanel Orientation="Vertical">
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.Settings_ThemeAccent,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<RadioButton Content="{ReflectionBinding Path=Res.Settings_UI_SystemDefault,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
IsChecked="{ReflectionBinding Source={x:Static ms:UISettings.GetUserThemeAccent},Path=Value, Mode=TwoWay}"/>
|
||||
<RadioButton x:Name="AccentCustom"
|
||||
Content="{ReflectionBinding Path=Res.Settings_UI_Custom,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
IsChecked="{ReflectionBinding Source={x:Static ms:UISettings.GetUserThemeAccent},Path=!Value, Mode=OneWay}"/>
|
||||
<ui:ColorPickerButton IsEnabled="{ReflectionBinding #AccentCustom.IsChecked}"
|
||||
Color="{ReflectionBinding Source={x:Static ms:UISettings.ThemeAccent},Converter={StaticResource ColorStringToBrush},Path=Value, Mode=TwoWay}"/>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Vertical" Spacing="10" Margin="0 -10 0 0">
|
||||
<WrapPanel>
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.Settings_Theme,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
<TextBlock Classes="prompt"
|
||||
Text="{ReflectionBinding Path=Res.Settings_RestartEffective,Mode=OneWay,Source={x:Static resx:R.Current}}"></TextBlock>
|
||||
</WrapPanel>
|
||||
<ComboBox x:Name="Themes"
|
||||
SelectedIndex="{Binding Source={x:Static ms:UISettings.Theme},Path=Value, Mode=TwoWay}"
|
||||
HorizontalAlignment="Stretch">
|
||||
<ComboBoxItem Content="{ReflectionBinding Path=Res.Settings_UI_SystemDefault,Mode=OneWay,Source={x:Static resx:R.Current}}"></ComboBoxItem>
|
||||
<ComboBoxItem Content="{ReflectionBinding Path=Res.Settings_UI_Light,Mode=OneWay,Source={x:Static resx:R.Current}}"></ComboBoxItem>
|
||||
<ComboBoxItem Content="{ReflectionBinding Path=Res.Settings_UI_Dark,Mode=OneWay,Source={x:Static resx:R.Current}}"></ComboBoxItem>
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.Settings_Language,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
<ComboBox HorizontalAlignment="Stretch" SelectedItem="{Binding SelectLanguage, Mode=TwoWay}" Items="{Binding Mode=OneWay,Source={x:Static resx:R.Languages}}" >
|
||||
<ComboBox.ItemTemplate>
|
||||
@@ -39,16 +79,7 @@
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.Settings_Theme,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
<ComboBox x:Name="Themes"
|
||||
SelectedIndex="{Binding Source={x:Static ms:UISettings.Theme},Path=Value, Mode=TwoWay}"
|
||||
HorizontalAlignment="Stretch">
|
||||
<ComboBoxItem Content="{ReflectionBinding Path=Res.Settings_UI_SystemDefault,Mode=OneWay,Source={x:Static resx:R.Current}}"></ComboBoxItem>
|
||||
<ComboBoxItem Content="{ReflectionBinding Path=Res.Settings_UI_Light,Mode=OneWay,Source={x:Static resx:R.Current}}"></ComboBoxItem>
|
||||
<ComboBoxItem Content="{ReflectionBinding Path=Res.Settings_UI_Dark,Mode=OneWay,Source={x:Static resx:R.Current}}"></ComboBoxItem>
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
<Separator Classes="Separator"/>
|
||||
|
||||
<StackPanel Orientation="Vertical" Spacing="10">
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.Settings_Fonts,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
@@ -67,12 +98,35 @@
|
||||
</ComboBox>
|
||||
</StackPanel>
|
||||
|
||||
<!--<DockPanel>
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.Settings_UI_EnableFilletUI,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
<ToggleSwitch IsChecked="{ReflectionBinding Source={x:Static ms:UISettings.EnableFilletUI},Path=Value, Mode=TwoWay}"/>
|
||||
</DockPanel>-->
|
||||
|
||||
<Separator Classes="Separator"/>
|
||||
|
||||
<StackPanel Orientation="Vertical">
|
||||
<DockPanel>
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.Settings_UI_CustomBackgroundImage,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
<ToggleSwitch IsChecked="{ReflectionBinding Source={x:Static ms:UISettings.EnableCustomBackgroundImage},Path=Value, Mode=TwoWay}"/>
|
||||
</DockPanel>
|
||||
<StackPanel Orientation="Horizontal" Spacing="10">
|
||||
<Image Source="{ReflectionBinding Source={x:Static ms:UISettings.BackgroundImagePath},Path=Value, Mode=OneWay,Converter={StaticResource BitmapAssetValueConverter}}"
|
||||
Stretch="UniformToFill"
|
||||
Width="250"
|
||||
Height="150"/>
|
||||
<Button Content="{ReflectionBinding Path=Res.Settings_UI_SelectImage,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{Binding SelectImage_Click}"></Button>
|
||||
<Button Content="{ReflectionBinding Path=Res.Reset,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{Binding ResetImage_Click}"></Button>
|
||||
</StackPanel>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Vertical" Spacing="8">
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.Settings_UI_AcrylicTransparency,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
<Slider Value="{ReflectionBinding Value,Source={x:Static ms:UISettings.AcrylicOpacity},Mode=TwoWay}" Minimum="0" Maximum="1.0"></Slider>
|
||||
</StackPanel>
|
||||
|
||||
<Separator Classes="Separator"/>
|
||||
</StackPanel>
|
||||
</ScrollViewer>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user