mirror of
https://github.com/2dust/v2rayN.git
synced 2026-05-30 01:34:08 +00:00
Modernize .NET 10 dependency stack
Replace ReactiveUI.Fody with ReactiveUI.SourceGenerators, migrate reactive properties, and remove Fody weaver configuration. Move SQLite from SQLitePCLRaw.bundle_green to SQLitePCLRaw 3.x using config.e_sqlite3 and SourceGear.sqlite3 with explicit initialization. Update related package versions, set invariant xUnit culture, and refresh RHEL RISC-V packaging versions.
This commit is contained in:
parent
9e62b1d6fe
commit
3b39da124c
39 changed files with 289 additions and 287 deletions
|
|
@ -38,7 +38,7 @@ DOTNET_RISCV_BASE="https://github.com/filipnavara/dotnet-riscv/releases/download
|
|||
DOTNET_RISCV_FILE="dotnet-sdk-${DOTNET_RISCV_VERSION}-linux-riscv64.tar.gz"
|
||||
DOTNET_SDK_URL="${DOTNET_RISCV_BASE}/${DOTNET_RISCV_VERSION}/${DOTNET_RISCV_FILE}"
|
||||
SKIA_VER="${SKIA_VER:-3.119.2}"
|
||||
HARFBUZZ_VER="${HARFBUZZ_VER:-8.3.1.1}"
|
||||
HARFBUZZ_VER="${HARFBUZZ_VER:-8.3.1.3}"
|
||||
|
||||
# If the first argument starts with --, do not treat it as a version number
|
||||
if [[ "${VERSION_ARG:-}" == --* ]]; then
|
||||
|
|
@ -111,9 +111,9 @@ build_sqlite_native_riscv64() {
|
|||
mkdir -p "$outdir"
|
||||
workdir="$(mktemp -d)"
|
||||
|
||||
# SQLite 3.51.3 amalgamation
|
||||
# SQLite 3.53.0 amalgamation
|
||||
sqlite_year="2026"
|
||||
sqlite_ver="3510300"
|
||||
sqlite_ver="3530000"
|
||||
sqlite_zip="sqlite-amalgamation-${sqlite_ver}.zip"
|
||||
|
||||
echo "[+] Download SQLite amalgamation: ${sqlite_zip}"
|
||||
|
|
|
|||
|
|
@ -7,32 +7,33 @@
|
|||
<ItemGroup>
|
||||
<PackageVersion Include="Avalonia.AvaloniaEdit" Version="11.4.1" />
|
||||
<PackageVersion Include="Avalonia.Controls.DataGrid" Version="11.3.13" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="11.3.13" />
|
||||
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.13" />
|
||||
<PackageVersion Include="Avalonia.Desktop" Version="11.3.14" />
|
||||
<PackageVersion Include="Avalonia.Diagnostics" Version="11.3.14" />
|
||||
<PackageVersion Include="AwesomeAssertions" Version="9.4.0" />
|
||||
<PackageVersion Include="DialogHost.Avalonia" Version="0.11.0" />
|
||||
<PackageVersion Include="ReactiveUI.Avalonia" Version="11.4.12" />
|
||||
<PackageVersion Include="CliWrap" Version="3.10.1" />
|
||||
<PackageVersion Include="Downloader" Version="5.2.0" />
|
||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.4.0" />
|
||||
<PackageVersion Include="Downloader" Version="5.4.0" />
|
||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.5.1" />
|
||||
<PackageVersion Include="H.NotifyIcon.Wpf" Version="2.4.1" />
|
||||
<PackageVersion Include="MaterialDesignThemes" Version="5.3.1" />
|
||||
<PackageVersion Include="MaterialDesignThemes" Version="5.3.2" />
|
||||
<PackageVersion Include="QRCoder" Version="1.8.0" />
|
||||
<PackageVersion Include="ReactiveUI" Version="23.2.1" />
|
||||
<PackageVersion Include="ReactiveUI.Fody" Version="19.5.41" />
|
||||
<PackageVersion Include="ReactiveUI.WPF" Version="23.2.1" />
|
||||
<PackageVersion Include="Semi.Avalonia" Version="11.3.7.3" />
|
||||
<PackageVersion Include="ReactiveUI" Version="23.2.19" />
|
||||
<PackageVersion Include="ReactiveUI.SourceGenerators" Version="2.6.30" />
|
||||
<PackageVersion Include="ReactiveUI.WPF" Version="23.2.19" />
|
||||
<PackageVersion Include="Semi.Avalonia" Version="11.3.14" />
|
||||
<PackageVersion Include="Semi.Avalonia.AvaloniaEdit" Version="11.2.0.2" />
|
||||
<PackageVersion Include="Semi.Avalonia.DataGrid" Version="11.3.7.3" />
|
||||
<PackageVersion Include="SQLitePCLRaw.bundle_green" Version="2.1.11" />
|
||||
<PackageVersion Include="SQLitePCLRaw.config.e_sqlite3" Version="3.0.2" />
|
||||
<PackageVersion Include="SourceGear.sqlite3" Version="3.50.4.5" />
|
||||
<PackageVersion Include="NLog" Version="6.1.2" />
|
||||
<PackageVersion Include="sqlite-net-pcl" Version="1.9.172" />
|
||||
<PackageVersion Include="sqlite-net-base" Version="1.9.172" />
|
||||
<PackageVersion Include="TaskScheduler" Version="2.12.2" />
|
||||
<PackageVersion Include="Tmds.DBus.Protocol" Version="0.21.3" />
|
||||
<PackageVersion Include="Tmds.DBus.Protocol" Version="0.93.0" />
|
||||
<PackageVersion Include="WebDav.Client" Version="2.9.0" />
|
||||
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
|
||||
<PackageVersion Include="xunit.v3" Version="3.2.2" />
|
||||
<PackageVersion Include="YamlDotNet" Version="16.3.0" />
|
||||
<PackageVersion Include="ZXing.Net.Bindings.SkiaSharp" Version="0.16.14" />
|
||||
<PackageVersion Include="YamlDotNet" Version="17.1.0" />
|
||||
<PackageVersion Include="ZXing.Net.Bindings.SkiaSharp" Version="0.16.22" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
|||
|
|
@ -20,4 +20,8 @@
|
|||
<ProjectReference Include="..\ServiceLib\ServiceLib.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="xunit.runner.json" CopyToOutputDirectory="PreserveNewest" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
|||
4
v2rayN/ServiceLib.Tests/xunit.runner.json
Normal file
4
v2rayN/ServiceLib.Tests/xunit.runner.json
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
|
||||
"culture": "invariant"
|
||||
}
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<ReactiveUI />
|
||||
</Weavers>
|
||||
|
|
@ -19,7 +19,7 @@ global using System.Text.RegularExpressions;
|
|||
global using DynamicData;
|
||||
global using DynamicData.Binding;
|
||||
global using ReactiveUI;
|
||||
global using ReactiveUI.Fody.Helpers;
|
||||
global using ReactiveUI.SourceGenerators;
|
||||
global using ServiceLib.Base;
|
||||
global using ServiceLib.Common;
|
||||
global using ServiceLib.Enums;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,11 @@ public sealed class SQLiteHelper
|
|||
private SQLiteAsyncConnection _dbAsync;
|
||||
private readonly string _configDB = "guiNDB.db";
|
||||
|
||||
static SQLiteHelper()
|
||||
{
|
||||
SQLitePCL.Batteries_V2.Init();
|
||||
}
|
||||
|
||||
public SQLiteHelper()
|
||||
{
|
||||
_connstr = Utils.GetConfigPath(_configDB);
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
public class CheckUpdateModel : ReactiveObject
|
||||
public partial class CheckUpdateModel : ReactiveObject
|
||||
{
|
||||
public bool? IsSelected { get; set; }
|
||||
public string? CoreType { get; set; }
|
||||
[Reactive] public string? Remarks { get; set; }
|
||||
[Reactive] public partial string? Remarks { get; set; }
|
||||
public string? FileName { get; set; }
|
||||
public bool? IsFinished { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class ClashProxyModel : ReactiveObject
|
||||
public partial class ClashProxyModel : ReactiveObject
|
||||
{
|
||||
public string? Name { get; set; }
|
||||
|
||||
|
|
@ -9,9 +9,9 @@ public class ClashProxyModel : ReactiveObject
|
|||
|
||||
public string? Now { get; set; }
|
||||
|
||||
[Reactive] public int Delay { get; set; }
|
||||
[Reactive] public partial int Delay { get; set; }
|
||||
|
||||
[Reactive] public string? DelayName { get; set; }
|
||||
[Reactive] public partial string? DelayName { get; set; }
|
||||
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
namespace ServiceLib.Models;
|
||||
|
||||
[Serializable]
|
||||
public class ProfileItemModel : ReactiveObject
|
||||
public partial class ProfileItemModel : ReactiveObject
|
||||
{
|
||||
public bool IsActive { get; set; }
|
||||
public string IndexId { get; set; }
|
||||
|
|
@ -16,27 +16,27 @@ public class ProfileItemModel : ReactiveObject
|
|||
public int Sort { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public int Delay { get; set; }
|
||||
public partial int Delay { get; set; }
|
||||
|
||||
public decimal Speed { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string DelayVal { get; set; }
|
||||
public partial string DelayVal { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string SpeedVal { get; set; }
|
||||
public partial string SpeedVal { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string TodayUp { get; set; }
|
||||
public partial string TodayUp { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string TodayDown { get; set; }
|
||||
public partial string TodayDown { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string TotalUp { get; set; }
|
||||
public partial string TotalUp { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string TotalDown { get; set; }
|
||||
public partial string TotalDown { get; set; }
|
||||
|
||||
public string GetSummary()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -9,8 +9,10 @@
|
|||
<PackageReference Include="ReactiveUI">
|
||||
<TreatAsUsed>true</TreatAsUsed>
|
||||
</PackageReference>
|
||||
<PackageReference Include="ReactiveUI.Fody" />
|
||||
<PackageReference Include="sqlite-net-pcl" />
|
||||
<PackageReference Include="ReactiveUI.SourceGenerators" PrivateAssets="all" />
|
||||
<PackageReference Include="sqlite-net-base" />
|
||||
<PackageReference Include="SQLitePCLRaw.config.e_sqlite3" />
|
||||
<PackageReference Include="SourceGear.sqlite3" />
|
||||
<PackageReference Include="NLog" />
|
||||
<PackageReference Include="WebDav.Client" />
|
||||
<PackageReference Include="YamlDotNet" />
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class AddGroupServerViewModel : MyReactiveObject
|
||||
public partial class AddGroupServerViewModel : MyReactiveObject
|
||||
{
|
||||
[Reactive]
|
||||
public ProfileItem SelectedSource { get; set; }
|
||||
public partial ProfileItem SelectedSource { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public ProfileItem SelectedChild { get; set; }
|
||||
public partial ProfileItem SelectedChild { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public IList<ProfileItem> SelectedChildren { get; set; }
|
||||
public partial IList<ProfileItem> SelectedChildren { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string? CoreType { get; set; }
|
||||
public partial string? CoreType { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string? PolicyGroupType { get; set; }
|
||||
public partial string? PolicyGroupType { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public SubItem? SelectedSubItem { get; set; }
|
||||
public partial SubItem? SelectedSubItem { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string? Filter { get; set; }
|
||||
public partial string? Filter { get; set; }
|
||||
|
||||
public IObservableCollection<SubItem> SubItems { get; } = new ObservableCollectionExtended<SubItem>();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class AddServer2ViewModel : MyReactiveObject
|
||||
public partial class AddServer2ViewModel : MyReactiveObject
|
||||
{
|
||||
[Reactive]
|
||||
public ProfileItem SelectedSource { get; set; }
|
||||
public partial ProfileItem SelectedSource { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string? CoreType { get; set; }
|
||||
public partial string? CoreType { get; set; }
|
||||
|
||||
public ReactiveCommand<Unit, Unit> BrowseServerCmd { get; }
|
||||
public ReactiveCommand<Unit, Unit> EditServerCmd { get; }
|
||||
|
|
|
|||
|
|
@ -1,113 +1,113 @@
|
|||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class AddServerViewModel : MyReactiveObject
|
||||
public partial class AddServerViewModel : MyReactiveObject
|
||||
{
|
||||
[Reactive]
|
||||
public ProfileItem SelectedSource { get; set; }
|
||||
public partial ProfileItem SelectedSource { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string? CoreType { get; set; }
|
||||
public partial string? CoreType { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string Cert { get; set; }
|
||||
public partial string Cert { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string CertTip { get; set; }
|
||||
public partial string CertTip { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string CertSha { get; set; }
|
||||
public partial string CertSha { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool AllowInsecureCertFetch { get; set; }
|
||||
public partial bool AllowInsecureCertFetch { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string SalamanderPass { get; set; }
|
||||
public partial string SalamanderPass { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public int AlterId { get; set; }
|
||||
public partial int AlterId { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string Ports { get; set; }
|
||||
public partial string Ports { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public int? UpMbps { get; set; }
|
||||
public partial int? UpMbps { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public int? DownMbps { get; set; }
|
||||
public partial int? DownMbps { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string HopInterval { get; set; }
|
||||
public partial string HopInterval { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string Flow { get; set; }
|
||||
public partial string Flow { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string VmessSecurity { get; set; }
|
||||
public partial string VmessSecurity { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string VlessEncryption { get; set; }
|
||||
public partial string VlessEncryption { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string SsMethod { get; set; }
|
||||
public partial string SsMethod { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string WgPublicKey { get; set; }
|
||||
public partial string WgPublicKey { get; set; }
|
||||
|
||||
//[Reactive]
|
||||
//public string WgPresharedKey { get; set; }
|
||||
[Reactive]
|
||||
public string WgInterfaceAddress { get; set; }
|
||||
public partial string WgInterfaceAddress { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string WgReserved { get; set; }
|
||||
public partial string WgReserved { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public int WgMtu { get; set; }
|
||||
public partial int WgMtu { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool Uot { get; set; }
|
||||
public partial bool Uot { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string CongestionControl { get; set; }
|
||||
public partial string CongestionControl { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public int? InsecureConcurrency { get; set; }
|
||||
public partial int? InsecureConcurrency { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool NaiveQuic { get; set; }
|
||||
public partial bool NaiveQuic { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string RawHeaderType { get; set; }
|
||||
public partial string RawHeaderType { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string Host { get; set; }
|
||||
public partial string Host { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string Path { get; set; }
|
||||
public partial string Path { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string XhttpMode { get; set; }
|
||||
public partial string XhttpMode { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string XhttpExtra { get; set; }
|
||||
public partial string XhttpExtra { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string GrpcAuthority { get; set; }
|
||||
public partial string GrpcAuthority { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string GrpcServiceName { get; set; }
|
||||
public partial string GrpcServiceName { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string GrpcMode { get; set; }
|
||||
public partial string GrpcMode { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string KcpHeaderType { get; set; }
|
||||
public partial string KcpHeaderType { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string KcpSeed { get; set; }
|
||||
public partial string KcpSeed { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public int? KcpMtu { get; set; }
|
||||
public partial int? KcpMtu { get; set; }
|
||||
|
||||
public string TransportHeaderType
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class BackupAndRestoreViewModel : MyReactiveObject
|
||||
public partial class BackupAndRestoreViewModel : MyReactiveObject
|
||||
{
|
||||
private readonly string _guiConfigs = "guiConfigs";
|
||||
private static string BackupFileName => $"backup_{DateTime.Now:yyyyMMddHHmmss}.zip";
|
||||
|
|
@ -10,10 +10,10 @@ public class BackupAndRestoreViewModel : MyReactiveObject
|
|||
public ReactiveCommand<Unit, Unit> WebDavCheckCmd { get; }
|
||||
|
||||
[Reactive]
|
||||
public WebDavItem SelectedSource { get; set; }
|
||||
public partial WebDavItem SelectedSource { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string OperationMsg { get; set; }
|
||||
public partial string OperationMsg { get; set; }
|
||||
|
||||
public BackupAndRestoreViewModel(Func<EViewAction, object?, Task<bool>>? updateView)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class CheckUpdateViewModel : MyReactiveObject
|
||||
public partial class CheckUpdateViewModel : MyReactiveObject
|
||||
{
|
||||
private const string _geo = "GeoFiles";
|
||||
private readonly string _v2rayN = ECoreType.v2rayN.ToString();
|
||||
|
|
@ -9,7 +9,7 @@ public class CheckUpdateViewModel : MyReactiveObject
|
|||
|
||||
public IObservableCollection<CheckUpdateModel> CheckUpdateModels { get; } = new ObservableCollectionExtended<CheckUpdateModel>();
|
||||
public ReactiveCommand<Unit, Unit> CheckUpdateCmd { get; }
|
||||
[Reactive] public bool EnableCheckPreReleaseUpdate { get; set; }
|
||||
[Reactive] public partial bool EnableCheckPreReleaseUpdate { get; set; }
|
||||
|
||||
public CheckUpdateViewModel(Func<EViewAction, object?, Task<bool>>? updateView)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class ClashConnectionsViewModel : MyReactiveObject
|
||||
public partial class ClashConnectionsViewModel : MyReactiveObject
|
||||
{
|
||||
public IObservableCollection<ClashConnectionModel> ConnectionItems { get; } = new ObservableCollectionExtended<ClashConnectionModel>();
|
||||
|
||||
[Reactive]
|
||||
public ClashConnectionModel SelectedSource { get; set; }
|
||||
public partial ClashConnectionModel SelectedSource { get; set; }
|
||||
|
||||
public ReactiveCommand<Unit, Unit> ConnectionCloseCmd { get; }
|
||||
public ReactiveCommand<Unit, Unit> ConnectionCloseAllCmd { get; }
|
||||
|
||||
[Reactive]
|
||||
public string HostFilter { get; set; }
|
||||
public partial string HostFilter { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool AutoRefresh { get; set; }
|
||||
public partial bool AutoRefresh { get; set; }
|
||||
|
||||
public ClashConnectionsViewModel(Func<EViewAction, object?, Task<bool>>? updateView)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ using static ServiceLib.Models.ClashProxies;
|
|||
|
||||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class ClashProxiesViewModel : MyReactiveObject
|
||||
public partial class ClashProxiesViewModel : MyReactiveObject
|
||||
{
|
||||
private Dictionary<string, ProxiesItem>? _proxies;
|
||||
private Dictionary<string, ProvidersItem>? _providers;
|
||||
|
|
@ -14,10 +14,10 @@ public class ClashProxiesViewModel : MyReactiveObject
|
|||
public IObservableCollection<ClashProxyModel> ProxyDetails { get; } = new ObservableCollectionExtended<ClashProxyModel>();
|
||||
|
||||
[Reactive]
|
||||
public ClashProxyModel SelectedGroup { get; set; }
|
||||
public partial ClashProxyModel SelectedGroup { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public ClashProxyModel SelectedDetail { get; set; }
|
||||
public partial ClashProxyModel SelectedDetail { get; set; }
|
||||
|
||||
public ReactiveCommand<Unit, Unit> ProxiesReloadCmd { get; }
|
||||
public ReactiveCommand<Unit, Unit> ProxiesDelayTestCmd { get; }
|
||||
|
|
@ -25,13 +25,13 @@ public class ClashProxiesViewModel : MyReactiveObject
|
|||
public ReactiveCommand<Unit, Unit> ProxiesSelectActivityCmd { get; }
|
||||
|
||||
[Reactive]
|
||||
public int RuleModeSelected { get; set; }
|
||||
public partial int RuleModeSelected { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public int SortingSelected { get; set; }
|
||||
public partial int SortingSelected { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool AutoRefresh { get; set; }
|
||||
public partial bool AutoRefresh { get; set; }
|
||||
|
||||
public ClashProxiesViewModel(Func<EViewAction, object?, Task<bool>>? updateView)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,35 +1,35 @@
|
|||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class DNSSettingViewModel : MyReactiveObject
|
||||
public partial class DNSSettingViewModel : MyReactiveObject
|
||||
{
|
||||
[Reactive] public bool? UseSystemHosts { get; set; }
|
||||
[Reactive] public bool? AddCommonHosts { get; set; }
|
||||
[Reactive] public bool? FakeIP { get; set; }
|
||||
[Reactive] public bool? BlockBindingQuery { get; set; }
|
||||
[Reactive] public string? DirectDNS { get; set; }
|
||||
[Reactive] public string? RemoteDNS { get; set; }
|
||||
[Reactive] public string? BootstrapDNS { get; set; }
|
||||
[Reactive] public string? Strategy4Freedom { get; set; }
|
||||
[Reactive] public string? Strategy4Proxy { get; set; }
|
||||
[Reactive] public string? Hosts { get; set; }
|
||||
[Reactive] public string? DirectExpectedIPs { get; set; }
|
||||
[Reactive] public bool? ParallelQuery { get; set; }
|
||||
[Reactive] public bool? ServeStale { get; set; }
|
||||
[Reactive] public partial bool? UseSystemHosts { get; set; }
|
||||
[Reactive] public partial bool? AddCommonHosts { get; set; }
|
||||
[Reactive] public partial bool? FakeIP { get; set; }
|
||||
[Reactive] public partial bool? BlockBindingQuery { get; set; }
|
||||
[Reactive] public partial string? DirectDNS { get; set; }
|
||||
[Reactive] public partial string? RemoteDNS { get; set; }
|
||||
[Reactive] public partial string? BootstrapDNS { get; set; }
|
||||
[Reactive] public partial string? Strategy4Freedom { get; set; }
|
||||
[Reactive] public partial string? Strategy4Proxy { get; set; }
|
||||
[Reactive] public partial string? Hosts { get; set; }
|
||||
[Reactive] public partial string? DirectExpectedIPs { get; set; }
|
||||
[Reactive] public partial bool? ParallelQuery { get; set; }
|
||||
[Reactive] public partial bool? ServeStale { get; set; }
|
||||
|
||||
[Reactive] public bool UseSystemHostsCompatible { get; set; }
|
||||
[Reactive] public string DomainStrategy4FreedomCompatible { get; set; }
|
||||
[Reactive] public string DomainDNSAddressCompatible { get; set; }
|
||||
[Reactive] public string NormalDNSCompatible { get; set; }
|
||||
[Reactive] public string TunDNSCompatible { get; set; }
|
||||
[Reactive] public partial bool UseSystemHostsCompatible { get; set; }
|
||||
[Reactive] public partial string DomainStrategy4FreedomCompatible { get; set; }
|
||||
[Reactive] public partial string DomainDNSAddressCompatible { get; set; }
|
||||
[Reactive] public partial string NormalDNSCompatible { get; set; }
|
||||
[Reactive] public partial string TunDNSCompatible { get; set; }
|
||||
|
||||
[Reactive] public string DomainStrategy4Freedom2Compatible { get; set; }
|
||||
[Reactive] public string DomainDNSAddress2Compatible { get; set; }
|
||||
[Reactive] public string NormalDNS2Compatible { get; set; }
|
||||
[Reactive] public string TunDNS2Compatible { get; set; }
|
||||
[Reactive] public bool RayCustomDNSEnableCompatible { get; set; }
|
||||
[Reactive] public bool SBCustomDNSEnableCompatible { get; set; }
|
||||
[Reactive] public partial string DomainStrategy4Freedom2Compatible { get; set; }
|
||||
[Reactive] public partial string DomainDNSAddress2Compatible { get; set; }
|
||||
[Reactive] public partial string NormalDNS2Compatible { get; set; }
|
||||
[Reactive] public partial string TunDNS2Compatible { get; set; }
|
||||
[Reactive] public partial bool RayCustomDNSEnableCompatible { get; set; }
|
||||
[Reactive] public partial bool SBCustomDNSEnableCompatible { get; set; }
|
||||
|
||||
[ObservableAsProperty] public bool IsSimpleDNSEnabled { get; }
|
||||
[ObservableAsProperty] private bool _isSimpleDNSEnabled;
|
||||
|
||||
public ReactiveCommand<Unit, Unit> SaveCmd { get; }
|
||||
public ReactiveCommand<Unit, Unit> ImportDefConfig4V2rayCompatibleCmd { get; }
|
||||
|
|
@ -55,9 +55,9 @@ public class DNSSettingViewModel : MyReactiveObject
|
|||
await Task.CompletedTask;
|
||||
});
|
||||
|
||||
this.WhenAnyValue(x => x.RayCustomDNSEnableCompatible, x => x.SBCustomDNSEnableCompatible)
|
||||
_isSimpleDNSEnabledHelper = this.WhenAnyValue(x => x.RayCustomDNSEnableCompatible, x => x.SBCustomDNSEnableCompatible)
|
||||
.Select(x => !(x.Item1 && x.Item2))
|
||||
.ToPropertyEx(this, x => x.IsSimpleDNSEnabled);
|
||||
.ToProperty(this, nameof(IsSimpleDNSEnabled));
|
||||
|
||||
_ = Init();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,38 +1,38 @@
|
|||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class FullConfigTemplateViewModel : MyReactiveObject
|
||||
public partial class FullConfigTemplateViewModel : MyReactiveObject
|
||||
{
|
||||
#region Reactive
|
||||
|
||||
[Reactive]
|
||||
public bool EnableFullConfigTemplate4Ray { get; set; }
|
||||
public partial bool EnableFullConfigTemplate4Ray { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool EnableFullConfigTemplate4Singbox { get; set; }
|
||||
public partial bool EnableFullConfigTemplate4Singbox { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string FullConfigTemplate4Ray { get; set; }
|
||||
public partial string FullConfigTemplate4Ray { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string FullTunConfigTemplate4Ray { get; set; }
|
||||
public partial string FullTunConfigTemplate4Ray { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string FullConfigTemplate4Singbox { get; set; }
|
||||
public partial string FullConfigTemplate4Singbox { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string FullTunConfigTemplate4Singbox { get; set; }
|
||||
public partial string FullTunConfigTemplate4Singbox { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool AddProxyOnly4Ray { get; set; }
|
||||
public partial bool AddProxyOnly4Ray { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool AddProxyOnly4Singbox { get; set; }
|
||||
public partial bool AddProxyOnly4Singbox { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string ProxyDetour4Ray { get; set; }
|
||||
public partial string ProxyDetour4Ray { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string ProxyDetour4Singbox { get; set; }
|
||||
public partial string ProxyDetour4Singbox { get; set; }
|
||||
|
||||
public ReactiveCommand<Unit, Unit> SaveCmd { get; }
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ using System.Reactive.Concurrency;
|
|||
|
||||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class MainWindowViewModel : MyReactiveObject
|
||||
public partial class MainWindowViewModel : MyReactiveObject
|
||||
{
|
||||
#region Menu
|
||||
|
||||
|
|
@ -55,15 +55,15 @@ public class MainWindowViewModel : MyReactiveObject
|
|||
public ReactiveCommand<Unit, Unit> ReloadCmd { get; }
|
||||
|
||||
[Reactive]
|
||||
public bool BlReloadEnabled { get; set; }
|
||||
public partial bool BlReloadEnabled { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool ShowClashUI { get; set; }
|
||||
public partial bool ShowClashUI { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public int TabMainSelectedIndex { get; set; }
|
||||
public partial int TabMainSelectedIndex { get; set; }
|
||||
|
||||
[Reactive] public bool BlIsWindows { get; set; }
|
||||
[Reactive] public partial bool BlIsWindows { get; set; }
|
||||
|
||||
#endregion Menu
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class MsgViewModel : MyReactiveObject
|
||||
public partial class MsgViewModel : MyReactiveObject
|
||||
{
|
||||
private readonly ConcurrentQueue<string> _queueMsg = new();
|
||||
private volatile bool _lastMsgFilterNotAvailable;
|
||||
|
|
@ -8,10 +8,10 @@ public class MsgViewModel : MyReactiveObject
|
|||
public int NumMaxMsg { get; } = 500;
|
||||
|
||||
[Reactive]
|
||||
public string MsgFilter { get; set; }
|
||||
public partial string MsgFilter { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool AutoRefresh { get; set; }
|
||||
public partial bool AutoRefresh { get; set; }
|
||||
|
||||
public MsgViewModel(Func<EViewAction, object?, Task<bool>>? updateView)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,31 +1,31 @@
|
|||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class OptionSettingViewModel : MyReactiveObject
|
||||
public partial class OptionSettingViewModel : MyReactiveObject
|
||||
{
|
||||
#region Core
|
||||
|
||||
[Reactive] public int localPort { get; set; }
|
||||
[Reactive] public bool SecondLocalPortEnabled { get; set; }
|
||||
[Reactive] public bool udpEnabled { get; set; }
|
||||
[Reactive] public bool sniffingEnabled { get; set; }
|
||||
[Reactive] public partial int localPort { get; set; }
|
||||
[Reactive] public partial bool SecondLocalPortEnabled { get; set; }
|
||||
[Reactive] public partial bool udpEnabled { get; set; }
|
||||
[Reactive] public partial bool sniffingEnabled { get; set; }
|
||||
public IList<string> destOverride { get; set; }
|
||||
[Reactive] public bool routeOnly { get; set; }
|
||||
[Reactive] public bool allowLANConn { get; set; }
|
||||
[Reactive] public bool newPort4LAN { get; set; }
|
||||
[Reactive] public string user { get; set; }
|
||||
[Reactive] public string pass { get; set; }
|
||||
[Reactive] public bool muxEnabled { get; set; }
|
||||
[Reactive] public bool logEnabled { get; set; }
|
||||
[Reactive] public string loglevel { get; set; }
|
||||
[Reactive] public bool defAllowInsecure { get; set; }
|
||||
[Reactive] public string defFingerprint { get; set; }
|
||||
[Reactive] public string defUserAgent { get; set; }
|
||||
[Reactive] public string sendThrough { get; set; }
|
||||
[Reactive] public string mux4SboxProtocol { get; set; }
|
||||
[Reactive] public bool enableCacheFile4Sbox { get; set; }
|
||||
[Reactive] public int? hyUpMbps { get; set; }
|
||||
[Reactive] public int? hyDownMbps { get; set; }
|
||||
[Reactive] public bool enableFragment { get; set; }
|
||||
[Reactive] public partial bool routeOnly { get; set; }
|
||||
[Reactive] public partial bool allowLANConn { get; set; }
|
||||
[Reactive] public partial bool newPort4LAN { get; set; }
|
||||
[Reactive] public partial string user { get; set; }
|
||||
[Reactive] public partial string pass { get; set; }
|
||||
[Reactive] public partial bool muxEnabled { get; set; }
|
||||
[Reactive] public partial bool logEnabled { get; set; }
|
||||
[Reactive] public partial string loglevel { get; set; }
|
||||
[Reactive] public partial bool defAllowInsecure { get; set; }
|
||||
[Reactive] public partial string defFingerprint { get; set; }
|
||||
[Reactive] public partial string defUserAgent { get; set; }
|
||||
[Reactive] public partial string sendThrough { get; set; }
|
||||
[Reactive] public partial string mux4SboxProtocol { get; set; }
|
||||
[Reactive] public partial bool enableCacheFile4Sbox { get; set; }
|
||||
[Reactive] public partial int? hyUpMbps { get; set; }
|
||||
[Reactive] public partial int? hyDownMbps { get; set; }
|
||||
[Reactive] public partial bool enableFragment { get; set; }
|
||||
|
||||
#endregion Core
|
||||
|
||||
|
|
@ -43,75 +43,75 @@ public class OptionSettingViewModel : MyReactiveObject
|
|||
|
||||
#region UI
|
||||
|
||||
[Reactive] public bool AutoRun { get; set; }
|
||||
[Reactive] public bool EnableStatistics { get; set; }
|
||||
[Reactive] public bool KeepOlderDedupl { get; set; }
|
||||
[Reactive] public bool DisplayRealTimeSpeed { get; set; }
|
||||
[Reactive] public bool EnableAutoAdjustMainLvColWidth { get; set; }
|
||||
[Reactive] public bool AutoHideStartup { get; set; }
|
||||
[Reactive] public bool Hide2TrayWhenClose { get; set; }
|
||||
[Reactive] public bool MacOSShowInDock { get; set; }
|
||||
[Reactive] public bool EnableDragDropSort { get; set; }
|
||||
[Reactive] public bool DoubleClick2Activate { get; set; }
|
||||
[Reactive] public int AutoUpdateInterval { get; set; }
|
||||
[Reactive] public int TrayMenuServersLimit { get; set; }
|
||||
[Reactive] public string CurrentFontFamily { get; set; }
|
||||
[Reactive] public int SpeedTestTimeout { get; set; }
|
||||
[Reactive] public string SpeedTestUrl { get; set; }
|
||||
[Reactive] public string SpeedPingTestUrl { get; set; }
|
||||
[Reactive] public string UdpTestTarget { get; set; }
|
||||
[Reactive] public int MixedConcurrencyCount { get; set; }
|
||||
[Reactive] public bool EnableHWA { get; set; }
|
||||
[Reactive] public string SubConvertUrl { get; set; }
|
||||
[Reactive] public int MainGirdOrientation { get; set; }
|
||||
[Reactive] public string GeoFileSourceUrl { get; set; }
|
||||
[Reactive] public string SrsFileSourceUrl { get; set; }
|
||||
[Reactive] public string RoutingRulesSourceUrl { get; set; }
|
||||
[Reactive] public string IPAPIUrl { get; set; }
|
||||
[Reactive] public partial bool AutoRun { get; set; }
|
||||
[Reactive] public partial bool EnableStatistics { get; set; }
|
||||
[Reactive] public partial bool KeepOlderDedupl { get; set; }
|
||||
[Reactive] public partial bool DisplayRealTimeSpeed { get; set; }
|
||||
[Reactive] public partial bool EnableAutoAdjustMainLvColWidth { get; set; }
|
||||
[Reactive] public partial bool AutoHideStartup { get; set; }
|
||||
[Reactive] public partial bool Hide2TrayWhenClose { get; set; }
|
||||
[Reactive] public partial bool MacOSShowInDock { get; set; }
|
||||
[Reactive] public partial bool EnableDragDropSort { get; set; }
|
||||
[Reactive] public partial bool DoubleClick2Activate { get; set; }
|
||||
[Reactive] public partial int AutoUpdateInterval { get; set; }
|
||||
[Reactive] public partial int TrayMenuServersLimit { get; set; }
|
||||
[Reactive] public partial string CurrentFontFamily { get; set; }
|
||||
[Reactive] public partial int SpeedTestTimeout { get; set; }
|
||||
[Reactive] public partial string SpeedTestUrl { get; set; }
|
||||
[Reactive] public partial string SpeedPingTestUrl { get; set; }
|
||||
[Reactive] public partial string UdpTestTarget { get; set; }
|
||||
[Reactive] public partial int MixedConcurrencyCount { get; set; }
|
||||
[Reactive] public partial bool EnableHWA { get; set; }
|
||||
[Reactive] public partial string SubConvertUrl { get; set; }
|
||||
[Reactive] public partial int MainGirdOrientation { get; set; }
|
||||
[Reactive] public partial string GeoFileSourceUrl { get; set; }
|
||||
[Reactive] public partial string SrsFileSourceUrl { get; set; }
|
||||
[Reactive] public partial string RoutingRulesSourceUrl { get; set; }
|
||||
[Reactive] public partial string IPAPIUrl { get; set; }
|
||||
|
||||
#endregion UI
|
||||
|
||||
#region UI visibility
|
||||
|
||||
[Reactive] public bool BlIsWindows { get; set; }
|
||||
[Reactive] public bool BlIsLinux { get; set; }
|
||||
[Reactive] public bool BlIsIsMacOS { get; set; }
|
||||
[Reactive] public bool BlIsNonWindows { get; set; }
|
||||
[Reactive] public partial bool BlIsWindows { get; set; }
|
||||
[Reactive] public partial bool BlIsLinux { get; set; }
|
||||
[Reactive] public partial bool BlIsIsMacOS { get; set; }
|
||||
[Reactive] public partial bool BlIsNonWindows { get; set; }
|
||||
|
||||
#endregion UI visibility
|
||||
|
||||
#region System proxy
|
||||
|
||||
[Reactive] public bool notProxyLocalAddress { get; set; }
|
||||
[Reactive] public string systemProxyAdvancedProtocol { get; set; }
|
||||
[Reactive] public string systemProxyExceptions { get; set; }
|
||||
[Reactive] public string CustomSystemProxyPacPath { get; set; }
|
||||
[Reactive] public string CustomSystemProxyScriptPath { get; set; }
|
||||
[Reactive] public partial bool notProxyLocalAddress { get; set; }
|
||||
[Reactive] public partial string systemProxyAdvancedProtocol { get; set; }
|
||||
[Reactive] public partial string systemProxyExceptions { get; set; }
|
||||
[Reactive] public partial string CustomSystemProxyPacPath { get; set; }
|
||||
[Reactive] public partial string CustomSystemProxyScriptPath { get; set; }
|
||||
|
||||
#endregion System proxy
|
||||
|
||||
#region Tun mode
|
||||
|
||||
[Reactive] public bool TunAutoRoute { get; set; }
|
||||
[Reactive] public bool TunStrictRoute { get; set; }
|
||||
[Reactive] public string TunStack { get; set; }
|
||||
[Reactive] public int TunMtu { get; set; }
|
||||
[Reactive] public bool TunEnableIPv6Address { get; set; }
|
||||
[Reactive] public string TunIcmpRouting { get; set; }
|
||||
[Reactive] public bool TunEnableLegacyProtect { get; set; }
|
||||
[Reactive] public partial bool TunAutoRoute { get; set; }
|
||||
[Reactive] public partial bool TunStrictRoute { get; set; }
|
||||
[Reactive] public partial string TunStack { get; set; }
|
||||
[Reactive] public partial int TunMtu { get; set; }
|
||||
[Reactive] public partial bool TunEnableIPv6Address { get; set; }
|
||||
[Reactive] public partial string TunIcmpRouting { get; set; }
|
||||
[Reactive] public partial bool TunEnableLegacyProtect { get; set; }
|
||||
|
||||
#endregion Tun mode
|
||||
|
||||
#region CoreType
|
||||
|
||||
[Reactive] public string CoreType1 { get; set; }
|
||||
[Reactive] public string CoreType2 { get; set; }
|
||||
[Reactive] public string CoreType3 { get; set; }
|
||||
[Reactive] public string CoreType4 { get; set; }
|
||||
[Reactive] public string CoreType5 { get; set; }
|
||||
[Reactive] public string CoreType6 { get; set; }
|
||||
[Reactive] public string CoreType7 { get; set; }
|
||||
[Reactive] public string CoreType9 { get; set; }
|
||||
[Reactive] public partial string CoreType1 { get; set; }
|
||||
[Reactive] public partial string CoreType2 { get; set; }
|
||||
[Reactive] public partial string CoreType3 { get; set; }
|
||||
[Reactive] public partial string CoreType4 { get; set; }
|
||||
[Reactive] public partial string CoreType5 { get; set; }
|
||||
[Reactive] public partial string CoreType6 { get; set; }
|
||||
[Reactive] public partial string CoreType7 { get; set; }
|
||||
[Reactive] public partial string CoreType9 { get; set; }
|
||||
|
||||
#endregion CoreType
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class ProfilesSelectViewModel : MyReactiveObject
|
||||
public partial class ProfilesSelectViewModel : MyReactiveObject
|
||||
{
|
||||
#region private prop
|
||||
|
||||
|
|
@ -22,15 +22,15 @@ public class ProfilesSelectViewModel : MyReactiveObject
|
|||
public IObservableCollection<SubItem> SubItems { get; } = new ObservableCollectionExtended<SubItem>();
|
||||
|
||||
[Reactive]
|
||||
public ProfileItemModel SelectedProfile { get; set; }
|
||||
public partial ProfileItemModel SelectedProfile { get; set; }
|
||||
|
||||
public IList<ProfileItemModel> SelectedProfiles { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public SubItem SelectedSub { get; set; }
|
||||
public partial SubItem SelectedSub { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string ServerFilter { get; set; }
|
||||
public partial string ServerFilter { get; set; }
|
||||
|
||||
// Include/Exclude filter for ConfigType
|
||||
public List<EConfigType> FilterConfigTypes
|
||||
|
|
@ -39,7 +39,6 @@ public class ProfilesSelectViewModel : MyReactiveObject
|
|||
set => this.RaiseAndSetIfChanged(ref _filterConfigTypes, value);
|
||||
}
|
||||
|
||||
[Reactive]
|
||||
public bool FilterExclude
|
||||
{
|
||||
get => _filterExclude;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class ProfilesViewModel : MyReactiveObject
|
||||
public partial class ProfilesViewModel : MyReactiveObject
|
||||
{
|
||||
#region private prop
|
||||
|
||||
|
|
@ -19,18 +19,18 @@ public class ProfilesViewModel : MyReactiveObject
|
|||
public IObservableCollection<SubItem> SubItems { get; } = new ObservableCollectionExtended<SubItem>();
|
||||
|
||||
[Reactive]
|
||||
public ProfileItemModel SelectedProfile { get; set; }
|
||||
public partial ProfileItemModel SelectedProfile { get; set; }
|
||||
|
||||
public IList<ProfileItemModel> SelectedProfiles { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public SubItem SelectedSub { get; set; }
|
||||
public partial SubItem SelectedSub { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public SubItem SelectedMoveToGroup { get; set; }
|
||||
public partial SubItem SelectedMoveToGroup { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string ServerFilter { get; set; }
|
||||
public partial string ServerFilter { get; set; }
|
||||
|
||||
#endregion ObservableCollection
|
||||
|
||||
|
|
|
|||
|
|
@ -1,27 +1,27 @@
|
|||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class RoutingRuleDetailsViewModel : MyReactiveObject
|
||||
public partial class RoutingRuleDetailsViewModel : MyReactiveObject
|
||||
{
|
||||
public IList<string> ProtocolItems { get; set; }
|
||||
public IList<string> InboundTagItems { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public RulesItem SelectedSource { get; set; }
|
||||
public partial RulesItem SelectedSource { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string Domain { get; set; }
|
||||
public partial string Domain { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string IP { get; set; }
|
||||
public partial string IP { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string Process { get; set; }
|
||||
public partial string Process { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string? RuleType { get; set; }
|
||||
public partial string? RuleType { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool AutoSort { get; set; }
|
||||
public partial bool AutoSort { get; set; }
|
||||
|
||||
public ReactiveCommand<Unit, Unit> SaveCmd { get; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class RoutingRuleSettingViewModel : MyReactiveObject
|
||||
public partial class RoutingRuleSettingViewModel : MyReactiveObject
|
||||
{
|
||||
private List<RulesItem> _rules;
|
||||
|
||||
[Reactive]
|
||||
public RoutingItem SelectedRouting { get; set; }
|
||||
public partial RoutingItem SelectedRouting { get; set; }
|
||||
|
||||
public IObservableCollection<RulesItemModel> RulesItems { get; } = new ObservableCollectionExtended<RulesItemModel>();
|
||||
|
||||
[Reactive]
|
||||
public RulesItemModel SelectedSource { get; set; }
|
||||
public partial RulesItemModel SelectedSource { get; set; }
|
||||
|
||||
public IList<RulesItemModel> SelectedSources { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class RoutingSettingViewModel : MyReactiveObject
|
||||
public partial class RoutingSettingViewModel : MyReactiveObject
|
||||
{
|
||||
#region Reactive
|
||||
|
||||
public IObservableCollection<RoutingItemModel> RoutingItems { get; } = new ObservableCollectionExtended<RoutingItemModel>();
|
||||
|
||||
[Reactive]
|
||||
public RoutingItemModel SelectedSource { get; set; }
|
||||
public partial RoutingItemModel SelectedSource { get; set; }
|
||||
|
||||
public IList<RoutingItemModel> SelectedSources { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string DomainStrategy { get; set; }
|
||||
public partial string DomainStrategy { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string DomainStrategy4Singbox { get; set; }
|
||||
public partial string DomainStrategy4Singbox { get; set; }
|
||||
|
||||
public ReactiveCommand<Unit, Unit> RoutingAdvancedAddCmd { get; }
|
||||
public ReactiveCommand<Unit, Unit> RoutingAdvancedRemoveCmd { get; }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class StatusBarViewModel : MyReactiveObject
|
||||
public partial class StatusBarViewModel : MyReactiveObject
|
||||
{
|
||||
private static readonly Lazy<StatusBarViewModel> _instance = new(() => new(null));
|
||||
public static StatusBarViewModel Instance => _instance.Value;
|
||||
|
|
@ -12,13 +12,13 @@ public class StatusBarViewModel : MyReactiveObject
|
|||
public IObservableCollection<ComboItem> Servers { get; } = new ObservableCollectionExtended<ComboItem>();
|
||||
|
||||
[Reactive]
|
||||
public RoutingItem SelectedRouting { get; set; }
|
||||
public partial RoutingItem SelectedRouting { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public ComboItem SelectedServer { get; set; }
|
||||
public partial ComboItem SelectedServer { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool BlServers { get; set; }
|
||||
public partial bool BlServers { get; set; }
|
||||
|
||||
#endregion ObservableCollection
|
||||
|
||||
|
|
@ -34,16 +34,16 @@ public class StatusBarViewModel : MyReactiveObject
|
|||
#region System Proxy
|
||||
|
||||
[Reactive]
|
||||
public bool BlSystemProxyClear { get; set; }
|
||||
public partial bool BlSystemProxyClear { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool BlSystemProxySet { get; set; }
|
||||
public partial bool BlSystemProxySet { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool BlSystemProxyNothing { get; set; }
|
||||
public partial bool BlSystemProxyNothing { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool BlSystemProxyPac { get; set; }
|
||||
public partial bool BlSystemProxyPac { get; set; }
|
||||
|
||||
public ReactiveCommand<Unit, Unit> SystemProxyClearCmd { get; }
|
||||
public ReactiveCommand<Unit, Unit> SystemProxySetCmd { get; }
|
||||
|
|
@ -51,44 +51,44 @@ public class StatusBarViewModel : MyReactiveObject
|
|||
public ReactiveCommand<Unit, Unit> SystemProxyPacCmd { get; }
|
||||
|
||||
[Reactive]
|
||||
public bool BlRouting { get; set; }
|
||||
public partial bool BlRouting { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public int SystemProxySelected { get; set; }
|
||||
public partial int SystemProxySelected { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool BlSystemProxyPacVisible { get; set; }
|
||||
public partial bool BlSystemProxyPacVisible { get; set; }
|
||||
|
||||
#endregion System Proxy
|
||||
|
||||
#region UI
|
||||
|
||||
[Reactive]
|
||||
public string InboundDisplay { get; set; }
|
||||
public partial string InboundDisplay { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string InboundLanDisplay { get; set; }
|
||||
public partial string InboundLanDisplay { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string RunningServerDisplay { get; set; }
|
||||
public partial string RunningServerDisplay { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string RunningServerToolTipText { get; set; }
|
||||
public partial string RunningServerToolTipText { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string RunningInfoDisplay { get; set; }
|
||||
public partial string RunningInfoDisplay { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string SpeedProxyDisplay { get; set; }
|
||||
public partial string SpeedProxyDisplay { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public string SpeedDirectDisplay { get; set; }
|
||||
public partial string SpeedDirectDisplay { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool EnableTun { get; set; }
|
||||
public partial bool EnableTun { get; set; }
|
||||
|
||||
[Reactive]
|
||||
public bool BlIsNonWindows { get; set; }
|
||||
public partial bool BlIsNonWindows { get; set; }
|
||||
|
||||
#endregion UI
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class SubEditViewModel : MyReactiveObject
|
||||
public partial class SubEditViewModel : MyReactiveObject
|
||||
{
|
||||
[Reactive]
|
||||
public SubItem SelectedSource { get; set; }
|
||||
public partial SubItem SelectedSource { get; set; }
|
||||
|
||||
public ReactiveCommand<Unit, Unit> SaveCmd { get; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
namespace ServiceLib.ViewModels;
|
||||
|
||||
public class SubSettingViewModel : MyReactiveObject
|
||||
public partial class SubSettingViewModel : MyReactiveObject
|
||||
{
|
||||
public IObservableCollection<SubItem> SubItems { get; } = new ObservableCollectionExtended<SubItem>();
|
||||
|
||||
[Reactive]
|
||||
public SubItem SelectedSource { get; set; }
|
||||
public partial SubItem SelectedSource { get; set; }
|
||||
|
||||
public IList<SubItem> SelectedSources { get; set; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<ReactiveUI />
|
||||
</Weavers>
|
||||
|
|
@ -23,7 +23,7 @@ global using Avalonia.Threading;
|
|||
global using DynamicData;
|
||||
global using ReactiveUI;
|
||||
global using ReactiveUI.Avalonia;
|
||||
global using ReactiveUI.Fody.Helpers;
|
||||
global using ReactiveUI.SourceGenerators;
|
||||
global using ServiceLib;
|
||||
global using ServiceLib.Base;
|
||||
global using ServiceLib.Common;
|
||||
|
|
|
|||
|
|
@ -5,13 +5,13 @@ using Semi.Avalonia;
|
|||
|
||||
namespace v2rayN.Desktop.ViewModels;
|
||||
|
||||
public class ThemeSettingViewModel : MyReactiveObject
|
||||
public partial class ThemeSettingViewModel : MyReactiveObject
|
||||
{
|
||||
[Reactive] public string CurrentTheme { get; set; }
|
||||
[Reactive] public partial string CurrentTheme { get; set; }
|
||||
|
||||
[Reactive] public int CurrentFontSize { get; set; }
|
||||
[Reactive] public partial int CurrentFontSize { get; set; }
|
||||
|
||||
[Reactive] public string CurrentLanguage { get; set; }
|
||||
[Reactive] public partial string CurrentLanguage { get; set; }
|
||||
|
||||
public ThemeSettingViewModel()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,9 +26,7 @@
|
|||
<PackageReference Include="ReactiveUI">
|
||||
<TreatAsUsed>true</TreatAsUsed>
|
||||
</PackageReference>
|
||||
<PackageReference Include="ReactiveUI.Fody">
|
||||
<TreatAsUsed>true</TreatAsUsed>
|
||||
</PackageReference>
|
||||
<PackageReference Include="ReactiveUI.SourceGenerators" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -1,3 +0,0 @@
|
|||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<ReactiveUI />
|
||||
</Weavers>
|
||||
|
|
@ -21,7 +21,7 @@ global using DynamicData;
|
|||
global using DynamicData.Binding;
|
||||
global using ReactiveUI;
|
||||
global using ReactiveUI.Builder;
|
||||
global using ReactiveUI.Fody.Helpers;
|
||||
global using ReactiveUI.SourceGenerators;
|
||||
global using ServiceLib;
|
||||
global using ServiceLib.Base;
|
||||
global using ServiceLib.Common;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ using Microsoft.Win32;
|
|||
|
||||
namespace v2rayN.ViewModels;
|
||||
|
||||
public class ThemeSettingViewModel : MyReactiveObject
|
||||
public partial class ThemeSettingViewModel : MyReactiveObject
|
||||
{
|
||||
private readonly PaletteHelper _paletteHelper = new();
|
||||
|
||||
|
|
@ -13,13 +13,13 @@ public class ThemeSettingViewModel : MyReactiveObject
|
|||
public IObservableCollection<Swatch> Swatches => _swatches;
|
||||
|
||||
[Reactive]
|
||||
public Swatch SelectedSwatch { get; set; }
|
||||
public partial Swatch SelectedSwatch { get; set; }
|
||||
|
||||
[Reactive] public string CurrentTheme { get; set; }
|
||||
[Reactive] public partial string CurrentTheme { get; set; }
|
||||
|
||||
[Reactive] public int CurrentFontSize { get; set; }
|
||||
[Reactive] public partial int CurrentFontSize { get; set; }
|
||||
|
||||
[Reactive] public string CurrentLanguage { get; set; }
|
||||
[Reactive] public partial string CurrentLanguage { get; set; }
|
||||
|
||||
public ThemeSettingViewModel()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,9 +15,7 @@
|
|||
<ItemGroup>
|
||||
<PackageReference Include="MaterialDesignThemes" />
|
||||
<PackageReference Include="H.NotifyIcon.Wpf" />
|
||||
<PackageReference Include="ReactiveUI.Fody">
|
||||
<TreatAsUsed>true</TreatAsUsed>
|
||||
</PackageReference>
|
||||
<PackageReference Include="ReactiveUI.SourceGenerators" PrivateAssets="all" />
|
||||
<PackageReference Include="ReactiveUI.WPF" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue