mirror of
https://github.com/BeyondDimension/SteamTools.git
synced 2026-10-26 20:20:14 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6c905ab4c7 | ||
|
|
cb16f7690d | ||
|
|
2c80c2d80c | ||
|
|
778a76a36e | ||
|
|
660fb687f3 | ||
|
|
39766838df | ||
|
|
12e438c8cd | ||
|
|
e249b0a60f | ||
|
|
c407d0d5c7 | ||
|
|
848aa77029 | ||
|
|
bdfa82e557 | ||
|
|
4491e32cf3 | ||
|
|
86cb93a02a | ||
|
|
1e26b22bc8 | ||
|
|
4982faf5ba | ||
|
|
e10e14cd0c | ||
|
|
86a2bc25bc | ||
|
|
4ef3523dff | ||
|
|
5fa4086aee | ||
|
|
689faa5f67 | ||
|
|
0d6bb55d17 | ||
|
|
5ce5697a75 | ||
|
|
a6694c5820 | ||
|
|
d3be62c5ec | ||
|
|
c68ff50812 | ||
|
|
fba8dca6c3 | ||
|
|
03f3a73a60 | ||
|
|
6cdfb98b0f | ||
|
|
a930211594 | ||
|
|
d54b828135 | ||
|
|
c86f28161f | ||
|
|
9932606be2 | ||
|
|
d56de1676e | ||
|
|
5b787b6d7c | ||
|
|
35adebcbb1 | ||
|
|
83b6d9d67c | ||
|
|
7a18b0a8e2 | ||
|
|
f45db63b87 | ||
|
|
3a3beec9db | ||
|
|
45c866ba2d | ||
|
|
7854a0446b | ||
|
|
e730b4f7f1 | ||
|
|
f2fa9d78de | ||
|
|
ef751f8c3a | ||
|
|
aa9698887d | ||
|
|
7e04eeb7c6 | ||
|
|
e59d1a5002 | ||
|
|
6d82ca02df | ||
|
|
8cc5bb4dab | ||
|
|
71f7fbf890 | ||
|
|
98f6bbd249 | ||
|
|
3b4efd3ce3 | ||
|
|
a20ceb840f | ||
|
|
ad23a712a3 | ||
|
|
931c4ad288 | ||
|
|
09a4e8b5dd | ||
|
|
fe4f11b868 | ||
|
|
02e30a379a | ||
|
|
6b816d7a88 | ||
|
|
6c0d817c2b | ||
|
|
487365e148 | ||
|
|
1245c44fe1 | ||
|
|
4fa35b762e | ||
|
|
a38fdbf1eb | ||
|
|
a64493721e | ||
|
|
809c531202 | ||
|
|
6566e5f129 | ||
|
|
7c37aca596 | ||
|
|
93b88bb35b | ||
|
|
54cc336983 | ||
|
|
2e7eb319ea | ||
|
|
886f35e22a | ||
|
|
df734d2784 | ||
|
|
718d6babad | ||
|
|
f369ca2c7d | ||
|
|
3089eacc57 | ||
|
|
af1915de71 | ||
|
|
2c50a0a220 | ||
|
|
2f2404236a | ||
|
|
9b6c374950 | ||
|
|
84b15343cc | ||
|
|
2e96d594df | ||
|
|
2eec779a00 | ||
|
|
285d071125 | ||
|
|
0ad2b9f05d | ||
|
|
8d8565c4d1 | ||
|
|
2ee1eed145 | ||
|
|
d16778fda2 | ||
|
|
efbc9489cd | ||
|
|
ca8ad41b7b | ||
|
|
535894798c | ||
|
|
629518f31d | ||
|
|
a5535cba87 | ||
|
|
a495cd2856 | ||
|
|
ba3911fcba | ||
|
|
9ebb02d55e | ||
|
|
a7480f1d29 | ||
|
|
a503243243 | ||
|
|
8a6ecf9a5d | ||
|
|
0437294392 | ||
|
|
a26f58af4a | ||
|
|
5b023f10a9 | ||
|
|
4f733a0486 | ||
|
|
6562d28336 | ||
|
|
f15dc904ff | ||
|
|
35498b2751 | ||
|
|
32a8d35c91 | ||
|
|
dc5e700907 | ||
|
|
94bb65732e | ||
|
|
d1b81930e0 | ||
|
|
f07b4d3390 | ||
|
|
7315e432cb | ||
|
|
8a9dd00dcc | ||
|
|
1ada60511b | ||
|
|
9b257524bd | ||
|
|
e5ddc46deb | ||
|
|
51fdc5a841 | ||
|
|
2e263a96b9 | ||
|
|
d543c2bac1 | ||
|
|
0509d2b843 | ||
|
|
f0a14e332d | ||
|
|
948016c84f | ||
|
|
98da730c18 | ||
|
|
ab6bfd45b7 | ||
|
|
8abfc81ba2 | ||
|
|
d4d6c2fb51 | ||
|
|
8da01ac3dd | ||
|
|
2ab26f7848 | ||
|
|
d646eacda1 | ||
|
|
fb029f729b | ||
|
|
5ef6663269 | ||
|
|
5c86b53000 | ||
|
|
efb6adbd9b | ||
|
|
209202b5cf | ||
|
|
c0a081e226 |
@@ -22,13 +22,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup .NET 6
|
||||
uses: actions/setup-dotnet@v1
|
||||
uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
@@ -49,7 +49,7 @@ jobs:
|
||||
|
||||
- name: Checkout Credentials repository
|
||||
if: ${{ matrix.os == 'windows-latest' && !startsWith(github.ref, 'refs/tags/') && github.event_name == 'push' }}
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: SteamTools-Team/Credentials
|
||||
token: ${{ secrets.REPO_TOKEN }}
|
||||
@@ -152,7 +152,7 @@ jobs:
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: '[${{ matrix.configuration }}]${{ env.ProjectName }}_linux_x64_${{ env.GITHUB_SHA_SHORT }}'
|
||||
path: src\ST.Client.Desktop.Avalonia.App\bin\${{ matrix.configuration }}\Publish\${{ env.ProjectName }}_linux_x64_${{ env.GITHUB_SHA_SHORT }}.7z
|
||||
path: src\ST.Client.Desktop.Avalonia.App\bin\${{ matrix.configuration }}\Publish\${{ env.ProjectName }}_linux_x64_${{ env.GITHUB_SHA_SHORT }}.tar.zst
|
||||
|
||||
- name: Upload linux-arm64 App ${{ matrix.configuration }}
|
||||
continue-on-error: true
|
||||
@@ -160,4 +160,4 @@ jobs:
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: '[${{ matrix.configuration }}]${{ env.ProjectName }}_linux_arm64_${{ env.GITHUB_SHA_SHORT }}'
|
||||
path: src\ST.Client.Desktop.Avalonia.App\bin\${{ matrix.configuration }}\Publish\${{ env.ProjectName }}_linux_arm64_${{ env.GITHUB_SHA_SHORT }}.7z
|
||||
path: src\ST.Client.Desktop.Avalonia.App\bin\${{ matrix.configuration }}\Publish\${{ env.ProjectName }}_linux_arm64_${{ env.GITHUB_SHA_SHORT }}.tar.zst
|
||||
|
||||
@@ -22,13 +22,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup .NET 6
|
||||
uses: actions/setup-dotnet@v1
|
||||
uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
@@ -52,7 +52,7 @@ jobs:
|
||||
|
||||
- name: Checkout NSIS-Build repository
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: SteamTools-Team/NSIS-Build
|
||||
token: ${{ secrets.REPO_TOKEN }}
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
|
||||
- name: Checkout Credentials repository
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: SteamTools-Team/Credentials
|
||||
token: ${{ secrets.REPO_TOKEN }}
|
||||
@@ -160,21 +160,21 @@ jobs:
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_macos_arm64_v${{ steps.tag.outputs.tag }}.7z" "${env:PublishFilePath}"
|
||||
Write-Output "macos_arm64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_macos_arm64_v${{ steps.tag.outputs.tag }}.7z)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Package linux-x64 7z
|
||||
- name: Package linux-x64 tar.zst
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path ${env:PublishFilePath} -Force > $null
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_linux_x64_v${{ steps.tag.outputs.tag }}.7z" "${env:PublishFilePath}"
|
||||
Write-Output "linux_x64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_linux_x64_v${{ steps.tag.outputs.tag }}.7z)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_linux_x64_v${{ steps.tag.outputs.tag }}.tar.zst" "${env:PublishFilePath}"
|
||||
Write-Output "linux_x64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_linux_x64_v${{ steps.tag.outputs.tag }}.tar.zst)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Package linux-arm64 7z
|
||||
- name: Package linux-arm64 tar.zst
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
shell: pwsh
|
||||
run: |
|
||||
New-Item -ItemType Directory -Path ${env:PublishFilePath} -Force > $null
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_linux_arm64_v${{ steps.tag.outputs.tag }}.7z" "${env:PublishFilePath}"
|
||||
Write-Output "linux_arm64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_linux_arm64_v${{ steps.tag.outputs.tag }}.7z)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
Copy-Item ".\src\ST.Client.Desktop.Avalonia.App\bin\${env:Configuration}\Publish\${env:ProjectName}_linux_arm64_v${{ steps.tag.outputs.tag }}.tar.zst" "${env:PublishFilePath}"
|
||||
Write-Output "linux_arm64_SHA256=$(.\packaging\SHA256.ps1 ${env:PublishFilePath}\${env:ProjectName}_linux_arm64_v${{ steps.tag.outputs.tag }}.tar.zst)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Package linux-x64 deb
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
@@ -237,8 +237,8 @@ jobs:
|
||||
| <sub>${{ env.ProjectName }}_win_x64_v${{ steps.tag.outputs.tag }}.exe</sub> | <sub>${{ env.exe_win_x64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_win_x64_fde_v${{ steps.tag.outputs.tag }}.exe</sub> | <sub>${{ env.exe_fd_win_x64_SHA256 }}</sub> |
|
||||
|||
|
||||
| <sub>${{ env.ProjectName }}_linux_x64_v${{ steps.tag.outputs.tag }}.7z</sub> | <sub>${{ env.linux_x64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_linux_arm64_v${{ steps.tag.outputs.tag }}.7z</sub> | <sub>${{ env.linux_arm64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_linux_x64_v${{ steps.tag.outputs.tag }}.tar.zst</sub> | <sub>${{ env.linux_x64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_linux_arm64_v${{ steps.tag.outputs.tag }}.tar.zst</sub> | <sub>${{ env.linux_arm64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_linux_x64_v${{ steps.tag.outputs.tag }}.deb</sub> | <sub>${{ env.deb_linux_x64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_linux_arm64_v${{ steps.tag.outputs.tag }}.deb</sub> | <sub>${{ env.deb_linux_arm64_SHA256 }}</sub> |
|
||||
| <sub>${{ env.ProjectName }}_linux_x64_v${{ steps.tag.outputs.tag }}.rpm</sub> | <sub>${{ env.rpm_linux_x64_SHA256 }}</sub> |
|
||||
@@ -264,13 +264,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup .NET 6
|
||||
uses: actions/setup-dotnet@v1
|
||||
uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
@@ -314,7 +314,7 @@ jobs:
|
||||
|
||||
- name: Checkout Credentials repository
|
||||
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') }}
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: SteamTools-Team/Credentials
|
||||
token: ${{ secrets.REPO_TOKEN }}
|
||||
|
||||
@@ -18,13 +18,13 @@ jobs:
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Setup .NET 6
|
||||
uses: actions/setup-dotnet@v1
|
||||
uses: actions/setup-dotnet@v2
|
||||
with:
|
||||
dotnet-version: 6.0.x
|
||||
|
||||
|
||||
@@ -37,3 +37,6 @@
|
||||
[submodule "references/SevenZipSharp"]
|
||||
path = references/SevenZipSharp
|
||||
url = https://github.com/SteamTools-Team/SevenZipSharp.git
|
||||
[submodule "references/Gameloop.Vdf"]
|
||||
path = references/Gameloop.Vdf
|
||||
url = https://github.com/BeyondDimension/Gameloop.Vdf.git
|
||||
|
||||
+94
-86
@@ -1,4 +1,40 @@
|
||||
<Project>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('net6.0')) ">
|
||||
<!-- Microsoft.Extensions.* & AspNetCore & EntityFrameworkCore(NET60) -->
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Http" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.AzureAppServices" Version="6.0.2" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.2" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="6.0.2" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.2" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.2" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.2" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.2" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.2" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="6.0.2" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.2" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.2" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('net5.0')) ">
|
||||
<!-- Microsoft.Extensions.* & AspNetCore & EntityFrameworkCore(NET50) -->
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Http" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.AzureAppServices" Version="5.0.14" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.14" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="5.0.14" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.14" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.14" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.14" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.14" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.14" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="5.0.14" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="5.0.14" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.14" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) Or $(TargetFramework.StartsWith('netcoreapp3.1'))">
|
||||
<!-- Microsoft.Extensions.* & AspNetCore & EntityFrameworkCore(NETCOREAPP31) -->
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="3.1.22" />
|
||||
@@ -17,51 +53,15 @@
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="3.1.22" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.22" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('net5.0')) ">
|
||||
<!-- Microsoft.Extensions.* & AspNetCore & EntityFrameworkCore(NET50) -->
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Http" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.AzureAppServices" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="5.0.12" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.12" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('net6.0')) ">
|
||||
<!-- Microsoft.Extensions.* & AspNetCore & EntityFrameworkCore(NET60) -->
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Http" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Logging.AzureAppServices" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.Relational" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="6.0.1" />
|
||||
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('net6.0')) ">
|
||||
<!-- Entity Framework Plus -->
|
||||
<!-- A FREE & Open Source library to enhance EF6 and EF Core -->
|
||||
<PackageVersion Include="Z.EntityFramework.Plus.EFCore" Version="6.13.7" />
|
||||
<PackageVersion Include="Z.EntityFramework.Plus.EFCore" Version="6.13.12" />
|
||||
|
||||
<!-- AspNetCore 6 OpenId/OAuth -->
|
||||
<PackageVersion Include="AspNet.Security.OpenId.Steam" Version="6.0.0" />
|
||||
<PackageVersion Include="AspNet.Security.OAuth.QQ" Version="6.0.3" />
|
||||
<PackageVersion Include="AspNet.Security.OAuth.Apple" Version="6.0.3" />
|
||||
<PackageVersion Include="AspNet.Security.OAuth.QQ" Version="6.0.4" />
|
||||
<PackageVersion Include="AspNet.Security.OAuth.Apple" Version="6.0.4" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
</ItemGroup>
|
||||
@@ -79,7 +79,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition=" $(TargetFramework.StartsWith('netstandard')) ">
|
||||
<!-- BCL(NETSTANDARD) -->
|
||||
<PackageVersion Include="System.Text.Json" Version="6.0.1" />
|
||||
<PackageVersion Include="System.Text.Json" Version="6.0.2" />
|
||||
<PackageVersion Include="System.Text.Encodings.Web" Version="6.0.0" />
|
||||
<PackageVersion Include="System.Drawing.Common" Version="6.0.0" />
|
||||
<PackageVersion Include="System.Security.Principal.Windows" Version="5.0.0" />
|
||||
@@ -90,7 +90,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<!-- Microsoft.* -->
|
||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.0.0" />
|
||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.1.0" />
|
||||
<!--<PackageVersion Include="Microsoft.Windows.CsWinRT" Version="1.4.1" />-->
|
||||
<!--<PackageVersion Include="Microsoft.Windows.SDK.NET.Ref" Version="10.0.19041.22" />-->
|
||||
<!--<PackageVersion Include="Microsoft.Windows.SDK.Contracts" Version="10.0.19041.1" />-->
|
||||
@@ -113,8 +113,8 @@
|
||||
<!-- Xamarin -->
|
||||
<PackageVersion Include="Xamarin.Essentials" Version="1.7.1" />
|
||||
<!-- Xamarin.Forms -->
|
||||
<PackageVersion Include="Xamarin.Forms" Version="5.0.0.2244" />
|
||||
<PackageVersion Include="Xamarin.Forms.Visual.Material" Version="5.0.0.2244" />
|
||||
<PackageVersion Include="Xamarin.Forms" Version="5.0.0.2337" />
|
||||
<PackageVersion Include="Xamarin.Forms.Visual.Material" Version="5.0.0.2337" />
|
||||
<PackageVersion Include="Xam.Plugins.Forms.ImageCircle" Version="3.1.1.1-beta" />
|
||||
|
||||
<!-- NUnit & NUnit.Xamarin & Moq -->
|
||||
@@ -122,27 +122,27 @@
|
||||
<PackageVersion Include="NUnit3TestAdapter" Version="4.2.1" />
|
||||
<PackageVersion Include="nunit.xamarin" Version="3.6.1" />
|
||||
<PackageVersion Include="PCLStorage" Version="1.0.2" />
|
||||
<PackageVersion Include="Moq" Version="4.16.1" />
|
||||
<PackageVersion Include="Moq" Version="4.17.1" />
|
||||
|
||||
<!-- NLog -->
|
||||
<PackageVersion Include="NLog" Version="4.7.13" />
|
||||
<PackageVersion Include="NLog" Version="4.7.14" />
|
||||
<PackageVersion Include="NLog.Extensions.Logging" Version="1.7.4" />
|
||||
<PackageVersion Include="NLog.Web.AspNetCore" Version="4.14.0" />
|
||||
|
||||
<!-- ReactiveUI -->
|
||||
<PackageVersion Include="System.Reactive" Version="5.0.0" />
|
||||
<PackageVersion Include="Splat" Version="14.1.17" />
|
||||
<PackageVersion Include="DynamicData" Version="7.4.11" />
|
||||
<PackageVersion Include="ReactiveUI" Version="17.1.17" />
|
||||
<!--<PackageVersion Include="ReactiveUI.Fody" Version="17.1.17" /> -->
|
||||
<PackageVersion Include="ReactiveUI.XamForms" Version="17.1.17" />
|
||||
<PackageVersion Include="ReactiveUI.AndroidX" Version="17.1.17" />
|
||||
<PackageVersion Include="Splat" Version="14.1.45" />
|
||||
<PackageVersion Include="DynamicData" Version="7.5.4" />
|
||||
<PackageVersion Include="ReactiveUI" Version="17.1.50" />
|
||||
<!--<PackageVersion Include="ReactiveUI.Fody" Version="17.1.50" /> -->
|
||||
<PackageVersion Include="ReactiveUI.XamForms" Version="17.1.50" />
|
||||
<PackageVersion Include="ReactiveUI.AndroidX" Version="17.1.50" />
|
||||
|
||||
<!-- SkiaSharp & HarfBuzzSharp -->
|
||||
<PackageVersion Include="HarfBuzzSharp" Version="2.8.2-preview.179" />
|
||||
<PackageVersion Include="HarfBuzzSharp.NativeAssets.Linux" Version="2.8.2-preview.179" />
|
||||
<PackageVersion Include="SkiaSharp" Version="2.88.0-preview.179" />
|
||||
<PackageVersion Include="SkiaSharp.NativeAssets.Linux" Version="2.88.0-preview.179" />
|
||||
<PackageVersion Include="HarfBuzzSharp" Version="2.8.2-preview.187" />
|
||||
<PackageVersion Include="HarfBuzzSharp.NativeAssets.Linux" Version="2.8.2-preview.187" />
|
||||
<PackageVersion Include="SkiaSharp" Version="2.88.0-preview.187" />
|
||||
<PackageVersion Include="SkiaSharp.NativeAssets.Linux" Version="2.88.0-preview.187" />
|
||||
|
||||
<!-- AutoMapper -->
|
||||
<PackageVersion Include="AutoMapper" Version="10.1.1" />
|
||||
@@ -178,7 +178,7 @@
|
||||
<PackageVersion Include="TinyPinyin.Net" Version="1.0.2" />
|
||||
|
||||
<!-- Win32/Windows -->
|
||||
<PackageVersion Include="TaskScheduler" Version="2.10.0" />
|
||||
<PackageVersion Include="TaskScheduler" Version="2.10.1" />
|
||||
|
||||
<!-- Swagger -->
|
||||
<PackageVersion Include="Swashbuckle.AspNetCore" Version="6.2.3" />
|
||||
@@ -201,7 +201,7 @@
|
||||
|
||||
<!-- .NET Compat -->
|
||||
<PackageVersion Include="OperatingSystem2" Version="1.4.3" />
|
||||
<PackageVersion Include="JustArchiNET.Madness" Version="3.2.1" />
|
||||
<PackageVersion Include="JustArchiNET.Madness" Version="3.3.0" />
|
||||
|
||||
<!-- Serialize -->
|
||||
<PackageVersion Include="MessagePack" Version="2.3.85" />
|
||||
@@ -218,7 +218,9 @@
|
||||
<!--<PackageVersion Include="Nito.Disposables" Version="2.2.1" />-->
|
||||
|
||||
<!-- Valve Data File -->
|
||||
<PackageVersion Include="Gameloop.Vdf" Version="0.6.1" />
|
||||
<!--<PackageVersion Include="Gameloop.Vdf" Version="0.6.1" />-->
|
||||
<PackageVersion Include="Microsoft.CSharp" Version="4.7.0" />
|
||||
<PackageVersion Include="System.ComponentModel.TypeConverter" Version="4.3.0" />
|
||||
|
||||
<!-- WebSocket -->
|
||||
<PackageVersion Include="Fleck" Version="1.2.0" />
|
||||
@@ -233,18 +235,18 @@
|
||||
<PackageVersion Include="Polly" Version="7.2.3" />
|
||||
|
||||
<!--Avalonia Start-->
|
||||
<PackageVersion Include="Avalonia" Version="0.10.12" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="0.10.12" />
|
||||
<PackageVersion Include="Avalonia.Skia" Version="0.10.12" />
|
||||
<PackageVersion Include="Avalonia.Diagnostics" Version="0.10.12" />
|
||||
<PackageVersion Include="Avalonia.ReactiveUI" Version="0.10.12" />
|
||||
<!--<PackageVersion Include="Avalonia.Direct2D1" Version="0.10.12" />-->
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="0.10.12" />
|
||||
<PackageVersion Include="Avalonia.Xaml.Behaviors" Version="0.10.12" />
|
||||
<!--<PackageVersion Include="Avalonia.AvaloniaEdit" Version="0.10.4" />-->
|
||||
<PackageVersion Include="Avalonia" Version="0.10.13" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="0.10.13" />
|
||||
<PackageVersion Include="Avalonia.Skia" Version="0.10.13" />
|
||||
<PackageVersion Include="Avalonia.Diagnostics" Version="0.10.13" />
|
||||
<PackageVersion Include="Avalonia.ReactiveUI" Version="0.10.13" />
|
||||
<!--<PackageVersion Include="Avalonia.Direct2D1" Version="0.10.13" />-->
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="0.10.13" />
|
||||
<PackageVersion Include="Avalonia.Xaml.Behaviors" Version="0.10.12.2" />
|
||||
<!--<PackageVersion Include="Avalonia.AvaloniaEdit" Version="0.10.12.2" />-->
|
||||
<!--<PackageVersion Include="CefNet.Avalonia" Version="93.1.21240.857" />-->
|
||||
<!--<PackageVersion Include="LibVLCSharp.Avalonia" Version="3.5.1" />-->
|
||||
<!--<PackageVersion Include="FluentAvaloniaUI" Version="1.1.8" />-->
|
||||
<!--<PackageVersion Include="FluentAvaloniaUI" Version="1.3.0" />-->
|
||||
<PackageVersion Include="JumpLists.Win32.Avalonia" Version="1.0.0" />
|
||||
<!--Avalonia End-->
|
||||
|
||||
@@ -252,31 +254,37 @@
|
||||
<PackageVersion Include="Xamarin.Google.Dagger" Version="2.39.1" />
|
||||
<PackageVersion Include="Xamarin.Google.MLKit.BarcodeScanning" Version="116.1.2.3" />
|
||||
<PackageVersion Include="Plugin.CurrentActivity" Version="2.1.0.4" />
|
||||
<PackageVersion Include="de.hdodenhof.circleimageview" Version="3.1.0" />
|
||||
<PackageVersion Include="de.hdodenhof.circleimageview" Version="3.1.0.1" />
|
||||
<PackageVersion Include="Square.OkHttp3" Version="4.9.2" />
|
||||
<PackageVersion Include="Square.Picasso" Version="2.71828.0" />
|
||||
<!--<PackageVersion Include="LeakCanaryBinding" Version="1.5.1.1" />-->
|
||||
<!--<PackageVersion Include="TencentOpenApiSDK.Android" Version="3.5.4.11" />-->
|
||||
|
||||
<PackageVersion Include="XAB.FlexboxLayout" Version="3.0.0" />
|
||||
|
||||
<!-- V2Ray -->
|
||||
<PackageVersion Include="XAB.AndroidLibV2rayLite" Version="1.0.0.1" />
|
||||
<PackageVersion Include="Karamunting.KotlinX.Coroutines.Core" Version="1.4.2" />
|
||||
<PackageVersion Include="Naxam.RxJava.Droid" Version="1.3.8-pre1" />
|
||||
|
||||
<!-- Xamarin.AndroidX -->
|
||||
<PackageVersion Include="Xamarin.AndroidX.Migration" Version="1.0.8" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.AppCompat" Version="1.3.1.4" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Emoji.AppCompat" Version="1.1.0.5" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Fragment" Version="1.3.6.4" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Navigation.Fragment" Version="2.3.5.3" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.RecyclerView" Version="1.2.1.4" />
|
||||
<PackageVersion Include="Xamarin.Google.Android.Material" Version="1.4.0.5" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.SwipeRefreshLayout" Version="1.1.0.6" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.ConstraintLayout" Version="2.1.2.1" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Navigation.UI" Version="2.3.5.3" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.ViewPager2" Version="1.0.0.13" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.AppCompat" Version="1.3.1.5" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Emoji.AppCompat" Version="1.1.0.7" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Fragment" Version="1.3.6.5" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Navigation.Fragment" Version="2.3.5.5" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.RecyclerView" Version="1.2.1.5" />
|
||||
<PackageVersion Include="Xamarin.Google.Android.Material" Version="1.4.0.6" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.SwipeRefreshLayout" Version="1.1.0.7" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.ConstraintLayout" Version="2.1.2.2" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Navigation.UI" Version="2.3.5.5" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.ViewPager2" Version="1.0.0.14" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Activity" Version="1.4.0.1" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Biometric" Version="1.1.0.6" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.ExifInterface" Version="1.3.3.3" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Legacy.Support.Core.UI" Version="1.0.0.12" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.4.0.1" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Camera.Camera2" Version="1.0.2.2" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Camera.Lifecycle" Version="1.0.2.2" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Biometric" Version="1.1.0.8" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.ExifInterface" Version="1.3.3.4" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Legacy.Support.Core.UI" Version="1.0.0.13" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.4.0.2" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Camera.Camera2" Version="1.0.2.3" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Camera.Lifecycle" Version="1.0.2.3" />
|
||||
<PackageVersion Include="Xamarin.AndroidX.Camera.View" Version="1.0.0.5-alpha20" />
|
||||
<!--<PackageVersion Include="Xamarin.AndroidX.Window" Version="1.0.0.3-beta02" />-->
|
||||
|
||||
|
||||
+66
-1
@@ -166,7 +166,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ST.Client.UnitTest.Resource
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Diagnostics", "src\Avalonia.Diagnostics\Avalonia.Diagnostics.csproj", "{E84FF7BC-FC2A-424E-8780-7DA9B487E23F}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Avalonia.Skia.Internals", "src\Avalonia.Skia.Internals\Avalonia.Skia.Internals.csproj", "{47C151DA-D2B1-43F4-A04E-B454E2134852}"
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Avalonia.Skia.Internals", "src\Avalonia.Skia.Internals\Avalonia.Skia.Internals.csproj", "{47C151DA-D2B1-43F4-A04E-B454E2134852}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Bindings", "Bindings", "{80EBD601-28AC-4840-B9B8-E6064816A443}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ST.Client.Android.V2Ray", "src\ST.Client.Android.V2Ray\ST.Client.Android.V2Ray.csproj", "{4A79264D-5BF5-4F89-8066-44E154BF557F}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Gameloop.Vdf", "references\Gameloop.Vdf\Gameloop.Vdf\Gameloop.Vdf.csproj", "{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
@@ -1824,6 +1830,62 @@ Global
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|x64.Build.0 = Release|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852}.Release|x86.Build.0 = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|x64.Build.0 = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F}.Release|x86.Build.0 = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|ARM.ActiveCfg = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|ARM.Build.0 = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|ARM64.ActiveCfg = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|ARM64.Build.0 = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|iPhone.ActiveCfg = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|iPhone.Build.0 = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|ARM.ActiveCfg = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|ARM.Build.0 = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|ARM64.ActiveCfg = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|ARM64.Build.0 = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|iPhone.ActiveCfg = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|iPhone.Build.0 = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|x64.Build.0 = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
@@ -1888,6 +1950,9 @@ Global
|
||||
{FB2CA9B4-71F1-48E8-B9AE-FF4375F4FE43} = {CC46B486-00D7-49E6-ABA3-FDF8F4868D2B}
|
||||
{E84FF7BC-FC2A-424E-8780-7DA9B487E23F} = {910D6A0F-42AB-4B65-B532-852E864EC006}
|
||||
{47C151DA-D2B1-43F4-A04E-B454E2134852} = {910D6A0F-42AB-4B65-B532-852E864EC006}
|
||||
{80EBD601-28AC-4840-B9B8-E6064816A443} = {327FDEE7-C4C8-4AA4-A7B0-8BCE3D75346F}
|
||||
{4A79264D-5BF5-4F89-8066-44E154BF557F} = {80EBD601-28AC-4840-B9B8-E6064816A443}
|
||||
{DFC341E8-5290-428C-8D2B-6DE2AA163FFE} = {673FF8CD-9E85-4FA1-ABFC-D1149675E138}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
RESX_NeutralResourcesLanguage = zh-Hans
|
||||
|
||||
+1
-1
@@ -3,6 +3,6 @@
|
||||
"MSBuild.Sdk.Extras": "3.0.44"
|
||||
},
|
||||
"sdk": {
|
||||
"version": "6.0.101"
|
||||
"version": "6.0.200"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,9 +33,9 @@ emit_plist() {
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>net.steampp.app</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>2.6.6</string>
|
||||
<string>2.6.9</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.6.6.0</string>
|
||||
<string>2.6.9.0</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
<string>10.14</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Submodule references/ArchiSteamFarm updated: 461ed40964...f1c1e226cf
Submodule references/FluentAvalonia updated: af86596b10...ba8644890f
Submodule
+1
Submodule references/Gameloop.Vdf added at 6bf1500c95
Submodule references/Titanium-Web-Proxy updated: 29256a4b4f...97fbf1e1ac
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
+34
-30
@@ -1,22 +1,27 @@
|
||||
### 版本亮点
|
||||
1. ASF 升级至 **V5.2.2.4**
|
||||
2. Android 12 适配
|
||||
3. Android 上的 ASP.NET Core 升级至 2.2.5
|
||||
4. Desktop 上的 Avalonia 升级至 0.10.12
|
||||
1. ASF 升级至 **V5.2.3.5**
|
||||
2. ASF 配置 中新增 设置自定义密钥(ASF_CRYPTKEY) 与 导入 Bot 文件
|
||||
3. Linux 发行压缩包由 7z 格式更改为 tar.zst
|
||||
4. 网络加速 支持 IPv6 网络访问 Steam 讨论/留言相关功能
|
||||
6. 网络加速 支持 Steam 商店 访问被限制的游戏页面
|
||||
7. 网络加速 新增了部分被限制的 CDN 加速,支持访问 stackoverflow
|
||||
8. 账号切换 家庭库共享管理新增暂时禁用启用指定账号的功能 可在排序失效时使用
|
||||
|
||||
### 修复问题
|
||||
1. 修复 Steam Beta 版账号切换失效
|
||||
2. 修复 ASF 在线配置文件生成器链接错误
|
||||
3. 修复 Linux 上运行时闪退
|
||||
4. 修复 Windows 7 上点击任务栏图标没有最小化
|
||||
5. 改进 打开 Web 链接失败时候的错误提示
|
||||
6. 改进 JumpList 在 Windows 10.0.10586 上使用 UWP API
|
||||
7. 改进 Windows 安装包默认路径使用 $PROGRAMFILES64
|
||||
8. 改进 Windows 安装版 AppData 与 Cache 文件夹不再使用根目录
|
||||
9. 改进 Android Apk 包使用单一包,不再根据 ABI 拆分
|
||||
10. 改进 Android 本地加速与 ASF 使用前台服务运行
|
||||
11. 改进 本地加速 增加 重置 Hosts 文件 与 打开 Hosts 所在文件夹
|
||||
12. 改进 Hosts 文件存在多个 Mark 导致失败的错误提示
|
||||
1. 修复 Android 端 程序启动时自动运行 网络加速 与 ASF 服务
|
||||
2. 修复 Android 端 网络加速 VPN 模式
|
||||
3. 修复 Android 端 切换系统语言时可能导致的闪退
|
||||
4. 修复 Android 端 拒绝授予存储权限导致的闪退
|
||||
5. 改进 网络加速 中的代理证书生成
|
||||
6. 改进 账号切换 中读取 Vdf 配置操作
|
||||
7. 修复 Desktop 端 家庭共享库管理 在 Steam Beta 版上不能正常使用
|
||||
8. 修复 网络加速 Twitch 聊天服务链接不上的问题
|
||||
9. 修复 网络加速 github.io 加速影响部分仓库访问 404 的问题
|
||||
10. 修复 网络加速 Steam 社区加速后会出现【请重新输入下方验证码中的字符来验证此为人工操作】的问题
|
||||
11. 暂时移除了网络加速中部分失效的加速项目
|
||||
12. 修复 令牌交易 登录状态失效时刷新应该回到登录界面
|
||||
13. 改进 本地令牌 移除令牌时的提示
|
||||
14. 修复 网络加速 滚动条错误滚动的问题
|
||||
|
||||
### 已知问题
|
||||
- 除 Windows 之外的平台此软件自动更新尚不可用
|
||||
@@ -25,7 +30,6 @@
|
||||
- [尚未公证](https://support.apple.com/zh-cn/guide/mac-help/mh40616/10.15/mac/10.15),这会影响 macOS Catalina(版本 10.15)以上版本
|
||||
- Linux
|
||||
- **Hosts 代理模式**可能无法配置成功,推荐使用**系统代理模式**
|
||||
- 系统代理模式下 Discord 更新下载加速不可用
|
||||
- 窗口弹出位置不正确
|
||||
- 鼠标指针浮动样式不正确
|
||||
- Windows
|
||||
@@ -50,7 +54,7 @@
|
||||
- .nupkg 文件可使用解压工具打开或解压,找到此文件复制即可
|
||||
|
||||
[](https://steampp.net)
|
||||
[]()
|
||||
[]()
|
||||
|
||||
|
||||
##### [不知道该下载哪个文件?](./download-guide.md)
|
||||
@@ -59,21 +63,21 @@
|
||||
### 文件校验
|
||||
| File | Checksum (SHA256) |
|
||||
| ---- | ---- |
|
||||
| Steam++_win_x64_v2.6.6.7z | SHA256 |
|
||||
| Steam++_win_x64_fde_v2.6.6.7z | SHA256 |
|
||||
| Steam++_win_x64_v2.6.9.7z | SHA256 |
|
||||
| Steam++_win_x64_fde_v2.6.9.7z | SHA256 |
|
||||
| | |
|
||||
| Steam++_win_x64_v2.6.6.exe | SHA256 |
|
||||
| Steam++_win_x64_fde_v2.6.6.exe | SHA256 |
|
||||
| Steam++_win_x64_v2.6.9.exe | SHA256 |
|
||||
| Steam++_win_x64_fde_v2.6.9.exe | SHA256 |
|
||||
| | |
|
||||
| Steam++_linux_x64_v2.6.6.7z | SHA256 |
|
||||
| Steam++_linux_arm64_v2.6.6.7z | SHA256 |
|
||||
| Steam++_linux_x64_v2.6.9.7z | SHA256 |
|
||||
| Steam++_linux_arm64_v2.6.9.7z | SHA256 |
|
||||
| | |
|
||||
| Steam++_linux_x64_v2.6.6.deb | SHA256 |
|
||||
| Steam++_linux_arm64_v2.6.6.deb | SHA256 |
|
||||
| Steam++_linux_x64_v2.6.9.deb | SHA256 |
|
||||
| Steam++_linux_arm64_v2.6.9.deb | SHA256 |
|
||||
| | |
|
||||
| Steam++_linux_x64_v2.6.6.rpm | SHA256 |
|
||||
| Steam++_linux_arm64_v2.6.6.rpm | SHA256 |
|
||||
| Steam++_linux_x64_v2.6.9.rpm | SHA256 |
|
||||
| Steam++_linux_arm64_v2.6.9.rpm | SHA256 |
|
||||
| | |
|
||||
| Steam++_macos_x64_v2.6.6.dmg | SHA256 |
|
||||
| Steam++_macos_x64_v2.6.9.dmg | SHA256 |
|
||||
| | |
|
||||
| Steam++_android_v2.6.6.apk | SHA256 |
|
||||
| Steam++_android_v2.6.9.apk | SHA256 |
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#if __ANDROID__
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.OS;
|
||||
using Android.Webkit;
|
||||
@@ -147,7 +148,23 @@ namespace System.Application.UI
|
||||
b.AppendLine();
|
||||
|
||||
b.Append("[app.install] ");
|
||||
b.Append(platformService.IsInstall);
|
||||
b.Append(platformService.IsInstall.ToLowerString());
|
||||
b.AppendLine();
|
||||
|
||||
|
||||
b.Append("[memory.usage] ");
|
||||
#if __ANDROID__
|
||||
var activityManager = activity.GetActivityManager();
|
||||
ActivityManager.MemoryInfo memoryInfo = new();
|
||||
activityManager.GetMemoryInfo(memoryInfo);
|
||||
var nativeHeapSize = memoryInfo.TotalMem;
|
||||
var nativeHeapFreeSize = memoryInfo.AvailMem;
|
||||
var usedMemInBytes = nativeHeapSize - nativeHeapFreeSize;
|
||||
var usedMemInPercentage = usedMemInBytes * 100M / nativeHeapSize;
|
||||
b.Append($"{IOPath.GetSizeString(usedMemInBytes)} ({usedMemInPercentage:0.00}%)");
|
||||
#else
|
||||
b.Append(IOPath.GetSizeString(Environment.WorkingSet));
|
||||
#endif
|
||||
b.AppendLine();
|
||||
|
||||
b.Append("[deploy.mode] ");
|
||||
|
||||
@@ -118,11 +118,11 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="ExitCode_IsEmulator" xml:space="preserve">
|
||||
<value>This app does not support running in the emulator</value>
|
||||
<value>This app doesn't support running in the emulator</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsRoot" xml:space="preserve">
|
||||
<value>This app does not support running on devices with ROOT permissions</value>
|
||||
<value>This app is not supported to run on devices with ROOT privileges</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsVirtualApk" xml:space="preserve">
|
||||
@@ -130,7 +130,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsXposedExists" xml:space="preserve">
|
||||
<value>This app does not support running on devices with Xposed frameworks</value>
|
||||
<value>This app does not support running on devices with the Xposed framework installed</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsRoot" xml:space="preserve">
|
||||
<value>Esta aplicación no admite la ejecución en dispositivos con permisos ROOT</value>
|
||||
<value>Esta aplicación no es compatible para ejecutarse en dispositivos con privilegios ROOT</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsVirtualApk" xml:space="preserve">
|
||||
@@ -130,7 +130,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsXposedExists" xml:space="preserve">
|
||||
<value>Esta aplicación no admite la ejecución en dispositivos con marcos Xposed</value>
|
||||
<value>Esta aplicación no admite la ejecución en dispositivos con el marco Xposed instalado</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsRoot" xml:space="preserve">
|
||||
<value>Questa app non supporta l'esecuzione su dispositivi con autorizzazioni ROOT</value>
|
||||
<value>Questa app non è supportata per l'esecuzione su dispositivi con privilegi ROOT</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsVirtualApk" xml:space="preserve">
|
||||
@@ -130,7 +130,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsXposedExists" xml:space="preserve">
|
||||
<value>Questa app non supporta l'esecuzione su dispositivi con framework Xposed</value>
|
||||
<value>Questa app non supporta l'esecuzione su dispositivi con il framework Xposed installato</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -122,15 +122,15 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsRoot" xml:space="preserve">
|
||||
<value>Это приложение не поддерживает запуск на устройствах с разрешениями ROOT</value>
|
||||
<value>Это приложение не поддерживается для запуска на устройствах с привилегиями ROOT</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsVirtualApk" xml:space="preserve">
|
||||
<value>Это приложение не поддерживает многооткрытие</value>
|
||||
<value>Это приложение не поддерживает мультиоткрытие</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="ExitCode_IsXposedExists" xml:space="preserve">
|
||||
<value>Это приложение не поддерживает работу на устройствах, оснащенных платформой Xposed</value>
|
||||
<value>Это приложение не поддерживает запуск на устройствах с установленной платформой Xposed</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="MSBuild.Sdk.Extras">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>MonoAndroid11.0</TargetFramework>
|
||||
<TargetFramework>MonoAndroid12.0</TargetFramework>
|
||||
<RootNamespace>System</RootNamespace>
|
||||
<AssemblyName>System.Common.ClientLib.Droid</AssemblyName>
|
||||
<AndroidUseIntermediateDesignerFile>false</AndroidUseIntermediateDesignerFile>
|
||||
|
||||
@@ -51,8 +51,14 @@ namespace System.Application
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
}
|
||||
catch (PermissionException e)
|
||||
{
|
||||
Toast.Show(e.Message); // Xamarin.Essentials.PermissionException
|
||||
return null;
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// The user canceled or something went wrong
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -96,7 +102,7 @@ namespace System.Application
|
||||
{
|
||||
Toast.Show(e.Message); // Xamarin.Essentials.PermissionException
|
||||
}
|
||||
catch
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// The user canceled or something went wrong
|
||||
}
|
||||
@@ -139,7 +145,7 @@ namespace System.Application
|
||||
{
|
||||
Toast.Show(e.Message); // Xamarin.Essentials.PermissionException
|
||||
}
|
||||
catch
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// The user canceled or something went wrong
|
||||
}
|
||||
@@ -169,8 +175,14 @@ namespace System.Application
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
}
|
||||
catch (PermissionException e)
|
||||
{
|
||||
Toast.Show(e.Message); // Xamarin.Essentials.PermissionException
|
||||
return null;
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// The user canceled or something went wrong
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -212,7 +224,7 @@ namespace System.Application
|
||||
{
|
||||
Toast.Show(e.Message); // Xamarin.Essentials.PermissionException
|
||||
}
|
||||
catch
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// The user canceled or something went wrong
|
||||
}
|
||||
@@ -255,7 +267,7 @@ namespace System.Application
|
||||
{
|
||||
Toast.Show(e.Message); // Xamarin.Essentials.PermissionException
|
||||
}
|
||||
catch
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// The user canceled or something went wrong
|
||||
}
|
||||
@@ -278,8 +290,14 @@ namespace System.Application
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
catch (PermissionException e)
|
||||
{
|
||||
Toast.Show(e.Message); // Xamarin.Essentials.PermissionException
|
||||
return null;
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
// The user canceled or something went wrong
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,5 +31,7 @@ namespace System
|
||||
public const string RFC1123 = "r";
|
||||
|
||||
public const string File = "yyyy-MM-dd HHmmssfffffff";
|
||||
|
||||
public const string YearMonth = "yyyy/MM";
|
||||
}
|
||||
}
|
||||
@@ -25,7 +25,7 @@ namespace System
|
||||
/// <param name="dt"></param>
|
||||
/// <returns></returns>
|
||||
public static DateTimeOffset GetCurrentMonth(this DateTimeOffset dt)
|
||||
=> new(dt.Year, dt.Month, 1, 0, 0, 0, TimeSpan.Zero);
|
||||
=> new(dt.Year, dt.Month, 1, 0, 0, 0, dt.Offset);
|
||||
|
||||
/// <summary>
|
||||
/// 根据时间日期获取当前月(最后一天)
|
||||
@@ -33,6 +33,6 @@ namespace System
|
||||
/// <param name="dt"></param>
|
||||
/// <returns></returns>
|
||||
public static DateTimeOffset GetCurrentMonthLastDay(this DateTimeOffset dt)
|
||||
=> new DateTimeOffset(dt.Year, dt.Month, 1, 0, 0, 0, TimeSpan.Zero).AddMonths(1).AddDays(-1);
|
||||
=> new DateTimeOffset(dt.Year, dt.Month, 1, 0, 0, 0, dt.Offset).AddMonths(1).AddDays(-1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -226,10 +226,18 @@ namespace System
|
||||
/// </summary>
|
||||
/// <param name="pattern">The wildcard pattern to convert.</param>
|
||||
/// <returns>A regex equivalent of the given wildcard.</returns>
|
||||
public static bool IsWildcard(this string str, string pattern)
|
||||
public static bool IsWildcard(this string str, string pattern, RegexOptions options = RegexOptions.Compiled)
|
||||
=> Regex.IsMatch(str, "^" + Regex.Escape(pattern)
|
||||
.Replace("\\*", ".*")
|
||||
.Replace("\\?", ".") + "$", RegexOptions.Compiled);
|
||||
.Replace("\\?", ".") + "$", options);
|
||||
|
||||
/// <summary>
|
||||
/// 域名表达式
|
||||
/// *表示任意0到多个字符
|
||||
/// </summary>
|
||||
public static bool IsDomainPattern(this string str, string pattern, RegexOptions options = RegexOptions.IgnoreCase)
|
||||
=> Regex.IsMatch(str, Regex.Escape(pattern)
|
||||
.Replace(@"\*", @"[^\.]*"), options);
|
||||
|
||||
#region Compressor
|
||||
|
||||
|
||||
@@ -173,12 +173,12 @@ namespace System
|
||||
string sourceAppDataPath, string sourceCachePath)
|
||||
{
|
||||
var paths = new[] { destAppDataPath, destCachePath, };
|
||||
var dict_paths = paths.ToDictionary(x => x, Directory.Exists);
|
||||
var dict_paths = paths.ToDictionary(x => x, x => Directory.Exists(x) && Directory.EnumerateFileSystemEntries(x).Any());
|
||||
|
||||
if (dict_paths.Values.All(x => !x))
|
||||
{
|
||||
var old_paths = new[] { sourceAppDataPath, sourceCachePath, };
|
||||
if (old_paths.All(Directory.Exists)) // 迁移之前根目录上的文件夹
|
||||
if (old_paths.All(x => Directory.Exists(x) && Directory.EnumerateFileSystemEntries(x).Any())) // 迁移之前根目录上的文件夹
|
||||
{
|
||||
for (int i = 0; i < old_paths.Length; i++)
|
||||
{
|
||||
@@ -191,7 +191,8 @@ namespace System
|
||||
}
|
||||
catch
|
||||
{
|
||||
// 跨卷移动失败或其他原因失败,使用旧的目录
|
||||
// 跨卷移动失败或其他原因失败,使用旧的目录,并尝试删除创建的空文件夹
|
||||
DirTryDelete(path);
|
||||
paths[i] = old_path;
|
||||
}
|
||||
}
|
||||
@@ -393,16 +394,16 @@ namespace System
|
||||
/// </summary>
|
||||
/// <param name="filePath"></param>
|
||||
/// <returns>单位 字节</returns>
|
||||
public static double GetFileSize(FileInfo fileInfo) => fileInfo.Exists ? fileInfo.Length : 0D;
|
||||
public static decimal GetFileSize(FileInfo fileInfo) => fileInfo.Exists ? fileInfo.Length : 0M;
|
||||
|
||||
/// <summary>
|
||||
/// 获取指定路径的大小
|
||||
/// </summary>
|
||||
/// <param name="dirPath">路径</param>
|
||||
/// <returns>单位 字节</returns>
|
||||
public static double GetDirectorySize(string dirPath)
|
||||
public static decimal GetDirectorySize(string dirPath)
|
||||
{
|
||||
double len = 0D;
|
||||
var len = 0M;
|
||||
// 判断该路径是否存在(是否为文件夹)
|
||||
var isDirectory = IsDirectory(dirPath, out var fileInfo, out var directoryInfo);
|
||||
if (isDirectory.HasValue)
|
||||
@@ -423,12 +424,12 @@ namespace System
|
||||
return len;
|
||||
}
|
||||
|
||||
const double unit = 1024d;
|
||||
static readonly string[] units = new[] { "B", "KB", "MB", "GB", "TB" };
|
||||
const decimal unit = 1024M;
|
||||
static readonly string[] units = new[] { "B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB", "BB" };
|
||||
|
||||
public static (double length, string unit) GetSize(double length)
|
||||
public static (decimal length, string unit) GetSize(decimal length)
|
||||
{
|
||||
if (length > 0d)
|
||||
if (length > 0M)
|
||||
{
|
||||
for (int i = 0; i < units.Length; i++)
|
||||
{
|
||||
@@ -439,11 +440,11 @@ namespace System
|
||||
}
|
||||
else
|
||||
{
|
||||
return (0, units.First());
|
||||
return (0M, units.First());
|
||||
}
|
||||
}
|
||||
|
||||
public static string GetSizeString(double length)
|
||||
public static string GetSizeString(decimal length)
|
||||
{
|
||||
(length, string unit) = GetSize(length);
|
||||
return $"{length:0.00} {unit}";
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="OpenCoreByProcess_Win32Exception_" xml:space="preserve">
|
||||
<value>Open web link fails 0x{0}, please set the system default browser before trying</value>
|
||||
<value>Open web link failed 0x{0}, please set the system default browser before trying</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="OpenCoreByProcess_Win32Exception_" xml:space="preserve">
|
||||
<value>Abrir enlace web falla 0x{0}, configure el navegador predeterminado del sistema antes de intentarlo</value>
|
||||
<value>Abrir enlace web falló 0x{0}, configure el navegador predeterminado del sistema antes de intentarlo</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="OpenCoreByProcess_Win32Exception_" xml:space="preserve">
|
||||
<value>Il collegamento Web aperto non riesce 0x{0}, impostare il browser predefinito del sistema prima di provare</value>
|
||||
<value>Apri collegamento Web non riuscito 0x{0}, imposta il browser predefinito del sistema prima di provare</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -174,39 +174,39 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="DayOfWeek_S6" xml:space="preserve">
|
||||
<value>В субботу</value>
|
||||
<value>Суббота</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="Female" xml:space="preserve">
|
||||
<value>Женщина</value>
|
||||
<value>женщина</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="He" xml:space="preserve">
|
||||
<value>Его</value>
|
||||
<value>он</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="Male" xml:space="preserve">
|
||||
<value>Мужчины</value>
|
||||
<value>мужчина</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="NotSupported_FixedSizeCollection" xml:space="preserve">
|
||||
<value>Collection was of a fixed size.</value>
|
||||
<value>Коллекция была фиксированного размера.</value>
|
||||
<comment>Comment=https://github.com/dotnet/runtime/blob/v5.0.0-rc.1.20451.14/src/libraries/System.Private.CoreLib/src/Resources/Strings.resx#L2893;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="She" xml:space="preserve">
|
||||
<value>ее</value>
|
||||
<value>она</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="Unknown" xml:space="preserve">
|
||||
<value>Неизвестно</value>
|
||||
<value>Неизвестный</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="UnsupportedPhoneNumberSegment_" xml:space="preserve">
|
||||
<value>Неподдерживаемый сегмент номера мобильного телефона ({0})</value>
|
||||
<value>Сегмент неподдерживаемых номеров мобильных телефонов ({0})</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="OpenCoreByProcess_Win32Exception_" xml:space="preserve">
|
||||
<value>Открытие веб-ссылки завершается неудачей {0} 0x, установите системный браузер по умолчанию и повторите попытку</value>
|
||||
<value>Открыть веб-ссылку не удалось 0x{0}, пожалуйста, установите системный браузер по умолчанию перед попыткой</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -206,7 +206,7 @@
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
<data name="OpenCoreByProcess_Win32Exception_" xml:space="preserve">
|
||||
<value>打開 Web 連結失敗 0x{0},請設置系統預設瀏覽器後再嘗試</value>
|
||||
<value>打開 Web 連結失敗 0x{0},請設定系統預設瀏覽器後再嘗試</value>
|
||||
<comment>Comment=;Author=MicrosoftTranslator</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace System.Properties
|
||||
/// <item> macOS:\packaging\build-osx-app.sh <CFBundleVersion> <CFBundleShortVersionString> </item>
|
||||
/// </list>
|
||||
/// </summary>
|
||||
public const string Version = "2.6.6";
|
||||
public const string Version = "2.6.9";
|
||||
|
||||
//public const string InfoVersion = Version + "-beta";
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="MSBuild.Sdk.Extras">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>MonoAndroid11.0;netstandard2.1</TargetFrameworks>
|
||||
<TargetFrameworks>MonoAndroid12.0;netstandard2.1</TargetFrameworks>
|
||||
<RootNamespace>System</RootNamespace>
|
||||
<AssemblyName>System.Common.PinyinLib.TinyPinyin</AssemblyName>
|
||||
</PropertyGroup>
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,45 @@
|
||||
<Project Sdk="MSBuild.Sdk.Extras">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>MonoAndroid12.0</TargetFramework>
|
||||
<IsBindingProject>true</IsBindingProject>
|
||||
<!--<GeneratePackageOnBuild>true</GeneratePackageOnBuild>-->
|
||||
<PackageLicenseExpression>GPL-3.0-only</PackageLicenseExpression>
|
||||
<Version>1.0.0</Version>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageProjectUrl>https://github.com/AigioL/xamarin-bindings</PackageProjectUrl>
|
||||
<RepositoryUrl>https://github.com/AigioL/xamarin-bindings.git</RepositoryUrl>
|
||||
<PackageTags>v2rayNG V2Ray Xamarin Plugin Binding Xamarin.Android</PackageTags>
|
||||
<Product>v2rayNG</Product>
|
||||
<Company />
|
||||
<PackageId>XAB.v2rayNG</PackageId>
|
||||
<Title>Xamarin Android Binding Library - v2rayNG</Title>
|
||||
<Authors>https://github.com/AigioL</Authors>
|
||||
<Description>
|
||||
v2rayNG Binding for Xamarin Android. https://github.com/2dust/v2rayNG
|
||||
|
||||
Commonly Used Types:
|
||||
com.v2ray.ang.service.V2RayVpnService -> V2RayNG.V2RayVpnService
|
||||
</Description>
|
||||
<!--<GenerateDocumentationFile>true</GenerateDocumentationFile>-->
|
||||
<!--<AllowUnsafeBlocks>true</AllowUnsafeBlocks>-->
|
||||
<!--<PublishRepositoryUrl>true</PublishRepositoryUrl>-->
|
||||
<!--<EmbedUntrackedSources>true</EmbedUntrackedSources>-->
|
||||
<!--<IncludeSymbols>true</IncludeSymbols>-->
|
||||
<!--<SymbolPackageFormat>snupkg</SymbolPackageFormat>-->
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<LibraryProjectZip Include="Jars\*.aar" />
|
||||
<TransformFile Include="Transforms\*.xml" />
|
||||
<None Remove="Transforms\*.xml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="XAB.AndroidLibV2rayLite" />
|
||||
<PackageReference Include="Xamarin.AndroidX.AppCompat" />
|
||||
<PackageReference Include="Karamunting.KotlinX.Coroutines.Core" />
|
||||
<PackageReference Include="Naxam.RxJava.Droid" />
|
||||
<!--<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />-->
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,15 @@
|
||||
<metadata>
|
||||
<!--
|
||||
This sample removes the class: android.support.v4.content.AsyncTaskLoader.LoadTask:
|
||||
<remove-node path="/api/package[@name='android.support.v4.content']/class[@name='AsyncTaskLoader.LoadTask']" />
|
||||
|
||||
This sample removes the method: android.support.v4.content.CursorLoader.loadInBackground:
|
||||
<remove-node path="/api/package[@name='android.support.v4.content']/class[@name='CursorLoader']/method[@name='loadInBackground']" />
|
||||
-->
|
||||
<remove-node path="/api/package[@name='net.steampp.app.v2ray.util']" />
|
||||
<remove-node path="/api/package[@name='net.steampp.app.v2ray']" />
|
||||
<remove-node path="/api/package[@name='net.steampp.app.v2ray.service.ServiceControl']" />
|
||||
<attr path="/api/package[@name='net.steampp.app.v2ray.service']"
|
||||
name="managedName">V2RayNG</attr>
|
||||
<remove-node path="/api/package[@name='net.steampp.app.v2ray.extension']" />
|
||||
</metadata>
|
||||
@@ -1,4 +1,5 @@
|
||||
using Android.Content;
|
||||
using Android.Flexbox;
|
||||
using Android.Graphics;
|
||||
using Android.Graphics.Drawables;
|
||||
using AndroidX.Annotations;
|
||||
@@ -25,6 +26,16 @@ namespace System
|
||||
recycleView.SetLayoutManager(layout);
|
||||
}
|
||||
|
||||
public static void SetFlexboxLayoutManager(this RecyclerView recycleView, int flexDirection = FlexDirection.Row, int justifyContent = JustifyContent.FlexStart)
|
||||
{
|
||||
var layout = new FlexboxLayoutManager(recycleView.Context!)
|
||||
{
|
||||
FlexDirection = flexDirection,
|
||||
JustifyContent = justifyContent,
|
||||
};
|
||||
recycleView.SetLayoutManager(layout);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加纵向列表组项间距,使用 <see cref="VerticalGroupItemDecoration(int)"/>
|
||||
/// </summary>
|
||||
|
||||
@@ -6,6 +6,8 @@ using AndroidUri = Android.Net.Uri;
|
||||
using Fragment = AndroidX.Fragment.App.Fragment;
|
||||
using JFile = Java.IO.File;
|
||||
using ASettings = Android.Provider.Settings;
|
||||
using Android.Security;
|
||||
using System.IO;
|
||||
|
||||
namespace System.Application
|
||||
{
|
||||
@@ -139,12 +141,16 @@ namespace System.Application
|
||||
StartActivity<TActivity, TViewModel>(activity, viewModel);
|
||||
}
|
||||
|
||||
public static bool OpenFile(Context context, JFile jFile, string mime)
|
||||
public static bool OpenFile(Context context, JFile jFile, string mime, string? name = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
var sdkInt = (int)Build.VERSION.SdkInt;
|
||||
var intent = new Intent(Intent.ActionView);
|
||||
if (!string.IsNullOrWhiteSpace(name))
|
||||
{
|
||||
intent.PutExtra("name", name);
|
||||
}
|
||||
AndroidUri apkUri;
|
||||
if (sdkInt >= (int)BuildVersionCodes.N) // 7.0 FileProvider
|
||||
{
|
||||
@@ -168,10 +174,28 @@ namespace System.Application
|
||||
|
||||
public static bool InstallApk(Context context, JFile apkFile) => OpenFile(context, apkFile, MediaTypeNames.APK);
|
||||
|
||||
public static void InstallApk(Context context, string apkFilePath)
|
||||
public static bool InstallApk(Context context, string apkFilePath)
|
||||
{
|
||||
JFile apkFile = new(apkFilePath);
|
||||
InstallApk(context, apkFile);
|
||||
return InstallApk(context, apkFile);
|
||||
}
|
||||
|
||||
public static bool InstallCertificate(Context context, string filePath, string name)
|
||||
{
|
||||
try
|
||||
{
|
||||
// com.adguard.android.service.q(HttpsFilteringServiceImpl).f()
|
||||
var intent = KeyChain.CreateInstallIntent();
|
||||
intent.PutExtra("name", name);
|
||||
intent.PutExtra("CERT", File.ReadAllBytes(filePath));
|
||||
intent.AddFlags(ActivityFlags.NewTask);
|
||||
context.StartActivity(intent);
|
||||
return true;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
static void StartNewTaskActivity(Context context, string action)
|
||||
|
||||
+101
@@ -0,0 +1,101 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// 此代码由工具生成。
|
||||
// 运行时版本:4.0.30319.42000
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace System.Application.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 一个强类型的资源类,用于查找本地化的字符串等。
|
||||
/// </summary>
|
||||
// 此类是由 StronglyTypedResourceBuilder
|
||||
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
|
||||
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
|
||||
// (以 /str 作为命令选项),或重新生成 VS 项目。
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class SR {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal SR() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 返回此类使用的缓存的 ResourceManager 实例。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("System.Application.Properties.SR", typeof(SR).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 重写当前线程的 CurrentUICulture 属性,对
|
||||
/// 使用此强类型资源类的所有资源查找执行重写。
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查找类似 {
|
||||
/// "dns": {
|
||||
/// "hosts": {
|
||||
/// "domain:googleapis.cn": "googleapis.com"
|
||||
/// },
|
||||
/// "servers": [
|
||||
/// "1.1.1.1"
|
||||
/// ]
|
||||
/// },
|
||||
/// "inbounds": [
|
||||
/// {
|
||||
/// "listen": "127.0.0.1",
|
||||
/// "port": 10808,
|
||||
/// "protocol": "socks",
|
||||
/// "settings": {
|
||||
/// "auth": "noauth",
|
||||
/// "udp": true,
|
||||
/// "userLevel": 8
|
||||
/// },
|
||||
/// "sniffing": {
|
||||
/// "destOverride": [
|
||||
/// "http",
|
||||
/// "tls"
|
||||
/// ],
|
||||
/// "enabled": true
|
||||
/// },
|
||||
/// "tag": "socks"
|
||||
/// },
|
||||
/// {
|
||||
/// [字符串的其余部分被截断]"; 的本地化字符串。
|
||||
/// </summary>
|
||||
internal static string v2rayPoint_configure {
|
||||
get {
|
||||
return ResourceManager.GetString("v2rayPoint_configure", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="v2rayPoint_configure" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\v2rayPoint.configure.txt;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;gb2312</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -0,0 +1,107 @@
|
||||
{
|
||||
"dns": {
|
||||
"hosts": {
|
||||
"domain:googleapis.cn": "googleapis.com"
|
||||
},
|
||||
"servers": [
|
||||
"1.1.1.1"
|
||||
]
|
||||
},
|
||||
"inbounds": [
|
||||
{
|
||||
"listen": "127.0.0.1",
|
||||
"port": 10808,
|
||||
"protocol": "socks",
|
||||
"settings": {
|
||||
"auth": "noauth",
|
||||
"udp": true,
|
||||
"userLevel": 8
|
||||
},
|
||||
"sniffing": {
|
||||
"destOverride": [
|
||||
"http",
|
||||
"tls"
|
||||
],
|
||||
"enabled": true
|
||||
},
|
||||
"tag": "socks"
|
||||
},
|
||||
{
|
||||
"listen": "127.0.0.1",
|
||||
"port": 10809,
|
||||
"protocol": "http",
|
||||
"settings": {
|
||||
"userLevel": 8
|
||||
},
|
||||
"tag": "http"
|
||||
}
|
||||
],
|
||||
"log": {
|
||||
"loglevel": "warning"
|
||||
},
|
||||
"outbounds": [
|
||||
{
|
||||
"mux": {
|
||||
"concurrency": 8,
|
||||
"enabled": false
|
||||
},
|
||||
"protocol": "socks",
|
||||
"settings": {
|
||||
"servers": [
|
||||
{
|
||||
"address": "${ProxyIp}",
|
||||
"level": 8,
|
||||
"method": "chacha20-poly1305",
|
||||
"ota": false,
|
||||
"password": "",
|
||||
"port": ${ProxyPort}
|
||||
}
|
||||
]
|
||||
},
|
||||
"streamSettings": {
|
||||
"network": "tcp",
|
||||
"security": "",
|
||||
"tcpSettings": {
|
||||
"header": {
|
||||
"type": "none"
|
||||
}
|
||||
}
|
||||
},
|
||||
"tag": "proxy"
|
||||
},
|
||||
{
|
||||
"protocol": "freedom",
|
||||
"settings": {},
|
||||
"tag": "direct"
|
||||
},
|
||||
{
|
||||
"protocol": "blackhole",
|
||||
"settings": {
|
||||
"response": {
|
||||
"type": "http"
|
||||
}
|
||||
},
|
||||
"tag": "block"
|
||||
}
|
||||
],
|
||||
"routing": {
|
||||
"domainStrategy": "IPIfNonMatch",
|
||||
"rules": [
|
||||
{
|
||||
"ip": [
|
||||
"1.1.1.1"
|
||||
],
|
||||
"outboundTag": "proxy",
|
||||
"port": "53",
|
||||
"type": "field"
|
||||
},
|
||||
{
|
||||
"ip": [
|
||||
"geoip:private"
|
||||
],
|
||||
"outboundTag": "direct",
|
||||
"type": "field"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -112,6 +112,11 @@
|
||||
<Compile Include="..\ST.Client.Desktop.Avalonia\ServiceCollectionExtensions.AddWindowManager.cs" />
|
||||
<Compile Include="..\ST.Client.Desktop.Avalonia\ServiceCollectionExtensions.AddApplicationUpdateService.cs" />
|
||||
<AndroidResource Include="Resources\**\*" />
|
||||
<Compile Remove="Services\V2Ray\**" />
|
||||
<EmbeddedResource Remove="Services\V2Ray\**" />
|
||||
<None Remove="Services\V2Ray\**" />
|
||||
<AndroidResource Remove="Resources\v2rayPoint.configure.txt" />
|
||||
<Compile Remove="Services\Native\ProxyForegroundService.JNI.tun2http.cs" />
|
||||
<None Remove="Resources\layout\controls_btntext.xml" />
|
||||
<Compile Include="..\AboutAppInfoPopup.cs">
|
||||
<LinkBase>UI</LinkBase>
|
||||
@@ -119,6 +124,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="XAB.FlexboxLayout" />
|
||||
<PackageReference Include="de.hdodenhof.circleimageview" />
|
||||
<PackageReference Include="Xamarin.AndroidX.AppCompat" />
|
||||
<PackageReference Include="Xamarin.AndroidX.SwipeRefreshLayout" />
|
||||
@@ -155,6 +161,7 @@
|
||||
</ItemGroup>-->
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ST.Client.Android.V2Ray\ST.Client.Android.V2Ray.csproj" />
|
||||
<ProjectReference Include="..\ST.Client.XamarinForms\ST.Client.XamarinForms.csproj" Condition=" $(DefineConstants.Contains(`__XAMARIN_FORMS__`)) " />
|
||||
<ProjectReference Include="..\ST.Client\ST.Client.csproj" />
|
||||
</ItemGroup>
|
||||
@@ -363,6 +370,9 @@
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\drawable\ic_baseline_remove_circle_outline_24.xml">
|
||||
<Link>Resources\drawable\ic_baseline_remove_circle_outline_24.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\drawable\ic_baseline_security_24.xml">
|
||||
<Link>Resources\drawable\ic_baseline_security_24.xml</Link>
|
||||
</AndroidResource>
|
||||
<AndroidResource Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\drawable\ic_baseline_stop_24.xml">
|
||||
<Link>Resources\drawable\ic_baseline_stop_24.xml</Link>
|
||||
</AndroidResource>
|
||||
@@ -456,6 +466,9 @@
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\activity_detail_auth.xml">
|
||||
<Link>Resources\layout\activity_detail_auth.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\activity_donate.xml">
|
||||
<Link>Resources\layout\activity_donate.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\activity_encryption_auth.xml">
|
||||
<Link>Resources\layout\activity_encryption_auth.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
@@ -582,6 +595,9 @@
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\layout_card_steam_auth_trade_confirmation_content.xml">
|
||||
<Link>Resources\layout\layout_card_steam_auth_trade_confirmation_content.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\layout_donate_user.xml">
|
||||
<Link>Resources\layout\layout_donate_user.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
<AndroidBoundLayout Include="..\ST.Client.Mobile.Droid.Design\ui\src\main\res\layout\layout_file_or_dir.xml">
|
||||
<Link>Resources\layout\layout_file_or_dir.xml</Link>
|
||||
</AndroidBoundLayout>
|
||||
@@ -730,27 +746,9 @@
|
||||
<Link>Resources\xml\local_auth_appwidget_info.xml</Link>
|
||||
</AndroidResource>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Properties\SR.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -145,7 +145,7 @@ namespace System.Application.Services.Implementation
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(level), level, null),
|
||||
};
|
||||
|
||||
static NotificationCompat.Builder BuildNotify(
|
||||
static (NotificationCompat.Builder builder, NotificationManagerCompat manager) BuildNotify(
|
||||
Context context,
|
||||
NotificationManagerCompat? manager,
|
||||
string text,
|
||||
@@ -182,7 +182,7 @@ namespace System.Application.Services.Implementation
|
||||
var pendingIntent = PendingIntent.GetActivity(context, 0, intent, PendingIntentFlags.Immutable | PendingIntentFlags.UpdateCurrent);
|
||||
builder.SetContentIntent(pendingIntent);
|
||||
}
|
||||
return builder;
|
||||
return (builder, manager);
|
||||
}
|
||||
|
||||
public void Notify(string text,
|
||||
@@ -194,7 +194,7 @@ namespace System.Application.Services.Implementation
|
||||
var notificationEntrance = GetEntrance(entrance);
|
||||
var context = AndroidApplication.Context;
|
||||
var manager = NotificationManagerCompat.From(context);
|
||||
var builder = BuildNotify(context, manager, text, notificationType,
|
||||
var (builder, _) = BuildNotify(context, manager, text, notificationType,
|
||||
autoCancel, title, entrance: notificationEntrance);
|
||||
var notifyId = GetNotifyId(notificationType);
|
||||
manager.Notify(notifyId, builder.Build());
|
||||
@@ -207,7 +207,7 @@ namespace System.Application.Services.Implementation
|
||||
{
|
||||
var context = AndroidApplication.Context;
|
||||
var manager = NotificationManagerCompat.From(context);
|
||||
var builder = BuildNotify(context, manager,
|
||||
var (builder, _) = BuildNotify(context, manager,
|
||||
text: text(),
|
||||
notificationType,
|
||||
title: title);
|
||||
@@ -290,13 +290,13 @@ namespace System.Application.Services.Implementation
|
||||
/// <param name="notificationType"></param>
|
||||
/// <param name="text"></param>
|
||||
/// <param name="entranceAction"></param>
|
||||
public void StartForeground(Service service,
|
||||
public (NotificationCompat.Builder builder, NotificationManagerCompat manager, int notifyId) StartForeground(Service service,
|
||||
NotificationType notificationType,
|
||||
string text,
|
||||
string? entranceAction = null)
|
||||
{
|
||||
var stopAction = BuildStopServiceAction(service);
|
||||
var builder = BuildNotify(service, null,
|
||||
var (builder, manager) = BuildNotify(service, null,
|
||||
text, notificationType,
|
||||
entrance: GetEntrance(Entrance.Main),
|
||||
actions: new NotificationCompat.Action[] {
|
||||
@@ -306,6 +306,7 @@ namespace System.Application.Services.Implementation
|
||||
var notification = builder.Build();
|
||||
var notifyId = GetNotifyId(notificationType);
|
||||
service.StartForeground(notifyId, notification);
|
||||
return (builder, manager, notifyId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+39
@@ -0,0 +1,39 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ASF_FS = System.Application.Services.Native.ArchiSteamFarmForegroundService;
|
||||
using XEPlatform = Xamarin.Essentials.Platform;
|
||||
using Android.App;
|
||||
using System.Application.Services.Native;
|
||||
|
||||
namespace System.Application.Services.Implementation
|
||||
{
|
||||
partial class AndroidPlatformServiceImpl
|
||||
{
|
||||
bool IPlatformService.UsePlatformForegroundService => true;
|
||||
|
||||
public static void StartOrStopForegroundService(Activity activity, string serviceName, bool? startOrStop = null)
|
||||
{
|
||||
switch (serviceName)
|
||||
{
|
||||
case nameof(ASFService):
|
||||
var s = ASFService.Current;
|
||||
if (s.IsASFRunOrStoping) return;
|
||||
var isASFRuning = s.IsASFRuning;
|
||||
if (isASFRuning == startOrStop) return;
|
||||
activity.StartOrStopForegroundService<ASF_FS>(!isASFRuning);
|
||||
break;
|
||||
case nameof(ProxyService):
|
||||
if (!startOrStop.HasValue) startOrStop = !ProxyService.Current.ProxyStatus;
|
||||
ProxyForegroundService.StartOrStop(activity, startOrStop.Value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
async Task IPlatformService.StartOrStopForegroundServiceAsync(string serviceName, bool? startOrStop)
|
||||
{
|
||||
var activity = await XEPlatform.WaitForActivityAsync();
|
||||
StartOrStopForegroundService(activity, serviceName, startOrStop);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -76,167 +76,164 @@ namespace System.Application.Services.Native
|
||||
[Register(JavaPackageConstants.Services + TAG)]
|
||||
[Service(Permission = Manifest.Permission.BindVpnService, Exported = true)]
|
||||
[IntentFilter(new[] { "android.net.VpnService" })]
|
||||
sealed partial class VpnService : AndroidNetVpnService
|
||||
sealed partial class VpnService /*: AndroidNetVpnService*/
|
||||
{
|
||||
const string TAG = nameof(ProxyForegroundService) + "_VPN";
|
||||
|
||||
bool isStart;
|
||||
ParcelFileDescriptor? localTunnel;
|
||||
//bool isStart;
|
||||
//ParcelFileDescriptor? localTunnel;
|
||||
|
||||
public override void OnCreate()
|
||||
{
|
||||
jni_init();
|
||||
base.OnCreate();
|
||||
}
|
||||
//public override void OnCreate()
|
||||
//{
|
||||
// jni_init();
|
||||
// base.OnCreate();
|
||||
//}
|
||||
|
||||
public /*async*/ void OnStart()
|
||||
{
|
||||
if (isStart) return;
|
||||
isStart = true;
|
||||
//public void OnStart()
|
||||
//{
|
||||
// if (isStart) return;
|
||||
// isStart = true;
|
||||
|
||||
IForegroundService f = this;
|
||||
AndroidNotificationServiceImpl.Instance.StartForeground(this, f.NotificationType, f.NotificationText, f.NotificationEntranceAction);
|
||||
// IForegroundService f = this;
|
||||
// AndroidNotificationServiceImpl.Instance.StartForeground(this, f.NotificationType, f.NotificationText, f.NotificationEntranceAction);
|
||||
|
||||
ProxyService.Current.ProxyStatus = true;
|
||||
// ProxyService.Current.ProxyStatus = true;
|
||||
|
||||
// wait ???
|
||||
//await Task.Delay(3500);
|
||||
// if (localTunnel != null) return;
|
||||
|
||||
if (localTunnel != null) return;
|
||||
// // Configure a new interface from our VpnService instance. This must be done
|
||||
// // from inside a VpnService.
|
||||
// var builder = new Builder(this).SetSession(AssemblyTrademark);
|
||||
|
||||
// Configure a new interface from our VpnService instance. This must be done
|
||||
// from inside a VpnService.
|
||||
var builder = new Builder(this).SetSession(AssemblyTrademark);
|
||||
// // Create a local TUN interface using predetermined addresses. In your app,
|
||||
// // you typically use values returned from the VPN gateway during handshaking.
|
||||
// builder.AddAddress("10.1.10.1", 32);
|
||||
// builder.AddAddress("fd00:1:fd00:1:fd00:1:fd00:1", 128);
|
||||
// builder.AddRoute("0.0.0.0", 0);
|
||||
// builder.AddRoute("0:0:0:0:0:0:0:0", 0);
|
||||
|
||||
// Create a local TUN interface using predetermined addresses. In your app,
|
||||
// you typically use values returned from the VPN gateway during handshaking.
|
||||
builder.AddAddress("10.1.10.1", 32);
|
||||
//builder.AddAddress("fd00:1:fd00:1:fd00:1:fd00:1", 128);
|
||||
builder.AddRoute("0.0.0.0", 0);
|
||||
//builder.AddRoute("0:0:0:0:0:0:0:0", 0);
|
||||
// //var dnss = GetDefaultDNS();
|
||||
// //Array.ForEach(dnss, x => builder.AddDnsServer(x));
|
||||
|
||||
var dnss = GetDefaultDNS();
|
||||
Array.ForEach(dnss, x => builder.AddDnsServer(x));
|
||||
// int mtu = jni_get_mtu();
|
||||
// builder.SetMtu(mtu);
|
||||
|
||||
int mtu = jni_get_mtu();
|
||||
builder.SetMtu(mtu);
|
||||
// var pkg = PackageName!;
|
||||
// builder.AddDisallowedApplication(pkg);
|
||||
|
||||
var pkg = PackageName!;
|
||||
builder.AddDisallowedApplication(pkg);
|
||||
// localTunnel = builder.Establish()!;
|
||||
|
||||
localTunnel = builder.Establish()!;
|
||||
// var httpProxyService = IHttpProxyService.Instance;
|
||||
// var address = httpProxyService.ProxyIp;
|
||||
// var port = httpProxyService.ProxyPort;
|
||||
// jni_start(localTunnel.Fd, false, 3, address!.ToString(), port);
|
||||
//}
|
||||
|
||||
var httpProxyService = IHttpProxyService.Instance;
|
||||
var address = httpProxyService.ProxyIp;
|
||||
var port = httpProxyService.ProxyPort;
|
||||
jni_start(localTunnel.Fd, false, 3, address!.ToString(), port);
|
||||
}
|
||||
//public void OnStop()
|
||||
//{
|
||||
// if (!isStart) return;
|
||||
// isStart = false;
|
||||
|
||||
public void OnStop()
|
||||
{
|
||||
if (!isStart) return;
|
||||
isStart = false;
|
||||
// StopForeground(true);
|
||||
|
||||
StopForeground(true);
|
||||
// if (localTunnel != null)
|
||||
// {
|
||||
// try
|
||||
// {
|
||||
// jni_stop(localTunnel.Fd);
|
||||
// }
|
||||
// catch (Java.Lang.Throwable ex)
|
||||
// {
|
||||
// Log.Error(TAG, ex, "jni_stop");
|
||||
// jni_stop(-1);
|
||||
// }
|
||||
// try
|
||||
// {
|
||||
// localTunnel.Close();
|
||||
// }
|
||||
// catch (Java.IO.IOException ex)
|
||||
// {
|
||||
// Log.Error(TAG, ex, "localTunnel.Close");
|
||||
// }
|
||||
// localTunnel.Dispose();
|
||||
// localTunnel = null;
|
||||
// }
|
||||
|
||||
if (localTunnel != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
jni_stop(localTunnel.Fd);
|
||||
}
|
||||
catch (Java.Lang.Throwable ex)
|
||||
{
|
||||
Log.Error(TAG, ex, "jni_stop");
|
||||
jni_stop(-1);
|
||||
}
|
||||
try
|
||||
{
|
||||
localTunnel.Close();
|
||||
}
|
||||
catch (Java.IO.IOException ex)
|
||||
{
|
||||
Log.Error(TAG, ex, "localTunnel.Close");
|
||||
}
|
||||
localTunnel.Dispose();
|
||||
localTunnel = null;
|
||||
}
|
||||
// ProxyService.Current.ProxyStatus = false;
|
||||
//}
|
||||
|
||||
ProxyService.Current.ProxyStatus = false;
|
||||
}
|
||||
//[return: GeneratedEnum]
|
||||
//public override StartCommandResult OnStartCommand(Intent? intent, [GeneratedEnum] StartCommandFlags flags, int startId)
|
||||
//{
|
||||
// if (intent != null)
|
||||
// {
|
||||
// var action = intent.Action;
|
||||
// switch (action)
|
||||
// {
|
||||
// case START:
|
||||
// OnStart();
|
||||
// return StartCommandResult.RedeliverIntent;
|
||||
// case STOP:
|
||||
// default:
|
||||
// OnStop();
|
||||
// StopSelf();
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// return StartCommandResult.NotSticky;
|
||||
//}
|
||||
|
||||
[return: GeneratedEnum]
|
||||
public override StartCommandResult OnStartCommand(Intent? intent, [GeneratedEnum] StartCommandFlags flags, int startId)
|
||||
{
|
||||
if (intent != null)
|
||||
{
|
||||
var action = intent.Action;
|
||||
switch (action)
|
||||
{
|
||||
case START:
|
||||
OnStart();
|
||||
return StartCommandResult.RedeliverIntent;
|
||||
case STOP:
|
||||
default:
|
||||
OnStop();
|
||||
StopSelf();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return StartCommandResult.NotSticky;
|
||||
}
|
||||
//public override void OnRevoke()
|
||||
//{
|
||||
// OnStop();
|
||||
// base.OnRevoke();
|
||||
//}
|
||||
|
||||
public override void OnRevoke()
|
||||
{
|
||||
OnStop();
|
||||
base.OnRevoke();
|
||||
}
|
||||
//public override void OnDestroy()
|
||||
//{
|
||||
// OnStop();
|
||||
// base.OnDestroy();
|
||||
//}
|
||||
|
||||
public override void OnDestroy()
|
||||
{
|
||||
OnStop();
|
||||
base.OnDestroy();
|
||||
}
|
||||
|
||||
string[] GetDefaultDNS()
|
||||
{
|
||||
//return new[] {
|
||||
// IDnsAnalysisService.PrimaryDNS_Ali,
|
||||
// IDnsAnalysisService.SecondaryDNS_Ali,
|
||||
//};
|
||||
var context = Android.App.Application.Context;
|
||||
string? dns1 = null, dns2 = null;
|
||||
if (Build.VERSION.SdkInt > BuildVersionCodes.NMr1)
|
||||
{
|
||||
var cm = context.GetSystemService<ConnectivityManager>();
|
||||
var an = cm.ActiveNetwork;
|
||||
if (an != null)
|
||||
{
|
||||
var lp = cm.GetLinkProperties(an);
|
||||
if (lp != null)
|
||||
{
|
||||
var dns = lp.DnsServers;
|
||||
if (dns != null)
|
||||
{
|
||||
if (dns.Count > 0)
|
||||
dns1 = dns[0].HostAddress;
|
||||
if (dns.Count > 1)
|
||||
dns2 = dns[1].HostAddress;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dns1 = jni_getprop("net.dns1");
|
||||
dns2 = jni_getprop("net.dns2");
|
||||
}
|
||||
return new[]
|
||||
{
|
||||
string.IsNullOrEmpty(dns1) ? IDnsAnalysisService.PrimaryDNS_Ali : dns1!,
|
||||
string.IsNullOrEmpty(dns2) ? IDnsAnalysisService.SecondaryDNS_Ali : dns2!,
|
||||
};
|
||||
}
|
||||
//string[] GetDefaultDNS()
|
||||
//{
|
||||
// //return new[] {
|
||||
// // IDnsAnalysisService.PrimaryDNS_Ali,
|
||||
// // IDnsAnalysisService.SecondaryDNS_Ali,
|
||||
// //};
|
||||
// var context = Android.App.Application.Context;
|
||||
// string? dns1 = null, dns2 = null;
|
||||
// if (Build.VERSION.SdkInt > BuildVersionCodes.NMr1)
|
||||
// {
|
||||
// var cm = context.GetSystemService<ConnectivityManager>();
|
||||
// var an = cm.ActiveNetwork;
|
||||
// if (an != null)
|
||||
// {
|
||||
// var lp = cm.GetLinkProperties(an);
|
||||
// if (lp != null)
|
||||
// {
|
||||
// var dns = lp.DnsServers;
|
||||
// if (dns != null)
|
||||
// {
|
||||
// if (dns.Count > 0)
|
||||
// dns1 = dns[0].HostAddress;
|
||||
// if (dns.Count > 1)
|
||||
// dns2 = dns[1].HostAddress;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// dns1 = jni_getprop("net.dns1");
|
||||
// dns2 = jni_getprop("net.dns2");
|
||||
// }
|
||||
// return new[]
|
||||
// {
|
||||
// string.IsNullOrEmpty(dns1) ? IDnsAnalysisService.PrimaryDNS_Ali : dns1!,
|
||||
// string.IsNullOrEmpty(dns2) ? IDnsAnalysisService.SecondaryDNS_Ali : dns2!,
|
||||
//};
|
||||
//}
|
||||
}
|
||||
|
||||
const NotificationType notificationType
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
using V2RayNG;
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.Runtime;
|
||||
using System.Application.Services.Implementation;
|
||||
using static System.Application.Services.Native.IServiceBase;
|
||||
using SR = System.Application.Properties.SR;
|
||||
using AndroidX.Core.App;
|
||||
using static System.Properties.ThisAssembly;
|
||||
|
||||
namespace System.Application.Services.Native
|
||||
{
|
||||
partial class ProxyForegroundService
|
||||
{
|
||||
partial class VpnService : V2RayVpnService, IV2RayServiceManager
|
||||
{
|
||||
bool isStart;
|
||||
int notifyId;
|
||||
NotificationCompat.Builder? builder;
|
||||
NotificationManagerCompat? mNotificationManager;
|
||||
NotificationManagerCompat NotificationManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if (mNotificationManager == null)
|
||||
{
|
||||
mNotificationManager = NotificationManagerCompat.From(this);
|
||||
}
|
||||
return mNotificationManager;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnStart()
|
||||
{
|
||||
if (isStart) return;
|
||||
isStart = true;
|
||||
|
||||
// 先显示通知 UI
|
||||
IForegroundService f = this;
|
||||
(builder, mNotificationManager, notifyId) = AndroidNotificationServiceImpl.Instance.StartForeground(this, f.NotificationType, f.NotificationText, f.NotificationEntranceAction);
|
||||
|
||||
// 启动本地代理服务
|
||||
ProxyService.Current.ProxyStatus = true;
|
||||
|
||||
// 启动 VPN tun2socks
|
||||
base.OnStart();
|
||||
}
|
||||
|
||||
public override void OnStop()
|
||||
{
|
||||
if (!isStart) return;
|
||||
isStart = false;
|
||||
|
||||
// 停止通知栏 UI
|
||||
StopForeground(true);
|
||||
|
||||
// 停止 VPN tun2socks
|
||||
base.OnStop();
|
||||
|
||||
// 停止本地代理服务
|
||||
ProxyService.Current.ProxyStatus = false;
|
||||
}
|
||||
|
||||
[return: GeneratedEnum]
|
||||
public override StartCommandResult OnStartCommand(Intent? intent, [GeneratedEnum] StartCommandFlags flags, int startId)
|
||||
{
|
||||
if (intent != null)
|
||||
{
|
||||
var action = intent.Action;
|
||||
switch (action)
|
||||
{
|
||||
case START:
|
||||
OnStart();
|
||||
return StartCommandResult.RedeliverIntent;
|
||||
case STOP:
|
||||
default:
|
||||
OnStop();
|
||||
StopSelf();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return StartCommandResult.NotSticky;
|
||||
}
|
||||
|
||||
public override string Session => AssemblyTrademark;
|
||||
|
||||
string IV2RayServiceManager.ConfigureFileContent
|
||||
{
|
||||
get
|
||||
{
|
||||
var text = SR.v2rayPoint_configure;
|
||||
var s = ProxyService.Current;
|
||||
text = text.Replace("${ProxyIp}", s.ProxyIp.ToString());
|
||||
text = text.Replace("${ProxyPort}", s.Socks5ProxyPortId.ToString());
|
||||
return text;
|
||||
}
|
||||
}
|
||||
|
||||
string IV2RayServiceManager.DomainName
|
||||
{
|
||||
get
|
||||
{
|
||||
var s = ProxyService.Current;
|
||||
return $"{s.ProxyIp}:{s.Socks5ProxyPortId}";
|
||||
}
|
||||
}
|
||||
|
||||
bool IV2RayServiceManager.ForwardIpv6 => false;
|
||||
|
||||
void IV2RayServiceManager.UpdateNotification(string? contentText, long proxyTraffic, long directTraffic)
|
||||
{
|
||||
if (builder == null) return;
|
||||
//if (proxyTraffic < NOTIFICATION_ICON_THRESHOLD && directTraffic < NOTIFICATION_ICON_THRESHOLD) {
|
||||
// mBuilder?.setSmallIcon(R.drawable.ic_v)
|
||||
//} else if (proxyTraffic > directTraffic) {
|
||||
// mBuilder?.setSmallIcon(R.drawable.ic_stat_proxy)
|
||||
//} else {
|
||||
// mBuilder?.setSmallIcon(R.drawable.ic_stat_direct)
|
||||
//}
|
||||
builder.SetStyle(new NotificationCompat.BigTextStyle().BigText(contentText));
|
||||
builder.SetContentText(contentText);
|
||||
NotificationManager.Notify(notifyId, builder.Build());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace System.Application.Services.V2Ray
|
||||
{
|
||||
static class AppConfig
|
||||
{
|
||||
public const string DNS_AGENT = "1.1.1.1";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using Android.App;
|
||||
|
||||
namespace System.Application.Services.V2Ray
|
||||
{
|
||||
interface IServiceControl
|
||||
{
|
||||
Service Service { get; }
|
||||
|
||||
void StartService(string parameters);
|
||||
|
||||
void StopService();
|
||||
|
||||
bool VpnProtect(int socket);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
namespace System.Application.Services.V2Ray
|
||||
{
|
||||
enum RoutingMode : byte
|
||||
{
|
||||
全局,
|
||||
绕过局域网地址,
|
||||
绕过大陆地址,
|
||||
绕过局域网及大陆地址,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using Kotlin.Text;
|
||||
using Android.Content;
|
||||
|
||||
namespace System.Application.Services.V2Ray
|
||||
{
|
||||
static class V2RayUtils
|
||||
{
|
||||
public static string[] VpnDnsServers
|
||||
{
|
||||
get
|
||||
{
|
||||
return new[] { AppConfig.DNS_AGENT };
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsPureIpAddress(string value) => IsIpv4Address(value) || IsIpv6Address(value);
|
||||
|
||||
public static bool IsIpv4Address(string value)
|
||||
{
|
||||
var regV4 = new Regex("^([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])$");
|
||||
return regV4.Matches(value);
|
||||
}
|
||||
|
||||
public static bool IsIpv6Address(string value)
|
||||
{
|
||||
if (value.IndexOf('[') == 0 && value.LastIndexOf(']') > 0)
|
||||
{
|
||||
value = StringsKt.Drop(value, 1);
|
||||
value = StringsKt.DropLast(value, value.Length - value.LastIndexOf(']'));
|
||||
}
|
||||
var regV6 = new Regex("^((?:[0-9A-Fa-f]{1,4}))?((?::[0-9A-Fa-f]{1,4}))*::((?:[0-9A-Fa-f]{1,4}))?((?::[0-9A-Fa-f]{1,4}))*|((?:[0-9A-Fa-f]{1,4}))((?::[0-9A-Fa-f]{1,4})){7}$");
|
||||
return regV6.Matches(value);
|
||||
}
|
||||
|
||||
public static string PackagePath(Context context)
|
||||
{
|
||||
var path = context.FilesDir!.ToString();
|
||||
path = path.Replace("files", "");
|
||||
//path += "tun2socks"
|
||||
return path;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
using Java.Lang.Ref;
|
||||
using Libv2ray;
|
||||
using JObject = Java.Lang.Object;
|
||||
|
||||
namespace System.Application.Services.V2Ray
|
||||
{
|
||||
static class V2RayServiceManager
|
||||
{
|
||||
static readonly V2RayPoint v2rayPoint = Libv2ray.Libv2ray.NewV2RayPoint(new V2RayCallback());
|
||||
|
||||
static SoftReference? mServiceControl;
|
||||
|
||||
public static SoftReference? ServiceControl
|
||||
{
|
||||
set
|
||||
{
|
||||
mServiceControl = value;
|
||||
if (value?.Get() is IServiceControl serviceControl)
|
||||
{
|
||||
var context = serviceControl.Service?.ApplicationContext;
|
||||
}
|
||||
}
|
||||
get
|
||||
{
|
||||
return mServiceControl;
|
||||
}
|
||||
}
|
||||
|
||||
sealed class V2RayCallback : JObject, IV2RayVPNServiceSupportsSet
|
||||
{
|
||||
public long OnEmitStatus(long p0, string p1)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public long Prepare()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public long Protect(long p0)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public long Setup(string p0)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public long Shutdown()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public static void StartV2rayPoint()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,311 @@
|
||||
using Android.App;
|
||||
using Android.Content;
|
||||
using Android.OS;
|
||||
using Android.Runtime;
|
||||
using static System.Application.Services.Native.IServiceBase;
|
||||
using System.Application.Services.V2Ray;
|
||||
using Java.Lang.Ref;
|
||||
using AndroidAppService = Android.App.Service;
|
||||
using static System.Properties.ThisAssembly;
|
||||
using System.Linq;
|
||||
using System.Collections.Generic;
|
||||
using Android.Net;
|
||||
using JException = Java.Lang.Exception;
|
||||
using Utils = System.Application.Services.V2Ray.V2RayUtils;
|
||||
using File = Java.IO.File;
|
||||
using KotlinX.Coroutines;
|
||||
|
||||
namespace System.Application.Services.Native
|
||||
{
|
||||
partial class ProxyForegroundService
|
||||
{
|
||||
partial class VpnService : IServiceControl
|
||||
{
|
||||
ParcelFileDescriptor? mInterface;
|
||||
|
||||
#region lazy
|
||||
|
||||
/**
|
||||
* Unfortunately registerDefaultNetworkCallback is going to return our VPN interface: https://android.googlesource.com/platform/frameworks/base/+/dda156ab0c5d66ad82bdcf76cda07cbc0a9c8a2e
|
||||
*
|
||||
* This makes doing a requestNetwork with REQUEST necessary so that we don't get ALL possible networks that
|
||||
* satisfies default network capabilities but only THE default network. Unfortunately we need to have
|
||||
* android.permission.CHANGE_NETWORK_STATE to be able to call requestNetwork.
|
||||
*
|
||||
* Source: https://android.googlesource.com/platform/frameworks/base/+/2df4c7d/services/core/java/com/android/server/ConnectivityService.java#887
|
||||
*/
|
||||
NetworkRequest? mDefaultNetworkRequest;
|
||||
NetworkRequest DefaultNetworkRequest
|
||||
{
|
||||
get
|
||||
{
|
||||
if (mDefaultNetworkRequest == null)
|
||||
{
|
||||
mDefaultNetworkRequest = new NetworkRequest.Builder()
|
||||
.AddCapability(NetCapability.Internet)!
|
||||
.AddCapability(NetCapability.NotRestricted)!
|
||||
.Build()!;
|
||||
}
|
||||
return mDefaultNetworkRequest;
|
||||
}
|
||||
}
|
||||
|
||||
ConnectivityManager? mConnectivity;
|
||||
ConnectivityManager Connectivity
|
||||
{
|
||||
get
|
||||
{
|
||||
if (mConnectivity == null)
|
||||
{
|
||||
mConnectivity = this.GetSystemService<ConnectivityManager>();
|
||||
}
|
||||
return mConnectivity;
|
||||
}
|
||||
}
|
||||
|
||||
ConnectivityManager.NetworkCallback? mDefaultNetworkCallback;
|
||||
ConnectivityManager.NetworkCallback DefaultNetworkCallback
|
||||
{
|
||||
get
|
||||
{
|
||||
if (mDefaultNetworkCallback == null)
|
||||
{
|
||||
mDefaultNetworkCallback = new DefaultNetworkCallback2(this);
|
||||
}
|
||||
return mDefaultNetworkCallback;
|
||||
}
|
||||
}
|
||||
|
||||
sealed class DefaultNetworkCallback2 : ConnectivityManager.NetworkCallback
|
||||
{
|
||||
readonly VpnService thiz;
|
||||
|
||||
public DefaultNetworkCallback2(VpnService thiz)
|
||||
{
|
||||
this.thiz = thiz;
|
||||
}
|
||||
|
||||
public override void OnAvailable(Network network)
|
||||
{
|
||||
thiz.SetUnderlyingNetworks(new[] { network });
|
||||
}
|
||||
|
||||
public override void OnCapabilitiesChanged(Network network, NetworkCapabilities networkCapabilities)
|
||||
{
|
||||
// it's a good idea to refresh capabilities
|
||||
thiz.SetUnderlyingNetworks(new[] { network });
|
||||
}
|
||||
|
||||
public override void OnLost(Network network)
|
||||
{
|
||||
thiz.SetUnderlyingNetworks(null);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public override void OnCreate()
|
||||
{
|
||||
base.OnCreate();
|
||||
var policy = new StrictMode.ThreadPolicy.Builder().PermitAll().Build();
|
||||
StrictMode.SetThreadPolicy(policy);
|
||||
V2RayServiceManager.ServiceControl = new SoftReference(this);
|
||||
}
|
||||
|
||||
public override void OnRevoke()
|
||||
{
|
||||
StopV2Ray();
|
||||
base.OnRevoke();
|
||||
}
|
||||
|
||||
public override void OnLowMemory()
|
||||
{
|
||||
StopV2Ray();
|
||||
base.OnLowMemory();
|
||||
}
|
||||
|
||||
public override void OnDestroy()
|
||||
{
|
||||
StopV2Ray();
|
||||
base.OnDestroy();
|
||||
}
|
||||
|
||||
void Setup(string parameters)
|
||||
{
|
||||
var prepare = Prepare(this);
|
||||
if (prepare != null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// If the old interface has exactly the same parameters, use it!
|
||||
// Configure a builder while parsing the parameters.
|
||||
var builder = new Builder(this).SetSession(AssemblyTrademark);
|
||||
const bool enableLocalDns = false;
|
||||
const RoutingMode routingMode = RoutingMode.绕过局域网地址;
|
||||
|
||||
var parametersArray = parameters.Split(' ', StringSplitOptions.RemoveEmptyEntries)
|
||||
.Select(x => x.Split(',', StringSplitOptions.RemoveEmptyEntries)).ToArray();
|
||||
Array.ForEach(parametersArray, it =>
|
||||
{
|
||||
_ = it.FirstOrDefault().FirstOrDefault() switch
|
||||
{
|
||||
'm' => it.Length >= 2 && int.TryParse(it[1], out var mtu)
|
||||
? builder.SetMtu(mtu) : builder,
|
||||
's' => it.Length >= 2
|
||||
? builder.AddSearchDomain(it[1]) : builder,
|
||||
'a' => it.Length >= 3 && int.TryParse(it[2], out var prefixLength)
|
||||
? builder.AddAddress(it[1], prefixLength) : builder,
|
||||
'r' => routingMode switch
|
||||
{
|
||||
RoutingMode.绕过局域网地址 or RoutingMode.绕过局域网及大陆地址 => it.Length >= 2 &&
|
||||
it[1] == "::" //not very elegant, should move Vpn setting in Kotlin, simplify go code
|
||||
? builder.AddRoute("2000::", 3)
|
||||
: AddRoutes(builder, Resources!.GetStringArray(Resource.Array.bypass_private_ip_address)),
|
||||
_ => it.Length >= 3 && int.TryParse(it[2], out var prefixLength)
|
||||
? builder.AddRoute(it[1], prefixLength) : builder,
|
||||
},
|
||||
'd' => it.Length >= 2
|
||||
? builder.AddDnsServer(it[1]) : builder,
|
||||
_ => builder,
|
||||
};
|
||||
});
|
||||
|
||||
static Builder AddRoutes(Builder builder, IEnumerable<string> values)
|
||||
{
|
||||
foreach (var value in values)
|
||||
{
|
||||
var array = value.Split('/', StringSplitOptions.RemoveEmptyEntries);
|
||||
if (array.Length >= 2 && int.TryParse(array[1], out var prefixLength))
|
||||
{
|
||||
builder.AddRoute(array[0], prefixLength);
|
||||
}
|
||||
}
|
||||
return builder;
|
||||
}
|
||||
|
||||
if (!enableLocalDns)
|
||||
{
|
||||
//Array.ForEach(Utils.VpnDnsServers, it =>
|
||||
//{
|
||||
// if (Utils.IsPureIpAddress(it))
|
||||
// {
|
||||
// builder.AddDnsServer(it);
|
||||
// }
|
||||
//});
|
||||
|
||||
builder.AddDnsServer(AppConfig.DNS_AGENT);
|
||||
}
|
||||
|
||||
// Close the old interface since the parameters have been changed.
|
||||
try
|
||||
{
|
||||
mInterface?.Close();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
// ignored
|
||||
}
|
||||
|
||||
var sdkInt = Build.VERSION.SdkInt;
|
||||
|
||||
if (sdkInt >= BuildVersionCodes.P)
|
||||
{
|
||||
try
|
||||
{
|
||||
Connectivity.RequestNetwork(DefaultNetworkRequest, DefaultNetworkCallback);
|
||||
}
|
||||
catch (JException e)
|
||||
{
|
||||
e.PrintStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
if (sdkInt >= BuildVersionCodes.Q)
|
||||
{
|
||||
builder.SetMetered(false);
|
||||
}
|
||||
|
||||
// Create a new interface using the builder and save the parameters.
|
||||
try
|
||||
{
|
||||
mInterface = builder.Establish()!;
|
||||
}
|
||||
catch (JException e)
|
||||
{
|
||||
// non-nullable lateinit var
|
||||
e.PrintStackTrace();
|
||||
StopV2Ray();
|
||||
}
|
||||
|
||||
SendFd();
|
||||
}
|
||||
|
||||
void SendFd()
|
||||
{
|
||||
var fd = mInterface!.FileDescriptor;
|
||||
var path = new File(Utils.PackagePath(ApplicationContext!), "sock_path").AbsolutePath;
|
||||
|
||||
BuildersKt.Launch(GlobalScope.Instance, Dispatchers.IO,
|
||||
CoroutineStart.Default, null);
|
||||
}
|
||||
|
||||
sealed class B : IFunction2
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
[return: GeneratedEnum]
|
||||
public override StartCommandResult OnStartCommand(Intent? intent, [GeneratedEnum] StartCommandFlags flags, int startId)
|
||||
{
|
||||
if (intent != null)
|
||||
{
|
||||
var action = intent.Action;
|
||||
switch (action)
|
||||
{
|
||||
case START:
|
||||
V2RayServiceManager.StartV2rayPoint();
|
||||
return StartCommandResult.RedeliverIntent;
|
||||
case STOP:
|
||||
default:
|
||||
StopV2Ray();
|
||||
StopSelf();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return StartCommandResult.NotSticky;
|
||||
}
|
||||
|
||||
void StopV2Ray(bool isForced = true)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#region IServiceControl
|
||||
|
||||
AndroidAppService IServiceControl.Service => this;
|
||||
|
||||
void IServiceControl.StartService(string parameters) => Setup(parameters);
|
||||
|
||||
void IServiceControl.StopService()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
bool IServiceControl.VpnProtect(int socket)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IServiceBase
|
||||
|
||||
void IServiceBase.OnStart() => Setup("");
|
||||
|
||||
void IServiceBase.OnStop() => StopV2Ray();
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
using Android.App;
|
||||
using Android.Content.PM;
|
||||
using Android.OS;
|
||||
using Android.Runtime;
|
||||
using Android.Views;
|
||||
using Binding;
|
||||
using System.Linq;
|
||||
using System.Collections.Specialized;
|
||||
using System.Application.UI.Adapters;
|
||||
using System.Application.UI.ViewModels;
|
||||
using System.Application.UI.Resx;
|
||||
using Google.Android.Material.DatePicker;
|
||||
using Android.Flexbox;
|
||||
|
||||
namespace System.Application.UI.Activities
|
||||
{
|
||||
[Register(JavaPackageConstants.Activities + nameof(DonateActivity))]
|
||||
[Activity(Theme = ManifestConstants.MainTheme2_NoActionBar,
|
||||
LaunchMode = LaunchMode.SingleTask,
|
||||
ConfigurationChanges = ManifestConstants.ConfigurationChanges)]
|
||||
internal sealed class DonateActivity : BaseActivity<activity_donate, AboutPageViewModel>, DatePickerHelper.IOnPositiveButtonClickListener
|
||||
{
|
||||
protected override int? LayoutResource => Resource.Layout.activity_donate;
|
||||
|
||||
protected override AboutPageViewModel? OnCreateViewModel() => AboutPageViewModel.Instance;
|
||||
|
||||
NotifyCollectionChangedEventHandler? handlerDonateList;
|
||||
DonateUserAdapter? adapter;
|
||||
|
||||
protected override void OnCreate2(Bundle? savedInstanceState)
|
||||
{
|
||||
base.OnCreate2(savedInstanceState);
|
||||
|
||||
this.SetSupportActionBarWithNavigationClick(binding!.toolbar, true);
|
||||
|
||||
R.Subscribe(() =>
|
||||
{
|
||||
Title = AppResources.About_Donate;
|
||||
if (binding == null) return;
|
||||
binding.tvTitle.Text = AppResources.About_Donate_Title;
|
||||
binding.btnUID.Text = AppResources.ClickHereCopyUIDToClipboard;
|
||||
binding.tvDesc.Text = AppResources.About_Donate_Desc;
|
||||
binding.tvDonateType.Text = AppResources.About_DonateType;
|
||||
binding.tvDonateRecord.Text = AppResources.About_DonateRecord;
|
||||
binding.tvDonateRecordPrompt.Text = AppResources.About_DonateRecord_Prompt;
|
||||
binding.tvDonateRecordNoData.Text = AppResources.About_DonateRecord_NoData;
|
||||
}).AddTo(this);
|
||||
|
||||
binding.btn_afdian.Text = "爱发电";
|
||||
binding.btn_ko_fi.Text = "Ko-fi";
|
||||
binding.btn_patreon.Text = "Patreon";
|
||||
|
||||
if (!ViewModel!.DonateList.Any_Nullable())
|
||||
{
|
||||
ViewModel.LoadDonateRankListData();
|
||||
}
|
||||
|
||||
handlerDonateList = (_, _) =>
|
||||
{
|
||||
var hasValue = ViewModel.DonateList.Any();
|
||||
binding.rvDonateList.Visibility = hasValue ? ViewStates.Visible : ViewStates.Gone;
|
||||
binding.tvDonateRecordNoData.Visibility = !hasValue ? ViewStates.Visible : ViewStates.Gone;
|
||||
};
|
||||
ViewModel.DonateList!.CollectionChanged += handlerDonateList;
|
||||
|
||||
SetDateText();
|
||||
|
||||
adapter = new DonateUserAdapter(ViewModel);
|
||||
binding.rvDonateList.SetFlexboxLayoutManager(justifyContent: JustifyContent.Center);
|
||||
binding.rvDonateList.SetAdapter(adapter);
|
||||
|
||||
SetOnClickListener(
|
||||
binding.btnUID,
|
||||
binding.clickDate,
|
||||
binding.btn_afdian,
|
||||
binding.btn_ko_fi,
|
||||
binding.btn_patreon);
|
||||
}
|
||||
|
||||
void SetDateText() => binding!.tbDate.Text = ViewModel!.DonateFliterDate.ToString(DateTimeFormat.YearMonth);
|
||||
|
||||
protected override void OnClick(View view)
|
||||
{
|
||||
base.OnClick(view);
|
||||
|
||||
if (view.Id == Resource.Id.btnUID)
|
||||
{
|
||||
ViewModel!.UIDCommand.Invoke();
|
||||
return;
|
||||
}
|
||||
else if (view.Id == Resource.Id.clickDate)
|
||||
{
|
||||
this.ShowBirthDatePicker(ViewModel!.DonateFliterDate.Date);
|
||||
return;
|
||||
}
|
||||
else if (view.Id == Resource.Id.btn_afdian)
|
||||
{
|
||||
ViewModel!.OpenBrowserCommand.Invoke(UrlConstants.DonateUrl_afdian);
|
||||
return;
|
||||
}
|
||||
else if (view.Id == Resource.Id.btn_ko_fi)
|
||||
{
|
||||
ViewModel!.OpenBrowserCommand.Invoke(UrlConstants.DonateUrl_ko_fi);
|
||||
return;
|
||||
}
|
||||
else if (view.Id == Resource.Id.btn_patreon)
|
||||
{
|
||||
ViewModel!.OpenBrowserCommand.Invoke(UrlConstants.DonateUrl_patreon);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
handlerDonateList = null;
|
||||
if (binding != null)
|
||||
{
|
||||
binding.rvDonateList.SetAdapter(null);
|
||||
}
|
||||
adapter = null;
|
||||
if (ViewModel != null)
|
||||
{
|
||||
if (ViewModel.DonateList != null)
|
||||
{
|
||||
ViewModel.DonateList.CollectionChanged -= handlerDonateList;
|
||||
ViewModel.DonateList = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DatePickerHelper.IOnPositiveButtonClickListener.OnPositiveButtonClick(DateTimeOffset selection)
|
||||
{
|
||||
ViewModel!.DonateFliterDate = selection.GetCurrentMonth();
|
||||
SetDateText();
|
||||
}
|
||||
|
||||
void IMaterialPickerOnPositiveButtonClickListener.OnPositiveButtonClick(Java.Lang.Object p0) => this.OnPositiveButtonClick(p0);
|
||||
}
|
||||
}
|
||||
@@ -19,6 +19,16 @@ namespace System.Application.UI.Activities
|
||||
{
|
||||
protected override int? LayoutResource => Resource.Layout.activity_explorer;
|
||||
|
||||
protected override ExplorerPageViewModel? OnCreateViewModel()
|
||||
{
|
||||
var path = this.GetViewModel<string>();
|
||||
if (!string.IsNullOrWhiteSpace(path))
|
||||
{
|
||||
return new(path!);
|
||||
}
|
||||
return new();
|
||||
}
|
||||
|
||||
protected override void OnCreate2(Bundle? savedInstanceState)
|
||||
{
|
||||
base.OnCreate2(savedInstanceState);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Android.App;
|
||||
using Android.Content.PM;
|
||||
using Android.Graphics;
|
||||
using Android.OS;
|
||||
using Android.Runtime;
|
||||
using Android.Views;
|
||||
@@ -39,6 +40,7 @@ namespace System.Application.UI.Activities
|
||||
|
||||
this.SetSupportActionBarWithNavigationClick(binding!.toolbar, true);
|
||||
|
||||
|
||||
R.Subscribe(() =>
|
||||
{
|
||||
Title = ViewModel!.Title;
|
||||
@@ -69,7 +71,19 @@ namespace System.Application.UI.Activities
|
||||
if (binding == null) return;
|
||||
var hasValue = value != null;
|
||||
binding.ivQRCode.Visibility = !hasValue ? ViewStates.Gone : ViewStates.Visible;
|
||||
binding.ivQRCode.SetImageSource(value);
|
||||
int imgSize;
|
||||
if (value != null)
|
||||
{
|
||||
imgSize = Resources!.DisplayMetrics!.WidthPixels;
|
||||
imgSize -= Resources.GetDimensionPixelSize(Resource.Dimension.activity_horizontal_margin) * 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
imgSize = default;
|
||||
}
|
||||
#pragma warning disable CS0618 // 类型或成员已过时
|
||||
binding.ivQRCode.SetImageSource(value, targetW: imgSize, inPreferredConfig: Bitmap.Config.Argb4444);
|
||||
#pragma warning restore CS0618 // 类型或成员已过时
|
||||
}).AddTo(this);
|
||||
ViewModel!.WhenAnyValue(x => x.IsExporting).SubscribeInMainThread(value =>
|
||||
{
|
||||
@@ -89,7 +103,7 @@ namespace System.Application.UI.Activities
|
||||
{
|
||||
ViewModel!.VerifyPassword = binding.tbPassword2.Text;
|
||||
};
|
||||
binding!.swExportQRCode.CheckedChange += (_, e) =>
|
||||
binding.swExportQRCode.CheckedChange += (_, e) =>
|
||||
{
|
||||
ViewModel!.IsExportQRCode = e.IsChecked;
|
||||
};
|
||||
|
||||
@@ -187,7 +187,7 @@ namespace System.Application.UI.Activities
|
||||
ViewModel!.WhenAnyValue(x => x.CaptchaImage).SubscribeInMainThread(value =>
|
||||
{
|
||||
if (binding == null) return;
|
||||
binding.ivCaptchaImage.SetImageSource(value);
|
||||
binding.ivCaptchaImage.SetImageSource(value, Resource.Dimension.img_size_captcha_w, Resource.Dimension.img_size_captcha_h);
|
||||
}).AddTo(this);
|
||||
ViewModel!.WhenAnyValue(x => x.ConfirmationsConutMessage).SubscribeInMainThread(value =>
|
||||
{
|
||||
|
||||
@@ -178,10 +178,6 @@ namespace System.Application.UI.Activities
|
||||
{
|
||||
IsVpnMode.Value = !IsVpnMode.Value;
|
||||
SetIsVpnMode();
|
||||
if (IsVpnMode.Value)
|
||||
{
|
||||
CommunityFixFragment.ShowTipKnownIssues();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ namespace System.Application.UI.Adapters
|
||||
base.OnBind();
|
||||
|
||||
var imageUrl = ImageUrlHelper.GetImageApiUrlById(ViewModel!.ImageId);
|
||||
binding.ivImage.SetImageSource(imageUrl);
|
||||
binding.ivImage.SetImageSource(imageUrl, Resource.Dimension.accelerate_project_group_img_size);
|
||||
binding.tvName.Text = ViewModel.Name;
|
||||
ViewModel.WhenAnyValue(x => x.ThreeStateEnable)
|
||||
.Subscribe(value =>
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
using Android.Views;
|
||||
using Binding;
|
||||
using ReactiveUI;
|
||||
using System.Application.UI.Resx;
|
||||
using System.Application.UI.ViewModels;
|
||||
using TViewHolder = System.Application.UI.Adapters.DonateUserViewHolder;
|
||||
using TViewModel = System.Application.Models.RankingResponse;
|
||||
using static System.Application.UI.Resx.AppResources;
|
||||
using System.Application.Services;
|
||||
using System.Collections.Generic;
|
||||
using DynamicData;
|
||||
using System.Linq;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Application.Models;
|
||||
|
||||
namespace System.Application.UI.Adapters
|
||||
{
|
||||
sealed class DonateUserAdapter : BaseReactiveRecycleViewAdapter<TViewHolder, TViewModel>
|
||||
{
|
||||
public DonateUserAdapter(ObservableCollection<TViewModel> collection) : base(collection)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DonateUserAdapter(AboutPageViewModel viewModel) : base(viewModel.DonateList!)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public override int? GetLayoutResource(int viewType)
|
||||
{
|
||||
return Resource.Layout.layout_donate_user;
|
||||
}
|
||||
}
|
||||
|
||||
sealed class DonateUserViewHolder : BaseReactiveViewHolder<TViewModel>
|
||||
{
|
||||
readonly layout_donate_user binding;
|
||||
|
||||
public DonateUserViewHolder(View itemView) : base(itemView)
|
||||
{
|
||||
binding = new(itemView);
|
||||
}
|
||||
|
||||
public override void OnBind()
|
||||
{
|
||||
base.OnBind();
|
||||
|
||||
binding.ivAvatar.SetImageSource(ViewModel!.Avatar, Resource.Dimension.img_size_donate_user_avatar);
|
||||
binding.tvNickName.Text = ViewModel.Name;
|
||||
binding.tvValue.Text = ViewModel.Amount.ToString("C", ViewModel.CurrencyCode.GetCultureInfo());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -86,8 +86,7 @@ namespace System.Application.UI.Adapters
|
||||
SetOperateText(value);
|
||||
SetOperatePanel(value);
|
||||
}).AddTo(this);
|
||||
binding.ivImage.SetImageSource(ViewModel!.Image,
|
||||
targetResId: Resource.Dimension.steam_auth__trade_confirmation_img_size);
|
||||
binding.ivImage.SetImageSource(ViewModel!.Image, Resource.Dimension.steam_auth__trade_confirmation_img_size);
|
||||
binding.tvDetails.Text = ViewModel.Details;
|
||||
binding.tvTraded.Text = ViewModel.Traded;
|
||||
binding.tvWhen.Text = ViewModel.When;
|
||||
|
||||
@@ -66,6 +66,9 @@ namespace System.Application.UI.Controllers
|
||||
{
|
||||
switch (e.Current.Id)
|
||||
{
|
||||
case PreferenceButton.捐助:
|
||||
Activity.StartActivity<DonateActivity>();
|
||||
break;
|
||||
case PreferenceButton.检查更新:
|
||||
ViewModel!.CheckUpdateCommand.Invoke();
|
||||
break;
|
||||
|
||||
@@ -2,8 +2,11 @@ using Android.Views;
|
||||
using Binding;
|
||||
using ReactiveUI;
|
||||
using System.Application.Services;
|
||||
using System.Application.Settings;
|
||||
using System.Application.UI.Resx;
|
||||
using System.Application.UI.ViewModels;
|
||||
using System.Application.UI.Activities;
|
||||
using ArchiSteamFarm;
|
||||
using static System.Application.UI.Resx.AppResources;
|
||||
|
||||
// ReSharper disable once CheckNamespace
|
||||
@@ -21,26 +24,111 @@ namespace System.Application.UI.Fragments
|
||||
{
|
||||
if (binding == null) return;
|
||||
binding.tvASFVersion.Text = ASF_VersionNum + IArchiSteamFarmService.Instance.CurrentVersion;
|
||||
binding.btnGoToWebUIGlobalSettings.Text = ASF_OpenWebUIGlobalConfig;
|
||||
binding.btnImportASFBot.Text = ASF_ImportBotFile;
|
||||
binding.tvGoToWebUIGlobalSettings.Text = ASF_OpenWebUIGlobalConfig;
|
||||
binding.tvImportASFBot.Text = ASF_ImportBotFile;
|
||||
binding.tvASFSettingsAutoRunArchiSteamFarm.Text = ASF_AutoRunASF;
|
||||
binding.tvSetCryptKey.Text = ASF_SetCryptKey;
|
||||
binding.tvConsoleSettings.Text = ASF_ConsoleSettings;
|
||||
binding.tvASFSettingsConsoleFontSize.Text = ASF_ConsoleFontSize;
|
||||
binding.tvASFSettingsConsoleMaxLine.Text = ASF_ConsoleMaxLine;
|
||||
binding.tvStorageSpace.Text = $"ASF {Settings_General_StorageSpace}";
|
||||
binding.tvOpenDirASFConfig.Text = Settings_General_BrowseCustomFolder.Format("ASF Config");
|
||||
binding.tvOpenDirASFPlugin.Text = Settings_General_BrowseCustomFolder.Format("ASF Plugin");
|
||||
binding.tvOpenDirASFLog.Text = Settings_General_BrowseCustomFolder.Format("ASF Log");
|
||||
binding.tvOpenDirASFWebUI.Text = Settings_General_BrowseCustomFolder.Format("ASF WebUI");
|
||||
}).AddTo(this);
|
||||
|
||||
SetOnClickListener(binding!.btnGoToWebUIGlobalSettings, binding.btnImportASFBot);
|
||||
binding!.tbASFSettingsConsoleFontSize.Text = ASFSettings.ConsoleFontSize.Value.ToString();
|
||||
binding.tbASFSettingsConsoleFontSize.Hint = ASFSettings.DefaultConsoleFontSize.ToString();
|
||||
binding.tbASFSettingsConsoleFontSize.TextChanged += (_, _) =>
|
||||
{
|
||||
var value = binding.tbASFSettingsConsoleFontSize.Text;
|
||||
if (int.TryParse(value, out var value2))
|
||||
{
|
||||
if (value2 < ASFSettings.MinRangeConsoleFontSize) value2 = ASFSettings.MinRangeConsoleFontSize;
|
||||
if (value2 > ASFSettings.MaxRangeConsoleFontSize) value2 = ASFSettings.MaxRangeConsoleFontSize;
|
||||
ASFSettings.ConsoleFontSize.Value = value2;
|
||||
}
|
||||
};
|
||||
|
||||
binding.tbASFSettingsConsoleMaxLine.Text = ASFSettings.ConsoleMaxLine.Value.ToString();
|
||||
binding.tbASFSettingsConsoleMaxLine.Hint = ASFSettings.DefaultConsoleMaxLine.ToString();
|
||||
binding.tbASFSettingsConsoleMaxLine.TextChanged += (_, _) =>
|
||||
{
|
||||
var value = binding.tbASFSettingsConsoleMaxLine.Text;
|
||||
if (int.TryParse(value, out var value2))
|
||||
{
|
||||
if (value2 < ASFSettings.MinRangeConsoleMaxLine) value2 = ASFSettings.MinRangeConsoleMaxLine;
|
||||
if (value2 > ASFSettings.MaxRangeConsoleMaxLine) value2 = ASFSettings.MaxRangeConsoleMaxLine;
|
||||
ASFSettings.ConsoleMaxLine.Value = value2;
|
||||
}
|
||||
};
|
||||
|
||||
SetAutoRunArchiSteamFarm();
|
||||
|
||||
SetOnClickListener(
|
||||
binding.layoutRootASFSettingsAutoRunArchiSteamFarm,
|
||||
binding.layoutRootGoToWebUIGlobalSettings,
|
||||
binding.layoutRootImportASFBot,
|
||||
binding.layoutRootSetCryptKey,
|
||||
binding.layoutRootOpenDirASFConfig,
|
||||
binding.layoutRootOpenDirASFPlugin,
|
||||
binding.layoutRootOpenDirASFLog,
|
||||
binding.layoutRootOpenDirASFWebUI);
|
||||
}
|
||||
|
||||
protected override bool OnClick(View view)
|
||||
{
|
||||
if (view.Id == Resource.Id.btnGoToWebUIGlobalSettings)
|
||||
if (view.Id == Resource.Id.layoutRootGoToWebUIGlobalSettings)
|
||||
{
|
||||
ViewModel?.OpenBrowser("WebConfig");
|
||||
return true;
|
||||
}
|
||||
if (view.Id == Resource.Id.btnImportASFBot)
|
||||
else if (view.Id == Resource.Id.layoutRootImportASFBot)
|
||||
{
|
||||
ViewModel?.SelectBotFiles?.Invoke();
|
||||
return true;
|
||||
}
|
||||
else if (view.Id == Resource.Id.layoutRootASFSettingsAutoRunArchiSteamFarm)
|
||||
{
|
||||
ASFSettings.AutoRunArchiSteamFarm.Value = !ASFSettings.AutoRunArchiSteamFarm.Value;
|
||||
SetAutoRunArchiSteamFarm();
|
||||
return true;
|
||||
}
|
||||
else if (view.Id == Resource.Id.layoutRootSetCryptKey)
|
||||
{
|
||||
ViewModel?.SetEncryptionKey();
|
||||
return true;
|
||||
}
|
||||
else if (view.Id == Resource.Id.layoutRootOpenDirASFConfig)
|
||||
{
|
||||
OpenFolder(ASFPathFolder.Config);
|
||||
return true;
|
||||
}
|
||||
else if (view.Id == Resource.Id.layoutRootOpenDirASFPlugin)
|
||||
{
|
||||
OpenFolder(ASFPathFolder.Plugin);
|
||||
return true;
|
||||
}
|
||||
else if (view.Id == Resource.Id.layoutRootOpenDirASFLog)
|
||||
{
|
||||
OpenFolder(ASFPathFolder.Logs);
|
||||
return true;
|
||||
}
|
||||
else if (view.Id == Resource.Id.layoutRootOpenDirASFWebUI)
|
||||
{
|
||||
OpenFolder(ASFPathFolder.WWW);
|
||||
return true;
|
||||
}
|
||||
return base.OnClick(view);
|
||||
}
|
||||
|
||||
void SetAutoRunArchiSteamFarm() => binding!.swASFSettingsAutoRunArchiSteamFarm.Checked = ASFSettings.AutoRunArchiSteamFarm.Value;
|
||||
|
||||
void OpenFolder(ASFPathFolder folderASFPath)
|
||||
{
|
||||
var folderASFPathValue = IArchiSteamFarmService.GetFolderPath(folderASFPath);
|
||||
GoToPlatformPages.StartActivity<ExplorerActivity, string>(Activity, folderASFPathValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ using static System.Application.UI.Resx.AppResources;
|
||||
using Fragment = AndroidX.Fragment.App.Fragment;
|
||||
using ASF_FS = System.Application.Services.Native.ArchiSteamFarmForegroundService;
|
||||
using static System.Application.UI.ViewModels.ArchiSteamFarmPlusPageViewModel;
|
||||
using System.Application.Services.Implementation;
|
||||
|
||||
namespace System.Application.UI.Fragments
|
||||
{
|
||||
@@ -69,12 +70,8 @@ namespace System.Application.UI.Fragments
|
||||
void SetMenuTitle() => menuBuilder.SetMenuTitle(ToString2, MenuIdResToEnum);
|
||||
|
||||
void StartOrStopASF_ForegroundService()
|
||||
{
|
||||
var s = ASFService.Current;
|
||||
if (s.IsASFRunOrStoping) return;
|
||||
var isASFRuning = s.IsASFRuning;
|
||||
RequireActivity().StartOrStopForegroundService<ASF_FS>(!isASFRuning);
|
||||
}
|
||||
=> AndroidPlatformServiceImpl.StartOrStopForegroundService(
|
||||
RequireActivity(), nameof(ASFService));
|
||||
|
||||
public override bool OnOptionsItemSelected(IMenuItem item)
|
||||
{
|
||||
|
||||
@@ -18,6 +18,7 @@ using System.Net;
|
||||
using System.Net.Http;
|
||||
using System.Text;
|
||||
using static System.Application.UI.ViewModels.CommunityProxyPageViewModel;
|
||||
using System.Application.Services.Implementation;
|
||||
|
||||
namespace System.Application.UI.Fragments
|
||||
{
|
||||
@@ -59,7 +60,7 @@ namespace System.Application.UI.Fragments
|
||||
binding.layoutRootCommunityFixContentStarting.Visibility = value ? ViewStates.Visible : ViewStates.Gone;
|
||||
if (value)
|
||||
{
|
||||
binding.tvProxyMode.Text = proxyS.IPEndPointString;
|
||||
binding.tvProxyMode.Text = $"IPEndPoint: {proxyS.ProxyIp}:{proxyS.ProxyPort}";
|
||||
StringBuilder s = new();
|
||||
var enableProxyDomains = proxyS.GetEnableProxyDomains();
|
||||
if (enableProxyDomains != null)
|
||||
@@ -144,30 +145,15 @@ namespace System.Application.UI.Fragments
|
||||
}
|
||||
}
|
||||
|
||||
public static void ShowTipKnownIssues()
|
||||
{
|
||||
MessageBox.Show(string.Join(Environment.NewLine, new[] {
|
||||
"VPN 模式不能正常工作",
|
||||
"需要在 Wifi 或 流量 上手动设置代理地址,关闭时手动清除设置",
|
||||
"Android 7+ 不信任用户证书",
|
||||
}), "已知问题");
|
||||
}
|
||||
|
||||
void StartProxyButton_Click(bool start)
|
||||
=> ProxyForegroundService.StartOrStop(RequireActivity(), start);
|
||||
=> AndroidPlatformServiceImpl.StartOrStopForegroundService(
|
||||
RequireActivity(), nameof(ProxyService), start);
|
||||
|
||||
protected override bool OnClick(View view)
|
||||
{
|
||||
if (view.Id == Resource.Id.btnStartProxyService)
|
||||
{
|
||||
StartProxyButton_Click(true);
|
||||
const string KEY = "CommunityFixFragment_IsShowTip";
|
||||
var isShowTip = Preferences2.Get(KEY, false);
|
||||
if (!isShowTip)
|
||||
{
|
||||
ShowTipKnownIssues();
|
||||
Preferences2.Set(KEY, true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else if (view.Id == Resource.Id.btnStopProxyService)
|
||||
@@ -257,11 +243,7 @@ namespace System.Application.UI.Fragments
|
||||
|
||||
void InstallCertificate() => ViewModel!.ExportCertificateFile(cefFilePath =>
|
||||
{
|
||||
var dest = Path.Combine(IOPath.CacheDirectory, IHttpProxyService.CerFileName);
|
||||
File.Copy(cefFilePath, dest, true);
|
||||
// AppData 目录仅本 App 读写,Cache 目录可给予其他 App 读取权限
|
||||
GoToPlatformPages.OpenFile(RequireContext(),
|
||||
new(dest), MediaTypeNames.CER);
|
||||
GoToPlatformPages.InstallCertificate(RequireContext(), cefFilePath, IHttpProxyService.RootCertificateName);
|
||||
});
|
||||
|
||||
#if DEBUG
|
||||
@@ -271,7 +253,9 @@ namespace System.Application.UI.Fragments
|
||||
var s = IHttpProxyService.Instance;
|
||||
Xamarin.Android.Net.AndroidClientHandler handler = new();
|
||||
handler.Proxy = new WebProxy(s.ProxyIp.ToString(), s.ProxyPort);
|
||||
handler.AddTrustedCert(File.OpenRead(s.CerFilePath));
|
||||
var certFilePath = s.GetCerFilePathGeneratedWhenNoFileExists();
|
||||
if (certFilePath != null)
|
||||
handler.AddTrustedCert(File.OpenRead(certFilePath));
|
||||
using var client = new HttpClient(handler);
|
||||
using var rsp = await client.SendAsync(new HttpRequestMessage(HttpMethod.Get,
|
||||
"https://steamcommunity.com"));
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ namespace System.Application.UI.Fragments
|
||||
var state = value == null ? ViewStates.Gone : ViewStates.Visible;
|
||||
binding.ivCaptchaImage.Visibility = state;
|
||||
binding.layoutCaptcha.Visibility = state;
|
||||
binding.ivCaptchaImage.SetImageSource(value);
|
||||
binding.ivCaptchaImage.SetImageSource(value, Resource.Dimension.img_size_captcha_w, Resource.Dimension.img_size_captcha_h);
|
||||
}).AddTo(this);
|
||||
ViewModel!.WhenAnyValue(x => x.EmailDomain).SubscribeInMainThread(value =>
|
||||
{
|
||||
|
||||
@@ -32,7 +32,9 @@ namespace System.Application.UI.Fragments
|
||||
binding!.layoutNickName.SetMaxLength(ModelValidatorLengths.NickName);
|
||||
binding.tbNickName.SetMaxLength(ModelValidatorLengths.NickName);
|
||||
|
||||
ViewModel!.Close = () => RequireActivity().Finish();
|
||||
binding.btnUID.Text = $"UID: {ViewModel!.UID}";
|
||||
|
||||
ViewModel.Close = () => RequireActivity().Finish();
|
||||
|
||||
// Gender 双向绑定
|
||||
UIGender = ViewModel.Gender;
|
||||
@@ -182,7 +184,8 @@ namespace System.Application.UI.Fragments
|
||||
SetOnClickListener(
|
||||
binding.btnModifyPhoneNumber,
|
||||
binding.clickBirthDate,
|
||||
binding.btnSubmit);
|
||||
binding.btnSubmit,
|
||||
binding.btnUID);
|
||||
}
|
||||
|
||||
Gender gender;
|
||||
@@ -293,6 +296,11 @@ namespace System.Application.UI.Fragments
|
||||
ViewModel.Submit();
|
||||
return true;
|
||||
}
|
||||
else if (view.Id == Resource.Id.btnUID)
|
||||
{
|
||||
ViewModel.UIDCommand.Invoke();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return base.OnClick(view);
|
||||
}
|
||||
|
||||
@@ -33,17 +33,50 @@ namespace System.Application.UI
|
||||
|
||||
public static Picasso Picasso => _Picasso.Value;
|
||||
|
||||
#region 高效加载大型位图 https://developer.android.google.cn/topic/performance/graphics/load-bitmap?hl=zh-cn#java
|
||||
|
||||
public static void SetImageSource(this ImageView imageView,
|
||||
Stream? stream)
|
||||
Stream? stream,
|
||||
int targetResIdW = 0,
|
||||
int targetResIdH = 0,
|
||||
int targetW = 0,
|
||||
int targetH = 0,
|
||||
Bitmap.Config? inPreferredConfig = null)
|
||||
{
|
||||
if (stream == null)
|
||||
if (stream == null || !stream.CanRead)
|
||||
{
|
||||
imageView.SetImageDrawable(null);
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
var bitmap = BitmapFactory.DecodeStream(stream);
|
||||
Bitmap? bitmap = null;
|
||||
if (stream.CanSeek)
|
||||
{
|
||||
if (targetResIdW > 0)
|
||||
{
|
||||
if (targetResIdH <= 0) targetResIdH = targetResIdW;
|
||||
var resources = imageView.Resources!;
|
||||
var reqWidth = resources.GetDimensionPixelSize(targetResIdW);
|
||||
var reqHeight = resources.GetDimensionPixelSize(targetResIdH);
|
||||
bitmap = DecodeSampledBitmapFromStream(stream, reqWidth, reqHeight, inPreferredConfig);
|
||||
}
|
||||
else if (targetW > 0)
|
||||
{
|
||||
if (targetH <= 0) targetH = targetW;
|
||||
bitmap = DecodeSampledBitmapFromStream(stream, targetW, targetH, inPreferredConfig);
|
||||
}
|
||||
}
|
||||
bitmap ??= BitmapFactory.DecodeStream(stream)!;
|
||||
#if DEBUG
|
||||
Log.Info(TAG,
|
||||
$"Context: {imageView.Context!.GetType().Name}, " +
|
||||
$"Bitmap.Width: {bitmap.Width}, " +
|
||||
$"Bitmap.Height: {bitmap.Height}, " +
|
||||
$"Bitmap.Config: {bitmap.GetConfig()}, " +
|
||||
$"Bitmap.Size1: {IOPath.GetSizeString(bitmap.ByteCount)}, " +
|
||||
$"Bitmap.Size2: {IOPath.GetSizeString(bitmap.AllocationByteCount)}.");
|
||||
#endif
|
||||
imageView.SetImageBitmap(bitmap);
|
||||
}
|
||||
catch (Exception e)
|
||||
@@ -52,10 +85,57 @@ namespace System.Application.UI
|
||||
}
|
||||
}
|
||||
|
||||
static int CalculateInSampleSize(BitmapFactory.Options options, int reqWidth, int reqHeight)
|
||||
{
|
||||
// Raw height and width of image
|
||||
int height = options.OutHeight;
|
||||
int width = options.OutWidth;
|
||||
int inSampleSize = 1;
|
||||
|
||||
if (height > reqHeight || width > reqWidth)
|
||||
{
|
||||
int halfHeight = height / 2;
|
||||
int halfWidth = width / 2;
|
||||
|
||||
// Calculate the largest inSampleSize value that is a power of 2 and keeps both
|
||||
// height and width larger than the requested height and width.
|
||||
while ((halfHeight / inSampleSize) >= reqHeight
|
||||
&& (halfWidth / inSampleSize) >= reqWidth)
|
||||
{
|
||||
inSampleSize *= 2;
|
||||
}
|
||||
}
|
||||
|
||||
return inSampleSize;
|
||||
}
|
||||
|
||||
static Bitmap DecodeSampledBitmapFromStream(Stream stream, int reqWidth, int reqHeight, Bitmap.Config? inPreferredConfig = null)
|
||||
{
|
||||
// First decode with inJustDecodeBounds=true to check dimensions
|
||||
BitmapFactory.Options options = new();
|
||||
if (inPreferredConfig != null)
|
||||
{
|
||||
options.InPreferredConfig = inPreferredConfig;
|
||||
}
|
||||
options.InJustDecodeBounds = true;
|
||||
BitmapFactory.DecodeStream(stream, null, options);
|
||||
|
||||
// Calculate inSampleSize
|
||||
options.InSampleSize = CalculateInSampleSize(options, reqWidth, reqHeight);
|
||||
|
||||
// Decode bitmap with inSampleSize set
|
||||
options.InJustDecodeBounds = false;
|
||||
stream.Position = 0;
|
||||
return BitmapFactory.DecodeStream(stream, null, options)!;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public static void SetImageSource(this ImageView imageView,
|
||||
string? requestUri,
|
||||
int targetSize = 0,
|
||||
int targetResId = 0,
|
||||
//int targetSize = 0,
|
||||
int targetResIdW,
|
||||
int targetResIdH = 0,
|
||||
ScaleType scaleType = default)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(requestUri))
|
||||
@@ -72,14 +152,16 @@ namespace System.Application.UI
|
||||
.Placeholder(placeholder)
|
||||
.Error(errorDrawable);
|
||||
var useCenterCropDefault = false;
|
||||
if (targetSize > 0)
|
||||
//if (targetSize > 0)
|
||||
//{
|
||||
// requestCreator = requestCreator.Resize(targetSize, targetSize);
|
||||
// useCenterCropDefault = true;
|
||||
//}
|
||||
//else
|
||||
if (targetResIdW > 0)
|
||||
{
|
||||
requestCreator = requestCreator.Resize(targetSize, targetSize);
|
||||
useCenterCropDefault = true;
|
||||
}
|
||||
else if (targetResId > 0)
|
||||
{
|
||||
requestCreator = requestCreator.ResizeDimen(targetResId, targetResId);
|
||||
if (targetResIdH <= 0) targetResIdH = targetResIdW;
|
||||
requestCreator = requestCreator.ResizeDimen(targetResIdW, targetResIdH);
|
||||
useCenterCropDefault = true;
|
||||
}
|
||||
if (scaleType == ScaleType.CenterCrop || (useCenterCropDefault && scaleType == default))
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<Identity
|
||||
Name="4651ED44255E.47979655102CE"
|
||||
Publisher="CN=A90E406B-B2D3-4A23-B061-0FA1D65C4F66"
|
||||
Version="2.6.5.0" />
|
||||
Version="2.6.9.0" />
|
||||
|
||||
<Properties>
|
||||
<DisplayName>Steam++</DisplayName>
|
||||
|
||||
@@ -22,12 +22,13 @@
|
||||
<Application.Styles>
|
||||
<!--<FluentTheme Mode="Dark" />-->
|
||||
<sty:FluentAvaloniaTheme RequestedTheme="Dark"
|
||||
DefaultToUserTheme="False"
|
||||
GetUserAccentColor="False"
|
||||
UseSegoeUIOnWindows="True"/>
|
||||
UseUserAccentColorOnWindows="False"
|
||||
UseSystemFontOnWindows="False"
|
||||
UseSystemThemeOnWindows="False"/>
|
||||
|
||||
<StyleInclude Source="avares://System.Application.SteamTools.Client.Avalonia/Application/UI/Styles/ThemeDark.xaml" />
|
||||
<StyleInclude Source="avares://System.Application.SteamTools.Client.Avalonia/Application/UI/Styles/ThemeAccent.xaml" />
|
||||
|
||||
|
||||
<!--<StyleInclude Source="avares://Avalonia.Controls.DataGrid/Themes/Fluent.xaml"/>-->
|
||||
<!--<StyleInclude Source="avares://AvaloniaEdit/AvaloniaEdit.xaml"/>-->
|
||||
|
||||
|
||||
@@ -152,13 +152,13 @@ namespace System.Application.UI
|
||||
if (OperatingSystem2.IsWindows)
|
||||
{
|
||||
if (OperatingSystem2.IsWindowsVersionAtLeast(6, 2))
|
||||
thm.GetUserAccentColor = true;
|
||||
thm.UseUserAccentColorOnWindows = true;
|
||||
else
|
||||
thm.GetUserAccentColor = false;
|
||||
thm.UseUserAccentColorOnWindows = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
thm.GetUserAccentColor = true;
|
||||
thm.UseUserAccentColorOnWindows = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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>FRAMEWORK_DEPENDENT;PUBLISH;WINDOWS;$(DefineConstants)</DefineConstants>
|
||||
<Configuration>Debug</Configuration>
|
||||
<PublishDir>bin\Debug\Publish\FrameworkDependent\win-arm64</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
|
||||
<Platform>ARM64</Platform>
|
||||
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
|
||||
<SelfContained>false</SelfContained>
|
||||
<!-- C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets -->
|
||||
<!-- Delete <NETSdkError ... ResourceName="SingleFileWin7Incompatible" ... /> -->
|
||||
<!-- https://github.com/dotnet/sdk/issues/16499 -->
|
||||
<!-- https://github.com/dotnet/sdk/pull/19439/files#diff-a34c0c3c174905dc5ce1e883006893f45b46b08fcac6ba51535c464cb952c6a2R162 -->
|
||||
<!-- https://www.nuget.org/packages/runtime.win7-x64.Microsoft.NETCore.Windows.ApiSets -->
|
||||
<!--“GenerateBundle”任务意外失败。-->
|
||||
<!--System.IO.IOException: 文件“bin\Release\Publish\win-x64\Steam++.exe”正由另一进程使用,因此该进程无法访问此文件。-->
|
||||
<PublishSingleFile>false</PublishSingleFile>
|
||||
<PublishReadyToRun>false</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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>FRAMEWORK_DEPENDENT;PUBLISH;PUBLISH_WIN7;WINDOWS;$(DefineConstants)</DefineConstants>
|
||||
<Configuration>Debug</Configuration>
|
||||
<PublishDir>bin\Debug\Publish\FrameworkDependent\win-x86</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<RuntimeIdentifier>win7-x86</RuntimeIdentifier>
|
||||
<Platform>x86</Platform>
|
||||
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
|
||||
<SelfContained>false</SelfContained>
|
||||
<!-- C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets -->
|
||||
<!-- Delete <NETSdkError ... ResourceName="SingleFileWin7Incompatible" ... /> -->
|
||||
<!-- https://github.com/dotnet/sdk/issues/16499 -->
|
||||
<!-- https://github.com/dotnet/sdk/pull/19439/files#diff-a34c0c3c174905dc5ce1e883006893f45b46b08fcac6ba51535c464cb952c6a2R162 -->
|
||||
<!-- https://www.nuget.org/packages/runtime.win7-x64.Microsoft.NETCore.Windows.ApiSets -->
|
||||
<!--“GenerateBundle”任务意外失败。-->
|
||||
<!--System.IO.IOException: 文件“bin\Release\Publish\win-x64\Steam++.exe”正由另一进程使用,因此该进程无法访问此文件。-->
|
||||
<PublishSingleFile>false</PublishSingleFile>
|
||||
<PublishReadyToRun>false</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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;$(DefineConstants)</DefineConstants>
|
||||
<Configuration>Debug</Configuration>
|
||||
<PublishDir>bin\Debug\Publish\win-arm64</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
|
||||
<Platform>ARM64</Platform>
|
||||
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
|
||||
<SelfContained>true</SelfContained>
|
||||
<!-- C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets -->
|
||||
<!-- Delete <NETSdkError ... ResourceName="SingleFileWin7Incompatible" ... /> -->
|
||||
<!-- https://github.com/dotnet/sdk/issues/16499 -->
|
||||
<!-- https://github.com/dotnet/sdk/pull/19439/files#diff-a34c0c3c174905dc5ce1e883006893f45b46b08fcac6ba51535c464cb952c6a2R162 -->
|
||||
<!-- https://www.nuget.org/packages/runtime.win7-x64.Microsoft.NETCore.Windows.ApiSets -->
|
||||
<!--“GenerateBundle”任务意外失败。-->
|
||||
<!--System.IO.IOException: 文件“bin\Release\Publish\win-x64\Steam++.exe”正由另一进程使用,因此该进程无法访问此文件。-->
|
||||
<PublishSingleFile>false</PublishSingleFile>
|
||||
<PublishReadyToRun>false</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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;PUBLISH_WIN7;WINDOWS;$(DefineConstants)</DefineConstants>
|
||||
<Configuration>Debug</Configuration>
|
||||
<PublishDir>bin\Debug\Publish\win-x86</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<RuntimeIdentifier>win7-x86</RuntimeIdentifier>
|
||||
<Platform>x86</Platform>
|
||||
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
|
||||
<SelfContained>true</SelfContained>
|
||||
<!-- C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets -->
|
||||
<!-- Delete <NETSdkError ... ResourceName="SingleFileWin7Incompatible" ... /> -->
|
||||
<!-- https://github.com/dotnet/sdk/issues/16499 -->
|
||||
<!-- https://github.com/dotnet/sdk/pull/19439/files#diff-a34c0c3c174905dc5ce1e883006893f45b46b08fcac6ba51535c464cb952c6a2R162 -->
|
||||
<!-- https://www.nuget.org/packages/runtime.win7-x64.Microsoft.NETCore.Windows.ApiSets -->
|
||||
<!--“GenerateBundle”任务意外失败。-->
|
||||
<!--System.IO.IOException: 文件“bin\Release\Publish\win-x64\Steam++.exe”正由另一进程使用,因此该进程无法访问此文件。-->
|
||||
<PublishSingleFile>false</PublishSingleFile>
|
||||
<PublishReadyToRun>false</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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>FRAMEWORK_DEPENDENT;PUBLISH;WINDOWS;$(DefineConstants)</DefineConstants>
|
||||
<Configuration>Release</Configuration>
|
||||
<PublishDir>bin\Release\Publish\FrameworkDependent\win-arm64</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
|
||||
<Platform>ARM64</Platform>
|
||||
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
|
||||
<SelfContained>false</SelfContained>
|
||||
<!-- C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets -->
|
||||
<!-- Delete <NETSdkError ... ResourceName="SingleFileWin7Incompatible" ... /> -->
|
||||
<!-- https://github.com/dotnet/sdk/issues/16499 -->
|
||||
<!-- https://github.com/dotnet/sdk/pull/19439/files#diff-a34c0c3c174905dc5ce1e883006893f45b46b08fcac6ba51535c464cb952c6a2R162 -->
|
||||
<!-- https://www.nuget.org/packages/runtime.win7-x64.Microsoft.NETCore.Windows.ApiSets -->
|
||||
<!--“GenerateBundle”任务意外失败。-->
|
||||
<!--System.IO.IOException: 文件“bin\Release\Publish\win-x64\Steam++.exe”正由另一进程使用,因此该进程无法访问此文件。-->
|
||||
<PublishSingleFile>false</PublishSingleFile>
|
||||
<PublishReadyToRun>false</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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>FRAMEWORK_DEPENDENT;PUBLISH;PUBLISH_WIN7;WINDOWS;$(DefineConstants)</DefineConstants>
|
||||
<Configuration>Release</Configuration>
|
||||
<PublishDir>bin\Release\Publish\FrameworkDependent\win-x86</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<RuntimeIdentifier>win7-x86</RuntimeIdentifier>
|
||||
<Platform>x86</Platform>
|
||||
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
|
||||
<SelfContained>false</SelfContained>
|
||||
<!-- C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets -->
|
||||
<!-- Delete <NETSdkError ... ResourceName="SingleFileWin7Incompatible" ... /> -->
|
||||
<!-- https://github.com/dotnet/sdk/issues/16499 -->
|
||||
<!-- https://github.com/dotnet/sdk/pull/19439/files#diff-a34c0c3c174905dc5ce1e883006893f45b46b08fcac6ba51535c464cb952c6a2R162 -->
|
||||
<!-- https://www.nuget.org/packages/runtime.win7-x64.Microsoft.NETCore.Windows.ApiSets -->
|
||||
<!--“GenerateBundle”任务意外失败。-->
|
||||
<!--System.IO.IOException: 文件“bin\Release\Publish\win-x64\Steam++.exe”正由另一进程使用,因此该进程无法访问此文件。-->
|
||||
<PublishSingleFile>false</PublishSingleFile>
|
||||
<PublishReadyToRun>false</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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;$(DefineConstants)</DefineConstants>
|
||||
<Configuration>Release</Configuration>
|
||||
<PublishDir>bin\Release\Publish\win-arm64</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<RuntimeIdentifier>win10-arm64</RuntimeIdentifier>
|
||||
<Platform>ARM64</Platform>
|
||||
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
|
||||
<SelfContained>true</SelfContained>
|
||||
<!-- C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets -->
|
||||
<!-- Delete <NETSdkError ... ResourceName="SingleFileWin7Incompatible" ... /> -->
|
||||
<!-- https://github.com/dotnet/sdk/issues/16499 -->
|
||||
<!-- https://github.com/dotnet/sdk/pull/19439/files#diff-a34c0c3c174905dc5ce1e883006893f45b46b08fcac6ba51535c464cb952c6a2R162 -->
|
||||
<!-- https://www.nuget.org/packages/runtime.win7-x64.Microsoft.NETCore.Windows.ApiSets -->
|
||||
<!--“GenerateBundle”任务意外失败。-->
|
||||
<!--System.IO.IOException: 文件“bin\Release\Publish\win-x64\Steam++.exe”正由另一进程使用,因此该进程无法访问此文件。-->
|
||||
<PublishSingleFile>false</PublishSingleFile>
|
||||
<PublishReadyToRun>false</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?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;PUBLISH_WIN7;WINDOWS;$(DefineConstants)</DefineConstants>
|
||||
<Configuration>Release</Configuration>
|
||||
<PublishDir>bin\Release\Publish\win-x86</PublishDir>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<RuntimeIdentifier>win7-x86</RuntimeIdentifier>
|
||||
<Platform>x86</Platform>
|
||||
<TargetFramework>net6.0-windows10.0.19041.0</TargetFramework>
|
||||
<SelfContained>true</SelfContained>
|
||||
<!-- C:\Program Files\dotnet\sdk\6.0.101\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets -->
|
||||
<!-- Delete <NETSdkError ... ResourceName="SingleFileWin7Incompatible" ... /> -->
|
||||
<!-- https://github.com/dotnet/sdk/issues/16499 -->
|
||||
<!-- https://github.com/dotnet/sdk/pull/19439/files#diff-a34c0c3c174905dc5ce1e883006893f45b46b08fcac6ba51535c464cb952c6a2R162 -->
|
||||
<!-- https://www.nuget.org/packages/runtime.win7-x64.Microsoft.NETCore.Windows.ApiSets -->
|
||||
<!--“GenerateBundle”任务意外失败。-->
|
||||
<!--System.IO.IOException: 文件“bin\Release\Publish\win-x64\Steam++.exe”正由另一进程使用,因此该进程无法访问此文件。-->
|
||||
<PublishSingleFile>false</PublishSingleFile>
|
||||
<PublishReadyToRun>false</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -119,7 +119,13 @@
|
||||
<ProjectReference Include="..\Avalonia.X11\Avalonia.X11.csproj" />
|
||||
<ProjectReference Include="..\Avalonia.Native\Avalonia.Native.csproj" />
|
||||
<ProjectReference Include="..\ST.Client.Desktop.Windows\ST.Client.Windows.csproj" />
|
||||
<None Include="..\..\references\7z.dll">
|
||||
<None Include="..\..\references\7z.dll" Condition=" '$(Platform)' != 'x86' And '$(Platform)' != 'ARM64' ">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="..\..\references\x86\7z.dll" Condition=" '$(Platform)' == 'x86' ">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="..\..\references\ARM64\7z.dll" Condition=" '$(Platform)' == 'ARM64' ">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.19041.22" TargetingPackVersion="10.0.19041.22" />
|
||||
|
||||
@@ -22,9 +22,9 @@ namespace System.Application.Converters
|
||||
if (!string.IsNullOrEmpty(para))
|
||||
{
|
||||
if (string.Equals(para, Size, StringComparison.OrdinalIgnoreCase)
|
||||
&& double.TryParse(str, out double b))
|
||||
&& decimal.TryParse(str, out var num))
|
||||
{
|
||||
(var length, string unit) = IOPath.GetSize(b);
|
||||
(var length, string unit) = IOPath.GetSize(num);
|
||||
if (length == 0)
|
||||
return "0 B";
|
||||
return $"{length:###,###.##} {unit}";
|
||||
|
||||
+3
-3
@@ -155,9 +155,9 @@ namespace System.Application.Services.Implementation
|
||||
}
|
||||
break;
|
||||
|
||||
case WM.ACTIVATE:
|
||||
EnsureExtended();
|
||||
break;
|
||||
//case WM.ACTIVATE:
|
||||
// EnsureExtended();
|
||||
// break;
|
||||
|
||||
case WM.NCMOUSEMOVE:
|
||||
if (_fakingMaximizeButton)
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 172 KiB |
@@ -97,7 +97,4 @@
|
||||
<Setter Property="Background" Value="#3fffffff" />
|
||||
</Style>
|
||||
|
||||
<Style Selector="ui|CommandBar:labelbottom /template/ Popup#OverflowPopup">
|
||||
<Setter Property="VerticalOffset" Value="16" />
|
||||
</Style>
|
||||
</Styles>
|
||||
|
||||
+7
-1
@@ -98,6 +98,11 @@
|
||||
<ItemsRepeater.ItemTemplate>
|
||||
<DataTemplate>
|
||||
<Border Padding="10"
|
||||
Background="{DynamicResource ControlFillColorDefaultBrush}"
|
||||
BorderBrush="{DynamicResource CardStrokeColorDefaultBrush}"
|
||||
BorderThickness="1"
|
||||
CornerRadius="{StaticResource OverlayCornerRadius}"
|
||||
MinWidth="200"
|
||||
MaxWidth="300">
|
||||
<DockPanel>
|
||||
<!--<gif:Image2 Source="{Binding Avatar,Converter={StaticResource GuidToUrlConverter}}"
|
||||
@@ -186,7 +191,8 @@
|
||||
<StackPanel DockPanel.Dock="Right"
|
||||
Spacing="5"
|
||||
Margin="10">
|
||||
<controls:ScrollingTextBlock Text="{Binding Name}" Classes="h6 semibold" Foreground="#D22222"/>
|
||||
<controls:ScrollingTextBlock Text="{Binding Name}" Classes="h6 semibold"/>
|
||||
<!--Foreground="#D22222"-->
|
||||
<!--<controls:ScrollingTextBlock Text="{Binding Amount,Converter={StaticResource StringFormatConverter},ConverterParameter={ReflectionBinding CurrencyCode}}"/>-->
|
||||
<controls:ScrollingTextBlock>
|
||||
<controls:ScrollingTextBlock.Text>
|
||||
|
||||
+98
-108
@@ -13,120 +13,110 @@
|
||||
x:DataType="vm:AboutPageViewModel"
|
||||
x:CompileBindings="True"
|
||||
x:Class="System.Application.UI.Views.Pages.About_SoftwarePage">
|
||||
<UserControl.Styles>
|
||||
<Style Selector="TextBlock#LogoText1">
|
||||
<Style.Animations>
|
||||
<Animation Delay="0.3" Duration="0.37" Easing="{StaticResource FluentEasing}">
|
||||
<KeyFrame Cue="0%">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
<Setter Property="(TranslateTransform.Y)" Value="12" />
|
||||
</KeyFrame>
|
||||
<KeyFrame Cue="100%">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
<Setter Property="(TranslateTransform.Y)" Value="0" />
|
||||
</KeyFrame>
|
||||
</Animation>
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
<Style Selector="TextBlock#LogoText2">
|
||||
<Style.Animations>
|
||||
<Animation Delay="0.32" Duration="0.37" Easing="{StaticResource FluentEasing}">
|
||||
<KeyFrame Cue="0%">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
<Setter Property="(TranslateTransform.Y)" Value="-12" />
|
||||
</KeyFrame>
|
||||
<KeyFrame Cue="100%">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
<Setter Property="(TranslateTransform.Y)" Value="0" />
|
||||
</KeyFrame>
|
||||
</Animation>
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
<Style Selector="TextBlock#LogoText3">
|
||||
<Setter Property="Foreground" Value="{DynamicResource SystemAccentColor}" />
|
||||
<Setter Property="RenderTransformOrigin" Value="50%,50%" />
|
||||
<Style.Animations>
|
||||
<Animation Delay="0.34" Duration="0.37" Easing="{StaticResource FluentEasing}">
|
||||
<KeyFrame Cue="0%">
|
||||
<Setter Property="Opacity" Value="0" />
|
||||
<Setter Property="(ScaleTransform.ScaleX)" Value="0.80" />
|
||||
<Setter Property="(ScaleTransform.ScaleY)" Value="0.80" />
|
||||
</KeyFrame>
|
||||
<KeyFrame Cue="100%">
|
||||
<Setter Property="Opacity" Value="1" />
|
||||
<Setter Property="(ScaleTransform.ScaleX)" Value="1" />
|
||||
<Setter Property="(ScaleTransform.ScaleY)" Value="1" />
|
||||
</KeyFrame>
|
||||
</Animation>
|
||||
</Style.Animations>
|
||||
</Style>
|
||||
<Style Selector="TextBlock.LinkSeparatorPadding">
|
||||
<Setter Property="Margin" Value="5 -0.5" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
</Style>
|
||||
<Style Selector="TextBlock.Header">
|
||||
<Setter Property="FontWeight" Value="Regular" />
|
||||
</Style>
|
||||
<Style Selector="TextBox.Content">
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="VerticalAlignment" Value="Center" />
|
||||
<Setter Property="VerticalContentAlignment" Value="Center" />
|
||||
</Style>
|
||||
</UserControl.Styles>
|
||||
<ScrollViewer HorizontalScrollBarVisibility="Disabled"
|
||||
VerticalScrollBarVisibility="Auto">
|
||||
|
||||
<StackPanel Classes="Settings">
|
||||
|
||||
|
||||
<Grid Margin="0 0 0 10"
|
||||
ColumnDefinitions="*,Auto" RowDefinitions="*,Auto">
|
||||
|
||||
<DockPanel x:Name="LogoPanel">
|
||||
<Image Source="/Application/UI/Assets/Icon.ico"
|
||||
DockPanel.Dock="Left"
|
||||
Height="78"/>
|
||||
|
||||
<StackPanel Spacing="0" Margin="12 0">
|
||||
<TextBlock Text="Steam++"
|
||||
Classes="TitleTextBlockStyle"/>
|
||||
|
||||
<TextBlock Text="{Binding VersionDisplay}"
|
||||
Classes="BodyTextBlockStyle"/>
|
||||
|
||||
<TextBlock Text="GPLv3 License"
|
||||
Classes="CaptionTextBlockStyle"/>
|
||||
|
||||
<TextBlock Classes="CaptionTextBlockStyle"
|
||||
Text="https://github.com/BeyondDimension/SteamTools"
|
||||
Foreground="{DynamicResource TextFillColorSecondaryBrush}"/>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
|
||||
|
||||
<DockPanel Name="HeaderRightContent" Grid.Column="1" Opacity="1">
|
||||
<DockPanel.RenderTransform>
|
||||
<TranslateTransform X="0" Y="0" />
|
||||
</DockPanel.RenderTransform>
|
||||
<Image Source="/Application/UI/Assets/avalonia-logo.ico"
|
||||
DockPanel.Dock="Left"
|
||||
Height="48"/>
|
||||
|
||||
<StackPanel Margin="12 0"
|
||||
VerticalAlignment="Center">
|
||||
<TextBlock Text="Avalonia"
|
||||
Classes="SubtitleTextBlockStyle"/>
|
||||
|
||||
<TextBlock x:Name="AvaloniaVersionTextBlock"
|
||||
Classes="CaptionTextBlockStyle"
|
||||
Foreground="{DynamicResource TextFillColorSecondaryBrush}"/>
|
||||
|
||||
<TextBlock Text="https://github.com/AvaloniaUI/Avalonia"
|
||||
Classes="CaptionTextBlockStyle"
|
||||
Foreground="{DynamicResource TextFillColorSecondaryBrush}"/>
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Button Classes="plain"
|
||||
Command="{Binding CheckUpdateCommand}">
|
||||
<Border Classes="Item">
|
||||
<DockPanel>
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.CheckUpdate,Source={x:Static resx:R.Current},Mode=OneWay}"/>
|
||||
|
||||
<ui:SymbolIcon Classes="right"
|
||||
Symbol="Open"
|
||||
FontSize="24"/>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Button>
|
||||
|
||||
<Button Classes="plain"
|
||||
IsVisible="{x:Static sys:DesktopBridge.IsRunningAsUwp}"
|
||||
Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.MicrosoftStoreReviewLink}">
|
||||
<Border Classes="Item">
|
||||
<DockPanel>
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.About_AppReview,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
|
||||
<ui:SymbolIcon Classes="right"
|
||||
Symbol="Open"
|
||||
FontSize="24"/>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Button>
|
||||
|
||||
<Button Classes="plain"
|
||||
Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.ChangeLogLink}">
|
||||
<Border Classes="Item">
|
||||
<DockPanel>
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.About_UpdateLog,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
|
||||
<ui:SymbolIcon Classes="right"
|
||||
Symbol="Open"
|
||||
FontSize="24"/>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Button>
|
||||
|
||||
<Expander>
|
||||
<Expander.Header>
|
||||
<StackPanel x:Name="LogoPanel"
|
||||
VerticalAlignment="Center"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Name="LogoText1" Classes="h2 light">Steam++</TextBlock>
|
||||
<Panel Width="5" Height="5" />
|
||||
<TextBlock Name="LogoText2" Classes="h2 light">Tools</TextBlock>
|
||||
<Panel Width="10" Height="10" />
|
||||
<TextBlock Name="LogoText3" Classes="h2 ultrabold">2.0</TextBlock>
|
||||
</StackPanel>
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.About_Contactus,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
VerticalAlignment="Center"/>
|
||||
</Expander.Header>
|
||||
<StackPanel Orientation="Vertical" Spacing="15">
|
||||
<!--<StackPanel x:Name="LogoPanel"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Name="LogoText1" Classes="h1 light">Steam++</TextBlock>
|
||||
<Panel Width="5" Height="5" />
|
||||
<TextBlock Name="LogoText2" Classes="h1 light">Tools</TextBlock>
|
||||
<Panel Width="10" Height="10" />
|
||||
<TextBlock Name="LogoText3" Classes="h1 ultrabold">2.0</TextBlock>
|
||||
</StackPanel>-->
|
||||
|
||||
<StackPanel Orientation="Horizontal" Spacing="6">
|
||||
<TextBlock Classes="Header light"
|
||||
Text="{Binding LabelVersionDisplay,Mode=OneTime}"
|
||||
VerticalAlignment="Center"/>
|
||||
<TextBox Classes="Content readonlybox"
|
||||
IsReadOnly="True"
|
||||
MinWidth="10"
|
||||
Text="{Binding VersionDisplay,Mode=OneTime}"/>
|
||||
<Button Classes="Hyperlink"
|
||||
Content="{ReflectionBinding Path=Res.CheckUpdate,Source={x:Static resx:R.Current},Mode=OneWay}"
|
||||
Command="{Binding CheckUpdateCommand}"
|
||||
VerticalAlignment="Center"
|
||||
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"/>
|
||||
<Button Classes="Hyperlink"
|
||||
IsVisible="{x:Static sys:DesktopBridge.IsRunningAsUwp}"
|
||||
Content="{ReflectionBinding Path=Res.About_AppReview,Mode=OneWay,Source={x:Static resx:R.Current}}"
|
||||
Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.MicrosoftStoreReviewLink}"
|
||||
VerticalAlignment="Center"
|
||||
VerticalContentAlignment="Center"/>
|
||||
</StackPanel>
|
||||
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<TextBlock Classes="Header light"
|
||||
Margin="0,0,6,0"
|
||||
@@ -170,7 +160,7 @@
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.CliencerLink}"/>
|
||||
</StackPanel>
|
||||
|
||||
<WrapPanel>
|
||||
<!--<WrapPanel>
|
||||
<TextBlock Margin=" 0 0 6 -0.5"
|
||||
VerticalAlignment="Center"
|
||||
Text="This open source software is licensed with " />
|
||||
@@ -180,7 +170,7 @@
|
||||
Command="{Binding OpenBrowserCommand}"
|
||||
CommandParameter="{x:Static vm:AboutPageViewModel.LicenseLink}"/>
|
||||
</StackPanel>
|
||||
</WrapPanel>
|
||||
</WrapPanel>-->
|
||||
</StackPanel>
|
||||
</Expander>
|
||||
|
||||
|
||||
+7
-1
@@ -14,11 +14,17 @@ namespace System.Application.UI.Views.Pages
|
||||
{
|
||||
AvaloniaXamlLoader.Load(this);
|
||||
|
||||
var logoPanel = this.FindControl<StackPanel>("LogoPanel");
|
||||
var logoPanel = this.FindControl<DockPanel>("LogoPanel");
|
||||
if (logoPanel != null)
|
||||
{
|
||||
logoPanel.Tapped += (_, _) => AboutAppInfoPopup.OnClick();
|
||||
}
|
||||
|
||||
var avaloniaVersion = this.FindControl<TextBlock>("AvaloniaVersionTextBlock");
|
||||
if (avaloniaVersion != null)
|
||||
{
|
||||
avaloniaVersion.Text = typeof(Avalonia.Application).Assembly.GetName().Version?.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+20
-3
@@ -38,10 +38,27 @@
|
||||
<Border Classes="Item">
|
||||
<DockPanel>
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.ASF_OpenWebUIGlobalConfig,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Button>
|
||||
|
||||
<ui:SymbolIcon Classes="right"
|
||||
Symbol="Open"
|
||||
FontSize="24"/>
|
||||
<Button Classes="plain"
|
||||
Command="{ReflectionBinding SetEncryptionKey}">
|
||||
<Border Classes="Item">
|
||||
<DockPanel>
|
||||
<StackPanel>
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.ASF_SetCryptKey,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
<TextBlock Classes="prompt" Text="ASF_CRYPTKEY" />
|
||||
</StackPanel>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Button>
|
||||
|
||||
<Button Classes="plain"
|
||||
Command="{ReflectionBinding SelectBotFiles}">
|
||||
<Border Classes="Item">
|
||||
<DockPanel>
|
||||
<TextBlock Text="{ReflectionBinding Path=Res.ASF_ImportBotFile,Mode=OneWay,Source={x:Static resx:R.Current}}"/>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
</Button>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user