Compare commits

..
134 Commits
Author SHA1 Message Date
Mossimo 6cfd47cb17 show no tips 2021-05-26 02:31:19 +08:00
Aigio Liu 26d7690092 v2.3.0 2021-05-26 02:09:37 +08:00
Aigio Liu c2134298b5 fix 2021-05-26 01:52:46 +08:00
rmbgame 746fed8cdb save 2021-05-26 01:18:55 +08:00
Mossimo 31eae8b056 fix 2021-05-26 00:24:30 +08:00
Mossimo ae867373dd 1 2021-05-26 00:21:02 +08:00
Mossimo e6fac670f7 fix 2021-05-26 00:12:19 +08:00
Mossimo cc82301e92 tips 2021-05-26 00:03:09 +08:00
rmbgame 545610d927 fix 2021-05-26 00:02:02 +08:00
rmbgame db4ea77939 fix 2021-05-25 23:42:55 +08:00
Aigio Liu 1c413817fa fix MoveOrderByIndexAsync 2021-05-25 23:41:55 +08:00
Mossimo ca94efb132 fix tips 2021-05-25 23:38:41 +08:00
Mossimo 5809dc7d59 fix 2021-05-25 23:36:51 +08:00
rmbgame c9af4408e0 add 2021-05-25 22:43:52 +08:00
Mossimo 66af5379cb add btn 2021-05-25 22:38:43 +08:00
Mossimo 97394b81e9 save 2021-05-25 22:36:47 +08:00
rmbgame 225dd3d748 add new icon 2021-05-25 22:21:52 +08:00
Aigio Liu be313984c7 修复 UI 通知 2021-05-25 22:16:52 +08:00
rmbgame bbe7bf2c22 fix export password error 2021-05-25 19:35:48 +08:00
rmbgame 840711740e fix 2021-05-25 18:34:10 +08:00
Aigio Liu f792622653 fix CloseWindow Fail 2021-05-25 18:13:20 +08:00
rmbgame f8a5938375 fix 2021-05-25 15:59:37 +08:00
Aigio Liu 5b8a84b4e1 fix BindFastLogin 2021-05-25 13:06:42 +08:00
Aigio Liu f2a2650523 v2.3 2021-05-24 21:48:54 +08:00
rmbgame 43a3f3c0dc 新增
hCaptcha验证码
EPIC验证码
artstation
v2ex
反代支持
修复discord更新下载代理失败
2021-05-24 18:11:59 +08:00
rmbgame 68c7b324af fix display bug 2021-05-24 18:11:59 +08:00
Aigio Liu 251ab23db8 fix 2021-05-24 17:05:31 +08:00
Aigio Liu 7121e416fc Desktop Bridge 2021-05-24 10:58:27 +08:00
Aigio Liu 4fd0dbf784 Desktop Bridge 2021-05-24 10:58:26 +08:00
Aigio Liu 107623b26a WINDOWS_DESKTOP_BRIDGE 2021-05-23 23:08:49 +08:00
Aigio Liu 35af87946d fix 2021-05-23 19:35:01 +08:00
rmbgame 083b214b97 fix 2021-05-23 18:22:38 +08:00
rmbgame 9ac178d375 fix 2021-05-23 18:21:11 +08:00
Aigio Liu 3d76038301 FastLoginChannels 2021-05-23 18:08:16 +08:00
rmbgame 704cd5116c ui 2021-05-23 17:06:14 +08:00
rmbgame b46cb4e10e save 2021-05-23 17:02:02 +08:00
Aigio Liu f680738f12 rename ms to xbox 2021-05-23 17:00:19 +08:00
Aigio Liu faaaeb592d Add Xbox Icon 2021-05-23 16:54:29 +08:00
rmbgame 259fe3e592 fix text error 2021-05-23 16:54:22 +08:00
Mossimo e50945332f Fix Error 2021-05-23 16:52:53 +08:00
rmbgame 17a9ec53cc add new icon 2021-05-23 16:50:10 +08:00
rmbgame a043373430 fix error 2021-05-23 16:35:53 +08:00
Aigio Liu 5f5607b6c2 fix 2021-05-23 16:31:33 +08:00
Aigio Liu 9198b18e4f fix 2021-05-23 16:31:31 +08:00
Aigio Liu a0c5117f5e fix 2021-05-23 14:57:22 +08:00
Aigio Liu 628a845fa6 fix 2021-05-23 14:52:02 +08:00
rmbgame 082b5b72b1 fix 2021-05-23 14:35:51 +08:00
rmbgame f25a4f49a8 令牌加密解密 导入导出功能完成 2021-05-23 14:35:51 +08:00
rmbgame 47c06f2b9a save 2021-05-23 14:35:51 +08:00
Aigio Liu 2a450c237d fix 2021-05-23 14:33:52 +08:00
Aigio Liu 21bd1d2b32 fix 2021-05-23 12:16:15 +08:00
Aigio Liu 092c59b5b2 令牌仓储层添加新方法 2021-05-23 12:11:39 +08:00
Aigio Liu 25a99127f5 fix 2021-05-23 11:59:05 +08:00
Aigio Liu 216869ab56 令牌导入更改 2021-05-23 11:54:35 +08:00
Aigio Liu b5c3842ea7 账号绑定 2021-05-22 23:42:56 +08:00
rmbgame 20ea077f4c text error 2021-05-22 01:19:22 +08:00
Aigio Liu 41ea7f6e58 绑定账号 2021-05-22 00:17:19 +08:00
rmbgame 0f9235e1f0 令牌导出导入 80% 2021-05-21 07:22:47 +08:00
rmbgame 7adadfb6e8 save 2021-05-21 07:22:47 +08:00
Aigio Liu 69c7a3fcef 其他快速登录,改为动态绑定数组值 2021-05-21 00:38:10 +08:00
Aigio Liu ab4d12df52 Bind 2021-05-20 22:44:58 +08:00
rmbgame efb7578ff9 快速登录界面 2021-05-20 22:15:05 +08:00
rmbgame 5cf35a37ac save 2021-05-20 22:15:05 +08:00
Mossimo 8df7ab3b9c fixBug 2021-05-20 21:20:36 +08:00
Aigio Liu 643ff4a41d fix 2021-05-20 12:59:40 +08:00
Aigio Liu 11d20f36f3 Desktop Bridge 2021-05-20 07:04:46 +08:00
Aigio Liu 28f1198a9c 令牌仓储层 导入导出与上移下移 2021-05-19 15:44:12 +08:00
rmbgame 71e8777414 save 2021-05-19 14:18:58 +08:00
rmbgame c80f57153e save 2021-05-19 14:13:54 +08:00
rmbgame d30bcdb374 fix error 2021-05-19 14:11:55 +08:00
Mossimo 679e75ea54 fixerror 2021-05-19 14:02:20 +08:00
Mossimo f936401a2e 1 2021-05-19 13:48:43 +08:00
rmbgame 71d7ee8cff fix error 2021-05-19 13:27:37 +08:00
rmbgame 364a0f5c23 令牌加密功能 2021-05-19 13:05:15 +08:00
rmbgame 4a200f1ae4 令牌加密功能
文本框字体调整 #197
2021-05-19 09:05:44 +08:00
rmbgame d228201a4e 修复挂游戏时长功能问题 2021-05-19 02:53:01 +08:00
rmbgame 606e203df5 save 2021-05-19 02:23:26 +08:00
Aigio Liu c4e5c5e8a6 add lock 2021-05-18 21:32:56 +08:00
Aigio Liu b3a387f0a6 fix #243 2021-05-18 21:12:52 +08:00
Aigio Liu 2d56a44117 改进 残留进程时启动逻辑 2021-05-18 12:11:15 +08:00
Mossimo aa625e5f44 fix tips 2021-05-18 09:45:09 +08:00
Mossimo ea92cccf59 save 2021-05-18 09:24:54 +08:00
rmbgame 15ab81f6e4 修复winauth子模块问题 2021-05-17 23:49:00 +08:00
rmbgame 98ff99257b fix 2021-05-17 23:39:10 +08:00
Aigio Liu 2e647b49bf lazy http SteamService 2021-05-17 23:36:10 +08:00
Aigio Liu 5a1a04e988 fix 2021-05-17 23:27:53 +08:00
rmbgame 5ba959d69c fix 2021-05-17 22:41:00 +08:00
rmbgame fd7f8b3897 save 2021-05-17 22:31:58 +08:00
rmbgame 7444559b84 save 2021-05-17 22:31:58 +08:00
Aigio Liu a4c3317c10 fix null 2021-05-17 22:02:48 +08:00
Aigio Liu bb8a8cd498 fix 2021-05-17 21:46:46 +08:00
Mossimo a498bb69f5 fix cmd 2021-05-17 20:47:34 +08:00
Mossimo 735ed43fa2 Add Auto Setting 2021-05-17 20:47:34 +08:00
Aigio Liu ab44d9028f fix 2021-05-17 20:39:24 +08:00
Mossimo bf940b46f3 完善挂时常 2021-05-17 20:22:49 +08:00
Mossimo a6e5911b32 save 2021-05-17 20:22:49 +08:00
Mossimo 5e5c08d507 save 2021-05-17 20:22:49 +08:00
rmbgame 058091e904 update all nuget package 2021-05-16 23:23:03 +08:00
rmbgame 6e23a4bf07 update nuget 2021-05-16 22:55:41 +08:00
Aigio Liu 084f1b3765 令牌仓储改进 2021-05-16 22:52:10 +08:00
Mossimo 6e87610611 save 2021-05-16 00:32:16 +08:00
Mossimo f74fe9abea save 2021-05-15 23:41:24 +08:00
rmbgame 41ad3c1831 优化挂时长功能内存占用 2021-05-15 22:19:53 +08:00
rmbgame c80806d5cb save 2021-05-15 02:57:17 +08:00
Mossimo ce357c39f7 fixerror 2021-05-15 02:49:26 +08:00
Mossimo c50ffab7ed auto run AFKApps 2021-05-15 02:31:53 +08:00
Mossimo f6afb0bbb3 UIsave 2021-05-15 00:34:56 +08:00
Mossimo f1d62b958c changeView 2021-05-15 00:34:56 +08:00
Mossimo 1b1bc81f91 save 2021-05-15 00:34:56 +08:00
rmbgame 436df007a9 修改插入令牌默认不启用本机加密,
新增令牌加密设置
2021-05-15 00:30:38 +08:00
rmbgame c67b84ea7a save 2021-05-14 01:05:47 +08:00
Aigio Liu ef2cc93f57 绑定手机 UI & Add SVG 2021-05-13 23:26:16 +08:00
rmbgame 0fa8efbfff 更新日志 2021-05-13 03:21:00 +08:00
rmbgame 45c0987a72 新增无边框窗口化功能 2021-05-13 02:34:03 +08:00
rmbgame 0dd9184b24 无边框窗口化功能 80% 2021-05-13 01:29:11 +08:00
rmbgame 1cd6540e2d 添加隐藏游戏功能 2021-05-12 21:53:45 +08:00
rmbgame 2dfd72b34b update nuget 2021-05-12 21:53:45 +08:00
Aigio Liu d391e3b266 fix 2021-05-12 20:19:41 +08:00
Aigio Liu 316d514b9b 绑定手机 & 解绑快速登录 2021-05-12 20:16:16 +08:00
Mossimo 0923e5ad3e 1 2021-05-12 19:26:50 +08:00
rmbgame 4a49340f7a ex 2021-05-12 19:20:49 +08:00
rmbgame 190e87bee0 fix #231 2021-05-12 18:42:52 +08:00
rmbgame 5214aafc34 fix 2021-05-12 00:37:23 +08:00
rmbgame 2998125b70 fix 2021-05-12 00:37:23 +08:00
rmbgame 2f58d8cdd2 fix 2021-05-12 00:37:23 +08:00
rmbgame 7d9a8535e0 save 2021-05-12 00:37:23 +08:00
Mossimo 8301ec7fdb hideList 2021-05-12 00:27:52 +08:00
Aigio Liu c6831c764b 改进 hosts 文件写入 无权限操作时错误文本 2021-05-11 23:26:37 +08:00
Aigio Liu c2d6b384ee 新功能 账号注销 2021-05-11 21:17:05 +08:00
Mossimo 946e12e15a fix error 2021-05-11 21:02:22 +08:00
Mossimo 14ddd2cd6e save 2021-05-11 19:18:08 +08:00
Mossimo 90a13306b9 hideappwindow 2021-05-11 19:16:06 +08:00
Aigio Liu bd9632f4f6 修复 部分 toast 没有正确显示 2021-05-11 15:04:48 +08:00
Aigio Liu 565185378f 改进 获取占用端口进程检测 2021-05-11 11:58:27 +08:00
267 changed files with 7685 additions and 1870 deletions
+3 -3
View File
@@ -10,12 +10,12 @@
[submodule "references/Steam4NET"]
path = references/Steam4NET
url = https://github.com/SteamTools-Team/Steam4NET.git
[submodule "references/WinAuth"]
path = references/WinAuth
url = https://github.com/SteamTools-Team/WinAuth.git
[submodule "references/Depressurizer"]
path = references/Depressurizer
url = https://github.com/SteamTools-Team/Depressurizer.git
[submodule "references/AvaloniaGif"]
path = references/AvaloniaGif
url = https://github.com/SteamTools-Team/AvaloniaGif
[submodule "references/WinAuth"]
path = references/WinAuth
url = https://github.com/SteamTools-Team/WinAuth
+1
View File
@@ -140,6 +140,7 @@ Read what we [milestones](https://github.com/SteamTools-Team/SteamTools/mileston
* [NPOI](https://github.com/nissl-lab/npoi)
* [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)
* [CefNet](https://github.com/CefNet/CefNet)
* [CefSharp](https://github.com/cefsharp/CefSharp)
* [React](https://github.com/facebook/react)
+1
View File
@@ -152,6 +152,7 @@
* [NPOI](https://github.com/nissl-lab/npoi)
* [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)
* [CefNet](https://github.com/CefNet/CefNet)
* [CefSharp](https://github.com/cefsharp/CefSharp)
* [React](https://github.com/facebook/react)
+631 -19
View File
File diff suppressed because it is too large Load Diff
Binary file not shown.
+32 -29
View File
@@ -1,35 +1,38 @@
1. 新增 手动更新检查
2. 改进 修改账号切换操作交互
3. 修复 修改账号切换 UI 错位
4. 修复 Steam 快速登录时无法查看本地令牌
5. 改进 多开程序时将会显示主窗口
6. 改进 hosts 文件属性为只读且不可修改属性时显示的错误文本
7. 改进 Steam 快速登录现在会显示已登录的用户账号可免输入账号密码一键登录
8. 改进 增加错误日志纪录文件数量与大小限制
9. 改进 库存游戏列表加载方式
10. 改进 社区加速速度与使用中出现的错误
11. 改进 删除账号时弹窗是否删除用户数据
12. 改进 检测进程是否存在的逻辑,避免杀软误报
13. 修复 编辑文本文件,当文件路径如果有空格时传递的路径不正确
14. 修复 Steam 登录时头像没有正常显示
15. 新增 Github 网站、Git 加速
16. 改进 Toast 仅在当前激活窗口弹出
17. 修复 未启动 Steam 时加载库存游戏 Bug
18. 修复 一些引发闪退的异常,增强稳定性
1. 改进 端口被占用检测进程名
2. 修复 部分 Toast 没有正确显示
3. 新增 账号注销功能
4. 改进 hosts 文件写入无权操作时显示的错误文本
5. 新增 快速登录后可绑定手机号
6. 新增 解绑快速登录账号
7. 新增 隐藏库存游戏
8. 新增 游戏功能-无边框窗口化
9. 新增 关于-更新日志
10. 新增 令牌加密设置,现在新增令牌默认将不启用本机加密
11. 修复 非正常退出程序时导致残留进程且无法启动程序
12. 改进 不再写入 C:\Users\用户名\AppData\Local 目录
13. 修复 文本框中某些符号可能无法正确输入
14. 改进 令牌排序上移下移
15. 新增 令牌导入导出
16. 新增 游戏时长挂机功能
17. 新增 Microsoft 账号快速登录与绑定
18. 新增 社区加速 hCaptcha 验证码 / EPIC 验证码 / artstation / v2ex
19. 修复 社区加速 discord 更新下载
| File | Checksum (SHA256) |
| ---- | ---- |
| Steam++_win_x86_v2.2.0.7z | SHA256 |
| Steam++_win_x86_v2.2.0.exe | SHA256 |
| Steam++_win_arm64_v2.2.0.7z | SHA256 |
| Steam++_win_arm64_v2.2.0.exe | SHA256 |
| Steam++_linux_x64_v2.2.0.7z | SHA256 |
| Steam++_linux_x64_v2.2.0.deb | SHA256 |
| Steam++_macos_x64_v2.2.0.dmg | SHA256 |
| Steam++_macos_arm64_v2.2.0.dmg | SHA256 |
| Steam++_android_v2.2.0.apk | SHA256 |
| Steam++_android_arm64_v2.2.0.apk | SHA256 |
| Steam++_android_arm_v2.2.0.apk | SHA256 |
| Steam++_win_x86_v2.3.0.7z | SHA256 |
| Steam++_win_x86_v2.3.0.exe | SHA256 |
| Steam++_win_x86_v2.3.0.msix | SHA256 |
| Steam++_win_arm64_v2.3.0.7z | SHA256 |
| Steam++_win_arm64_v2.3.0.exe | SHA256 |
| Steam++_win_arm64_v2.3.0.msix | SHA256 |
| Steam++_linux_x64_v2.3.0.7z | SHA256 |
| Steam++_linux_x64_v2.3.0.deb | SHA256 |
| Steam++_macos_x64_v2.3.0.dmg | SHA256 |
| Steam++_macos_arm64_v2.3.0.dmg | SHA256 |
| Steam++_android_v2.3.0.apk | SHA256 |
| Steam++_android_arm64_v2.3.0.apk | SHA256 |
| Steam++_android_arm_v2.3.0.apk | SHA256 |
***
Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

@@ -1,4 +1,4 @@
using System.Threading.Tasks;
using System.Threading.Tasks;
namespace System.Application.Services
{
@@ -33,7 +33,46 @@ namespace System.Application.Services
/// <returns></returns>
ValueTask<string?> D(byte[]? value, string? secondaryPassword = null);
/// <inheritdoc cref="D(byte[]?, string?)"/>
ValueTask<(string? content, DResultCode resultCode)> D2(byte[]? value, string? secondaryPassword = null);
/// <inheritdoc cref="D(byte[]?, string?)"/>
ValueTask<byte[]?> DB(byte[]? value, string? secondaryPassword = null);
/// <inheritdoc cref="D(byte[]?, string?)"/>
ValueTask<(byte[]? content, DResultCode resultCode)> DB2(byte[]? value, string? secondaryPassword = null);
public enum DResultCode
{
/// <summary>
/// 成功
/// </summary>
Success = 200,
/// <summary>
/// 嵌入 Aes 失败
/// </summary>
EmbeddedAesFail = 901,
/// <summary>
/// 仅本机失败
/// </summary>
LocalFail,
/// <summary>
/// 二级密码失败
/// </summary>
SecondaryPasswordFail,
/// <summary>
/// 密文值不正确
/// </summary>
IncorrectValueFail,
/// <summary>
/// 转换字符串失败
/// </summary>
UTF8GetStringFail,
}
}
}
@@ -2,6 +2,7 @@ using System.Linq;
using System.Security;
using System.Text;
using System.Threading.Tasks;
using static System.Application.Services.ISecurityService;
namespace System.Application.Services.Implementation
{
@@ -76,23 +77,35 @@ namespace System.Application.Services.Implementation
public async ValueTask<string?> D(byte[]? value, string? secondaryPassword)
{
var value2 = await DB(value, secondaryPassword);
if (value2 == null || !value2.Any()) return null;
(var content, var _) = await D2(value, secondaryPassword);
return content;
}
public async ValueTask<(string? content, DResultCode resultCode)> D2(byte[]? value, string? secondaryPassword)
{
(var content, var resultCode) = await DB2(value, secondaryPassword);
if (resultCode != DResultCode.Success || content == null || !content.Any()) return (null, resultCode);
try
{
return Encoding.UTF8.GetString(value2);
var content_ = Encoding.UTF8.GetString(content);
return (content_, DResultCode.Success);
}
catch
{
return null;
return (null, DResultCode.UTF8GetStringFail);
}
}
public async ValueTask<byte[]?> DB(byte[]? value, string? secondaryPassword)
{
if (value == null) return value;
if (value.Length == 0) return value;
if (value.Length <= sizeof(int)) return null;
(var content, var _) = await DB2(value, secondaryPassword);
return content;
}
public async ValueTask<(byte[]? content, DResultCode resultCode)> DB2(byte[]? value, string? secondaryPassword)
{
if (value == null || value.Length == 0) return (value, DResultCode.Success);
if (value.Length <= sizeof(int)) return (null, DResultCode.IncorrectValueFail);
var d_type = (EncryptionMode)BitConverter.ToInt32(value, 0);
switch (d_type)
@@ -100,27 +113,37 @@ namespace System.Application.Services.Implementation
case EncryptionMode.EmbeddedAes:
var value_1 = UnConcat(value);
var value_1_r = ea.DB(value_1);
return value_1_r;
return (value_1_r, value_1_r == null ?
DResultCode.EmbeddedAesFail : DResultCode.Success);
case EncryptionMode.EmbeddedAesWithLocal:
var value_2 = UnConcat(value);
var value_2_local = await local.DB(value_2);
if (value_2_local == null) return (null, DResultCode.LocalFail);
var value_2_r = ea.DB(value_2_local);
return value_2_r;
return (value_2_r, value_2_r == null ?
DResultCode.EmbeddedAesFail : DResultCode.Success);
case EncryptionMode.EmbeddedAesWithSecondaryPassword:
if (string.IsNullOrWhiteSpace(secondaryPassword)) return null;
if (string.IsNullOrWhiteSpace(secondaryPassword))
return (null, DResultCode.SecondaryPasswordFail);
var value_3 = UnConcat(value);
var value_3_sp = sp.DB(value_3, secondaryPassword);
if (value_3_sp == null) return (null, DResultCode.SecondaryPasswordFail);
var value_3_r = ea.DB(value_3_sp);
return value_3_r;
return (value_3_r, value_3_r == null ?
DResultCode.EmbeddedAesFail : DResultCode.Success);
case EncryptionMode.EmbeddedAesWithSecondaryPasswordWithLocal:
if (string.IsNullOrWhiteSpace(secondaryPassword)) return null;
if (string.IsNullOrWhiteSpace(secondaryPassword))
return (null, DResultCode.SecondaryPasswordFail);
var value_4 = UnConcat(value);
var value_4_local = await local.DB(value_4);
if (value_4_local == null) return (null, DResultCode.LocalFail);
var value_4_sp = sp.DB(value_4_local, secondaryPassword);
if (value_4_sp == null) return (null, DResultCode.SecondaryPasswordFail);
var value_4_r = ea.DB(value_4_sp);
return value_4_r;
return (value_4_r, value_4_r == null ?
DResultCode.EmbeddedAesFail : DResultCode.Success);
default:
return null;
return (null, DResultCode.IncorrectValueFail);
}
}
}
@@ -1,4 +1,4 @@
using System.Threading.Tasks;
using System.Threading.Tasks;
using Xamarin.Essentials;
namespace System.Security
@@ -30,5 +30,11 @@ namespace System.Security
var result = SecureStorage.Remove(key);
return Task.FromResult(result);
}
async Task<bool> IStorage.ContainsKeyAsync(string key)
{
var result = await SecureStorage.GetAsync(key);
return result != null;
}
}
}
@@ -1,4 +1,4 @@
using System.Application.Repositories;
using System.Application.Repositories;
using System.Application.Services;
using System.Security.Cryptography;
using System.Threading.Tasks;
@@ -57,5 +57,12 @@ namespace System.Security
var result = await DeleteAsync(key);
return result > 0;
}
async Task<bool> IStorage.ContainsKeyAsync(string key)
{
key = GetKey(key);
var item = await FirstOrDefaultAsync(x => x.Id == key);
return item != null;
}
}
}
@@ -0,0 +1,17 @@
using System.ApplicationModel;
namespace System.ApplicationModel
{
public static class DesktopBridgeHelper
{
public static bool IsDesktopBridge { internal get; set; }
}
}
namespace System
{
partial class DI
{
public static bool IsDesktopBridge => DesktopBridgeHelper.IsDesktopBridge;
}
}
+1 -1
View File
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>netstandard2.1;netcoreapp3.1</TargetFrameworks>
+2 -2
View File
@@ -1,4 +1,4 @@
#if !NOT_DI
#if !NOT_DI
using Microsoft.Extensions.DependencyInjection;
#endif
using System.Linq;
@@ -12,7 +12,7 @@ namespace System
/// <summary>
/// 依赖注入服务组(DependencyInjection)
/// </summary>
public static class DI
public static partial class DI
{
#if !NOT_DI
@@ -0,0 +1,20 @@
using System.Diagnostics;
// ReSharper disable once CheckNamespace
namespace System
{
public static class ProcessExtensions
{
public static ProcessModule? TryGetMainModule(this Process process)
{
try
{
return process.MainModule;
}
catch
{
return null;
}
}
}
}
@@ -1,4 +1,5 @@
namespace System.Extensions
// ReSharper disable once CheckNamespace
namespace System
{
public static partial class StringExtensions
{
@@ -1,4 +1,4 @@
// https://github.com/aspnet/AspNetIdentity/blob/master/src/Microsoft.AspNet.Identity.Core/AsyncHelper.cs
// https://github.com/aspnet/AspNetIdentity/blob/master/src/Microsoft.AspNet.Identity.Core/AsyncHelper.cs
using System.Globalization;
using System.Threading;
using System.Threading.Tasks;
@@ -8,7 +8,7 @@ namespace System
{
public static class TaskExtensions
{
static readonly TaskFactory _myTaskFactory = new TaskFactory(CancellationToken.None,
static readonly TaskFactory _myTaskFactory = new(CancellationToken.None,
TaskCreationOptions.None, TaskContinuationOptions.None, TaskScheduler.Default);
public static TResult RunSync<TResult>(this Func<Task<TResult>> func)
+10
View File
@@ -56,5 +56,15 @@ namespace System
public const string EXE = ".exe";
public const string _7Z = ".7z";
public const string APPX = ".appx";
public const string MSIX = ".msix";
public const string APPX_Bundle = ".appxbundle";
public const string MSIX_Bundle = ".msixbundle";
public const string AppInstaller = ".appinstaller";
}
}
+11 -1
View File
@@ -1,4 +1,4 @@
namespace System
namespace System
{
/// <summary>
/// MIME 类型
@@ -62,5 +62,15 @@
public const string MP4 = "video/mp4";
public const string APNG = "image/apng";
public const string APPX = "application/appx";
public const string MSIX = "application/msix";
public const string APPX_Bundle = "application/appxbundle";
public const string MSIX_Bundle = "application/msixbundle";
public const string AppInstaller = "application/appinstaller";
}
}
@@ -3,6 +3,7 @@ using System.Runtime.CompilerServices;
using static System.Properties.ThisAssembly;
[assembly: SuppressIldasm]
[assembly: AssemblyTitle(AssemblyTrademark)]
[assembly: AssemblyTrademark(AssemblyTrademark)]
[assembly: AssemblyDescription(AssemblyDescription)]
[assembly: AssemblyProduct(AssemblyProduct)]
@@ -2,7 +2,7 @@ namespace System.Properties
{
static partial class ThisAssembly
{
public const string Version = "2.2.0";
public const string Version = "2.3.0";
public const string InfoVersion = Version /*+ "-beta"*/;
}
+4 -2
View File
@@ -1,10 +1,10 @@
using System.Text;
using System.Text;
using System.Threading.Tasks;
namespace System.Security
{
/// <summary>
/// 为键/值对提供简单的安全存储
/// 为键/值对提供简单的安全存储(值类型泛型与非泛型重载方法不兼容)
/// </summary>
/// <remarks>
/// <para>每个平台使用平台提供的本机API来安全存储数据:</para>
@@ -128,6 +128,8 @@ namespace System.Security
}
}
Task<bool> ContainsKeyAsync(string key);
static IStorage Instance => DI.Get<IStorage>();
#endregion
@@ -1,4 +1,4 @@
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Hosting;
using Microsoft.Win32;
@@ -198,6 +198,12 @@ namespace System.Application
return controller.NotFound();
}
public static IActionResult GetEnv(ControllerBase controller, IWebHostEnvironment environment)
{
var content = $"<h1>{environment.EnvironmentName}</h1>";
return controller.Content(content, MediaTypeNames.HTML);
}
/// <inheritdoc cref="Path2.InitFileSystem(Func{string}, Func{string})"/>
public static void InitFileSystem(IWebHostEnvironment environment)
{
+5 -5
View File
@@ -32,12 +32,12 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.6" />
<!--<PackageReference Include="Microsoft.Extensions.Logging.AzureAppServices" Version="5.0.2" />-->
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.5" />
<PackageReference Include="NLog" Version="4.7.9" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.6" />
<PackageReference Include="NLog" Version="4.7.10" />
<PackageReference Include="NLog.Web.AspNetCore" Version="4.12.0" />
</ItemGroup>
</Project>
@@ -1,4 +1,4 @@
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using System.Application.Repositories;
using System.Linq;
using System.Linq.Expressions;
@@ -49,5 +49,11 @@ namespace System.Security
var result = await DeleteAsync(key);
return result > 0;
}
async Task<bool> IStorage.ContainsKeyAsync(string key)
{
var result = await Get(key).AnyAsync();
return result;
}
}
}
+1
View File
@@ -44,6 +44,7 @@
- 目标框架使用 .NET Framework 3.5 并通过 App.config 配置允许在 4.X 中运行 实现在 Windows 上兼容所有的运行库环境
- Launch **启动项**
- ST.Client.Desktop.Avalonia.App **桌面客户端**
- ST.Client.Desktop.Avalonia.App.Bridge* **Desktop Bridge**
- ST.Client.Desktop.Avalonia.Demo.App **桌面客户端(UI演示)**
- ST.Client.Mobile.Droid.App **Android 客户端**
- ST.Client.Mobile.iOS.App **iOS 客户端**
@@ -73,6 +73,7 @@ namespace System
if (pSoftDeleted.IsAssignableFrom(type))
{
// https://docs.microsoft.com/zh-cn/ef/core/querying/filters
modelBuilder.Entity(type, p => p.HasIndex(nameof(ISoftDeleted.SoftDeleted)));
modelBuilder.Entity(type).HasQueryFilter(SoftDeletedQueryFilter(type));
softDeleted.Add(type);
@@ -26,8 +26,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.6" />
<PackageReference Include="Z.EntityFramework.Plus.EFCore" Version="5.1.30" />
</ItemGroup>
</Project>
@@ -1,4 +1,4 @@
using System.Application.Columns;
using System.Application.Columns;
using System.Runtime.CompilerServices;
namespace System
@@ -78,14 +78,14 @@ namespace System
/// <returns></returns>
public static FormattableString SoftDeleteFromTableNameWhereIdEqual(string tableName, object id)
{
var sql = UpdateFrom + tableName + " set " + nameof(ISoftDeleted.SoftDeleted) + " = 1" + WhereIdEqual_0;
var sql = Update + tableName + " set " + nameof(ISoftDeleted.SoftDeleted) + " = 1" + WhereIdEqual_0;
return FormattableStringFactory.Create(sql, id);
}
/// <summary>
/// "update from "
/// "update "
/// </summary>
public const string UpdateFrom = "update from ";
public const string Update = "update ";
/// <summary>
/// " where Id in ("
Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 517 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 921 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">
<Identity
Name="net.steampp.app"
Publisher="CN=长沙次元超越科技有限公司"
Version="2.3.0.0" />
<Properties>
<DisplayName>Steam++</DisplayName>
<PublisherDisplayName>长沙次元超越科技有限公司</PublisherDisplayName>
<Logo>Images\StoreLogo.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.0.0" MaxVersionTested="10.0.0.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.14393.0" MaxVersionTested="10.0.14393.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="App"
Executable="$targetnametoken$.exe"
EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="Steam++"
Description="「Steam++」是一个包含多种Steam工具功能的工具箱。"
BackgroundColor="transparent"
Square150x150Logo="Images\Square150x150Logo.png"
Square44x44Logo="Images\Square44x44Logo.png">
<uap:DefaultTile Wide310x150Logo="Images\Wide310x150Logo.png" Square71x71Logo="Images\SmallTile.png" Square310x310Logo="Images\LargeTile.png" ShortName="Steam++">
<uap:ShowNameOnTiles>
<uap:ShowOn Tile="square150x150Logo"/>
<uap:ShowOn Tile="wide310x150Logo"/>
<uap:ShowOn Tile="square310x310Logo"/>
</uap:ShowNameOnTiles>
</uap:DefaultTile >
<uap:SplashScreen Image="Images\SplashScreen.png" />
<uap:InitialRotationPreference>
<uap:Rotation Preference="landscape"/>
</uap:InitialRotationPreference>
<uap:LockScreen BadgeLogo="Images\BadgeLogo.png" Notification="badgeAndTileText"/>
</uap:VisualElements>
<Extensions>
<desktop:Extension xmlns:desktop="http://schemas.microsoft.com/appx/manifest/desktop/windows10" Category="windows.fullTrustProcess" Executable="ST.Client.Desktop.Avalonia.App\Steam++.exe" />
</Extensions>
</Application>
</Applications>
<Capabilities>
<Capability Name="internetClient" />
<rescap:Capability Name="runFullTrust" />
<rescap:Capability Name="allowElevation" />
</Capabilities>
</Package>
@@ -0,0 +1,192 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '15.0'">
<VisualStudioVersion>15.0</VisualStudioVersion>
</PropertyGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x86">
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x86">
<Configuration>Release</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|AnyCPU">
<Configuration>Debug</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|AnyCPU">
<Configuration>Release</Configuration>
<Platform>x86</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup>
<WapProjPath Condition="'$(WapProjPath)'==''">$(MSBuildExtensionsPath)\Microsoft\DesktopBridge\</WapProjPath>
</PropertyGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.props" />
<PropertyGroup>
<ProjectGuid>1f659618-71e2-4aaf-9d86-62700fd4cf02</ProjectGuid>
<TargetPlatformVersion>10.0.19041.0</TargetPlatformVersion>
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
<DefaultLanguage>zh-CN</DefaultLanguage>
<AppxPackageSigningEnabled>True</AppxPackageSigningEnabled>
<PackageCertificateThumbprint>B6D2933B81EEDE587801E0C3E0D570DFD3DEFA70</PackageCertificateThumbprint>
<EntryPointProjectUniqueName>..\ST.Client.Desktop.Avalonia.App.Bridge\ST.Client.Desktop.Avalonia.App.Bridge.csproj</EntryPointProjectUniqueName>
</PropertyGroup>
<ItemGroup>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
</ItemGroup>
<ItemGroup>
<Content Include="Images\BadgeLogo.scale-100.png" />
<Content Include="Images\BadgeLogo.scale-125.png" />
<Content Include="Images\BadgeLogo.scale-150.png" />
<Content Include="Images\BadgeLogo.scale-200.png" />
<Content Include="Images\BadgeLogo.scale-400.png" />
<Content Include="Images\LargeTile.scale-100.png" />
<Content Include="Images\LargeTile.scale-125.png" />
<Content Include="Images\LargeTile.scale-150.png" />
<Content Include="Images\LargeTile.scale-200.png" />
<Content Include="Images\LargeTile.scale-400.png" />
<Content Include="Images\SmallTile.scale-100.png" />
<Content Include="Images\SmallTile.scale-125.png" />
<Content Include="Images\SmallTile.scale-150.png" />
<Content Include="Images\SmallTile.scale-200.png" />
<Content Include="Images\SmallTile.scale-400.png" />
<Content Include="Images\SplashScreen.scale-100.png" />
<Content Include="Images\SplashScreen.scale-125.png" />
<Content Include="Images\SplashScreen.scale-150.png" />
<Content Include="Images\SplashScreen.scale-200.png" />
<Content Include="Images\SplashScreen.scale-400.png" />
<Content Include="Images\Square150x150Logo.scale-100.png" />
<Content Include="Images\Square150x150Logo.scale-125.png" />
<Content Include="Images\Square150x150Logo.scale-150.png" />
<Content Include="Images\Square150x150Logo.scale-200.png" />
<Content Include="Images\Square150x150Logo.scale-400.png" />
<Content Include="Images\Square44x44Logo.altform-lightunplated_targetsize-16.png" />
<Content Include="Images\Square44x44Logo.altform-lightunplated_targetsize-24.png" />
<Content Include="Images\Square44x44Logo.altform-lightunplated_targetsize-256.png" />
<Content Include="Images\Square44x44Logo.altform-lightunplated_targetsize-32.png" />
<Content Include="Images\Square44x44Logo.altform-lightunplated_targetsize-48.png" />
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-16.png" />
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-256.png" />
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-32.png" />
<Content Include="Images\Square44x44Logo.altform-unplated_targetsize-48.png" />
<Content Include="Images\Square44x44Logo.scale-100.png" />
<Content Include="Images\Square44x44Logo.scale-125.png" />
<Content Include="Images\Square44x44Logo.scale-150.png" />
<Content Include="Images\Square44x44Logo.scale-200.png" />
<Content Include="Images\Square44x44Logo.scale-400.png" />
<Content Include="Images\Square44x44Logo.targetsize-16.png" />
<Content Include="Images\Square44x44Logo.targetsize-24.png" />
<Content Include="Images\Square44x44Logo.targetsize-24_altform-unplated.png" />
<Content Include="Images\Square44x44Logo.targetsize-256.png" />
<Content Include="Images\Square44x44Logo.targetsize-32.png" />
<Content Include="Images\Square44x44Logo.targetsize-48.png" />
<Content Include="Images\StoreLogo.scale-100.png" />
<Content Include="Images\StoreLogo.scale-125.png" />
<Content Include="Images\StoreLogo.scale-150.png" />
<Content Include="Images\StoreLogo.scale-200.png" />
<Content Include="Images\StoreLogo.scale-400.png" />
<Content Include="Images\Wide310x150Logo.scale-100.png" />
<Content Include="Images\Wide310x150Logo.scale-125.png" />
<Content Include="Images\Wide310x150Logo.scale-150.png" />
<Content Include="Images\Wide310x150Logo.scale-200.png" />
<Content Include="Images\Wide310x150Logo.scale-400.png" />
<None Include="Package_TemporaryKey.pfx" />
</ItemGroup>
<Import Project="$(WapProjPath)\Microsoft.DesktopBridge.targets" />
<ItemGroup>
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.19041.8" PrivateAssets="all" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ST.Client.Desktop.Avalonia.App.Bridge\ST.Client.Desktop.Avalonia.App.Bridge.csproj">
<SkipGetTargetFrameworkProperties>True</SkipGetTargetFrameworkProperties>
<PublishProfile>Properties\PublishProfiles\win10-x86.aot.pubxml</PublishProfile>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\..\CEF\win-x86\locales\zh-CN.pak">
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\locales\zh-CN.pak</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\..\CEF\win-x86\swiftshader\libEGL.dll">
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\swiftshader\libEGL.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\..\CEF\win-x86\swiftshader\libGLESv2.dll">
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\swiftshader\libGLESv2.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\..\CEF\win-x86\chrome_100_percent.pak">
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\chrome_100_percent.pak</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\..\CEF\win-x86\chrome_200_percent.pak">
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\chrome_200_percent.pak</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\..\CEF\win-x86\chrome_elf.dll">
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\chrome_elf.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\..\CEF\win-x86\d3dcompiler_47.dll">
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\d3dcompiler_47.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\..\CEF\win-x86\icudtl.dat">
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\icudtl.dat</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\..\CEF\win-x86\libcef.dll">
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\libcef.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\..\CEF\win-x86\libEGL.dll">
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\libEGL.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\..\CEF\win-x86\libGLESv2.dll">
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\libGLESv2.dll</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\..\CEF\win-x86\resources.pak">
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\resources.pak</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\..\CEF\win-x86\snapshot_blob.bin">
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\snapshot_blob.bin</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="..\..\..\CEF\win-x86\v8_context_snapshot.bin">
<Link>ST.Client.Desktop.Avalonia.App.Bridge\CEF\win-x86\v8_context_snapshot.bin</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>
@@ -0,0 +1,27 @@
using System.ApplicationModel;
using Windows.ApplicationModel;
// ReSharper disable once CheckNamespace
namespace System.Application
{
static class DesktopBridgeHelper2
{
internal static bool Init()
{
if (DI.Platform != Platform.Windows) return false;
var osVer = Environment.OSVersion.Version;
if (osVer.Major != 10 || osVer.Build < 17763) return false;
try
{
if (string.IsNullOrWhiteSpace(Package.Current.Id.Name)) return false;
}
catch
{
return false;
}
DesktopBridgeHelper.IsDesktopBridge = true;
FileSystemDesktopBridge.InitFileSystem();
return true;
}
}
}
@@ -0,0 +1,18 @@
using Windows.Storage;
// ReSharper disable once CheckNamespace
namespace System.Application
{
static class FileSystemDesktopBridge
{
internal static void InitFileSystem()
{
// https://github.com/xamarin/Essentials/blob/1.6.1/Xamarin.Essentials/FileSystem/FileSystem.uwp.cs#L12
// https://docs.microsoft.com/zh-cn/windows/msix/desktop/desktop-to-uwp-behind-the-scenes
// 不允许在 C:\Program Files\WindowsApps\package_name 下写入。
// C:\Users\{user}\AppData\Local\Packages\net.steampp.app_gvn1zxq6vcwjj\LocalState
// C:\Users\{user}\AppData\Local\Packages\net.steampp.app_gvn1zxq6vcwjj\LocalCache
IOPath.InitFileSystem(() => ApplicationData.Current.LocalFolder.Path, () => ApplicationData.Current.LocalCacheFolder.Path);
}
}
}
@@ -0,0 +1,17 @@
<?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;WINDOWS;WINDOWS_DESKTOP_BRIDGE;$(DefineConstants)</DefineConstants>
<Configuration>Release</Configuration>
<Platform>AnyCPU</Platform>
<PlatformTarget>ARM64</PlatformTarget>
<PublishDir>bin\Release\Publish\win10-arm64</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<!-- 注意:RuntimeIdentifier win-x86 会导致亚克力效果会丢失 -->
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
<PublishReadyToRun>true</PublishReadyToRun>
</PropertyGroup>
</Project>
@@ -0,0 +1,17 @@
<?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;WINDOWS;WINDOWS_DESKTOP_BRIDGE;$(DefineConstants)</DefineConstants>
<Configuration>Release</Configuration>
<Platform>x86</Platform>
<PlatformTarget>x86</PlatformTarget>
<PublishDir>bin\Release\Publish\win10-x86</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<!-- 注意:RuntimeIdentifier win-x86 会导致亚克力效果会丢失 -->
<RuntimeIdentifier>win10-x86</RuntimeIdentifier>
<PublishReadyToRun>true</PublishReadyToRun>
</PropertyGroup>
</Project>
@@ -0,0 +1,105 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<SignAssembly>false</SignAssembly>
<!--(SignAssembly)对此程序集进行签名会导致编译失败(CompileAvaloniaXamlTask)-->
<RootNamespace>System.Application.UI</RootNamespace>
<AssemblyName>Steam++</AssemblyName>
<DefineConstants>WINDOWS;WINDOWS_DESKTOP_BRIDGE;$(DefineConstants)</DefineConstants>
<ApplicationIcon>..\ST.Client.Desktop.Avalonia\Application\UI\Assets\Icon.ico</ApplicationIcon>
<ApplicationManifest>..\ST.Client.Desktop.Avalonia.App\Properties\app.manifest</ApplicationManifest>
<Platforms>AnyCPU;x86</Platforms>
<PlatformTarget>x86</PlatformTarget>
<RuntimeIdentifier>win10-x86</RuntimeIdentifier>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<SelfContained>true</SelfContained>
<PublishSingleFile>false</PublishSingleFile>
<!--目前裁剪存在问题,禁用-->
<PublishTrimmed>false</PublishTrimmed>
<TrimMode>link</TrimMode>
<TrimmerRemoveSymbols>true</TrimmerRemoveSymbols>
<!--剪裁框架库功能 https://docs.microsoft.com/zh-cn/dotnet/core/deploying/trimming-options#trimming-framework-library-features -->
<DebuggerSupport>false</DebuggerSupport>
<EnableUnsafeBinaryFormatterSerialization>false</EnableUnsafeBinaryFormatterSerialization>
<EnableUnsafeUTF7Encoding>false</EnableUnsafeUTF7Encoding>
<SuppressTrimAnalysisWarnings>false</SuppressTrimAnalysisWarnings>
<EventSourceSupport>false</EventSourceSupport>
<HttpActivityPropagationSupport>false</HttpActivityPropagationSupport>
<UseSystemResourceKeys>true</UseSystemResourceKeys>
<DebugType>none</DebugType>
<DebugSymbols>false</DebugSymbols>
<PublishReadyToRun>true</PublishReadyToRun>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Startup2.cs" />
<Compile Include="..\Common.CoreLib\Properties\AssemblyInfo.cs">
<Link>Properties\AssemblyInfo.cs</Link>
</Compile>
<Compile Include="..\Common.CoreLib\Properties\AssemblyInfo.Version.cs">
<Link>Properties\AssemblyInfo.Version.cs</Link>
</Compile>
<Compile Include="..\ST.Client.Desktop.Avalonia.App\*.cs" />
<Compile Update="..\ST.Client.Desktop.Avalonia.App\App.axaml.cs">
<Link>App.axaml.cs</Link>
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
<AvaloniaResource Include="..\ST.Client.Desktop.Avalonia.App\App.axaml">
<Link>App.axaml</Link>
<SubType>Designer</SubType>
</AvaloniaResource>
<Compile Include="..\ST.Client.Desktop.Avalonia.App\Views\MainWindow.axaml.cs">
<Link>Views\MainWindow.axaml.cs</Link>
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
<AvaloniaResource Include="..\ST.Client.Desktop.Avalonia.App\Views\MainWindow.axaml">
<Link>Views\MainWindow.axaml</Link>
<SubType>Designer</SubType>
</AvaloniaResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ST.Client.Desktop.Avalonia\ST.Client.Desktop.Avalonia.csproj" />
<ProjectReference Include="..\ST.Client.Desktop\ST.Client.Desktop.csproj" />
<ProjectReference Include="..\Common.CoreLib\Common.CoreLib.csproj" />
<ProjectReference Include="..\ST.Client.Desktop.Windows\ST.Client.Desktop.Windows.csproj" />
<ProjectReference Include="..\ST.Client.Desktop.Console.App.Bridge\ST.Client.Desktop.Console.App.Bridge.csproj" />
<Reference Include="Microsoft.Windows.SDK.NET">
<HintPath>..\..\references\Microsoft.Windows.SDK.NET.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Update="**\*.xaml.cs">
<DependentUpon>%(Filename)</DependentUpon>
</Compile>
<AvaloniaResource Include="**\*.xaml">
<SubType>Designer</SubType>
</AvaloniaResource>
<AvaloniaResource Include="Assets\**" />
</ItemGroup>
<ItemGroup Condition="Exists('$(MSBuildProjectDirectory)\..\..\aes-key.pfx')">
<EmbeddedResource Include="..\..\aes-key.pfx" Link="Resources\3A613E8D" />
</ItemGroup>
<ItemGroup Condition="'$(Configuration)'=='Debug' And Exists('$(MSBuildProjectDirectory)\..\..\app-id-debug.pfx')">
<EmbeddedResource Include="..\..\app-id-debug.pfx" Link="Resources\0093BF84" />
</ItemGroup>
<ItemGroup Condition="'$(Configuration)'=='Debug' And Exists('$(MSBuildProjectDirectory)\..\..\rsa-public-key-debug.pfx')">
<EmbeddedResource Include="..\..\rsa-public-key-debug.pfx" Link="Resources\6D72ED26" />
</ItemGroup>
<ItemGroup Condition="'$(Configuration)'=='Release' And Exists('$(MSBuildProjectDirectory)\..\..\app-id-release.pfx')">
<EmbeddedResource Include="..\..\app-id-release.pfx" Link="Resources\F1D827AB" />
</ItemGroup>
<ItemGroup Condition="'$(Configuration)'=='Release' And Exists('$(MSBuildProjectDirectory)\..\..\rsa-public-key-release.pfx')">
<EmbeddedResource Include="..\..\rsa-public-key-release.pfx" Link="Resources\E88CA4F9" />
</ItemGroup>
</Project>
@@ -31,14 +31,13 @@ using System.Application.Services.Implementation;
using APIConst = System.Application.Services.CloudService.Constants;
[assembly: Guid("82cda250-48a2-48ad-ab03-5cda873ef80c")]
[assembly: AssemblyTitle(ThisAssembly.AssemblyTrademark)]
namespace System.Application.UI
{
public partial class App : AvaloniaApplication, IDisposableHolder, IDesktopAppService, IDesktopAvaloniaAppService
{
public static App Instance => Current is App app ? app : throw new Exception("Impossible");
public static DirectoryInfo RootDirectory => new(AppContext.BaseDirectory);
//public static DirectoryInfo RootDirectory => new(AppContext.BaseDirectory);
AppTheme mTheme = AppTheme.Dark;
public AppTheme Theme
@@ -1,3 +1,4 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.IO.Pipes;
@@ -35,17 +36,41 @@ namespace System.Application.UI
}
}
static bool GetIsFirst()
static IEnumerable<Process> GetCurrentAllProcess()
{
var current = Process.GetCurrentProcess();
var currentMainModule = current.TryGetMainModule();
var query = from p in Process.GetProcessesByName(current.ProcessName)
let pMainModule = p.TryGetMainModule()
where p.Id != current.Id &&
p.ProcessName == current.ProcessName &&
(current.MainModule == null ||
(p.MainModule != null &&
p.MainModule.FileName == current.MainModule.FileName &&
p.MainModule.ModuleName == current.MainModule.ModuleName))
(currentMainModule == null ||
(pMainModule != null &&
pMainModule.FileName == currentMainModule.FileName &&
pMainModule.ModuleName == currentMainModule.ModuleName))
select p;
return query;
}
public static bool TryKillCurrentAllProcess()
{
foreach (var p in GetCurrentAllProcess())
{
try
{
p.Kill(true);
p.WaitForExit(500);
}
catch
{
}
}
return GetIsFirst();
}
static bool GetIsFirst()
{
var query = GetCurrentAllProcess();
var r = query.Any();
return !r;
}
@@ -97,19 +122,20 @@ namespace System.Application.UI
/// 给主进程发送消息
/// </summary>
/// <param name="value"></param>
public static void SendMessage(string value)
public static bool SendMessage(string value)
{
var name = GetPipeName();
try
{
using var pipeClient = new NamedPipeClientStream(".", name, PipeDirection.Out, PipeOptions.None, TokenImpersonationLevel.Impersonation);
pipeClient.Connect();
pipeClient.Connect(1000);
using StreamWriter sw = new StreamWriter(pipeClient);
sw.WriteLine(value);
return true;
}
catch (IOException)
catch
{
return false;
}
}
@@ -1,4 +1,5 @@
using Avalonia.Controls.ApplicationLifetimes;
using Avalonia.Threading;
using System.Application.Services;
using System.CommandLine;
using System.CommandLine.Invocation;
@@ -38,12 +39,29 @@ namespace System.Application.UI
#endif
if (IsMainProcess)
{
appInstance = new ApplicationInstance();
var isInitAppInstanceReset = false;
initAppInstance: appInstance = new ApplicationInstance();
if (!appInstance.IsFirst)
{
//Console.WriteLine("ApplicationInstance.SendMessage(string.Empty);");
ApplicationInstance.SendMessage(string.Empty);
return;
if (ApplicationInstance.SendMessage(string.Empty))
{
return;
}
else
{
if (!isInitAppInstanceReset &&
ApplicationInstance.TryKillCurrentAllProcess())
{
isInitAppInstanceReset = true;
appInstance.Dispose();
goto initAppInstance;
}
else
{
return;
}
}
}
appInstance.MessageReceived += value =>
{
@@ -120,14 +138,32 @@ namespace System.Application.UI
// -clt app -id 632360
var unlock_achievement = new Command("app", "打开成就解锁窗口");
unlock_achievement.AddOption(new Option<int>("-id", "指定一个Steam游戏Id"));
unlock_achievement.AddOption(new Option<bool>("-silence", "静默启动(不弹窗口)"));
unlock_achievement.AddOption(new Option<bool>("-silence", "挂运行服务,不加载窗口,内存占用更小"));
unlock_achievement.Handler = CommandHandler.Create((int id, bool silence) =>
{
if (id <= 0) return;
initStartup(DILevel.GUI | DILevel.Steam | DILevel.HttpClientFactory);
IWindowService.Instance.InitUnlockAchievement(id);
IsMinimize = silence;
initUIApp();
try
{
if (id <= 0) return;
if (!silence)
{
initStartup(DILevel.GUI | DILevel.Steam | DILevel.HttpClientFactory);
IWindowService.Instance.InitUnlockAchievement(id);
initUIApp();
}
else
{
initStartup(DILevel.Steam);
SteamConnectService.Current.Initialize(id);
var day = 86400000;
while (true)
Threading.Thread.Sleep(day);
}
}
catch (Exception ex)
{
Log.Error(nameof(unlock_achievement), ex, "Start");
}
});
rootCommand.AddCommand(unlock_achievement);

Some files were not shown because too many files have changed in this diff Show More