mirror of
https://github.com/2dust/v2rayN.git
synced 2025-11-29 03:02:53 +00:00
Compare commits
No commits in common. "master" and "7.16.4" have entirely different histories.
25 changed files with 95 additions and 186 deletions
8
.github/workflows/build-linux.yml
vendored
8
.github/workflows/build-linux.yml
vendored
|
|
@ -37,7 +37,7 @@ jobs:
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
|
||||||
- name: Setup .NET
|
- name: Setup .NET
|
||||||
uses: actions/setup-dotnet@v5.0.1
|
uses: actions/setup-dotnet@v5.0.0
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
|
|
||||||
|
|
@ -97,16 +97,16 @@ jobs:
|
||||||
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
|
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
container:
|
container:
|
||||||
image: registry.access.redhat.com/ubi10/ubi
|
image: quay.io/almalinuxorg/10-base:latest
|
||||||
|
options: --platform=linux/amd64/v2
|
||||||
env:
|
env:
|
||||||
RELEASE_TAG: ${{ github.event.inputs.release_tag != '' && github.event.inputs.release_tag || github.ref_name }}
|
RELEASE_TAG: ${{ github.event.inputs.release_tag != '' && github.event.inputs.release_tag || github.ref_name }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Prepare tools (Red Hat)
|
- name: Prepare tools (Red Hat)
|
||||||
run: |
|
run: |
|
||||||
dnf repolist all
|
|
||||||
dnf -y makecache
|
dnf -y makecache
|
||||||
dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-10.noarch.rpm
|
dnf -y install epel-release
|
||||||
dnf -y install sudo git rpm-build rpmdevtools dnf-plugins-core rsync findutils tar gzip unzip which
|
dnf -y install sudo git rpm-build rpmdevtools dnf-plugins-core rsync findutils tar gzip unzip which
|
||||||
|
|
||||||
- name: Checkout repo (for scripts)
|
- name: Checkout repo (for scripts)
|
||||||
|
|
|
||||||
2
.github/workflows/build-osx.yml
vendored
2
.github/workflows/build-osx.yml
vendored
|
|
@ -32,7 +32,7 @@ jobs:
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
|
||||||
- name: Setup
|
- name: Setup
|
||||||
uses: actions/setup-dotnet@v5.0.1
|
uses: actions/setup-dotnet@v5.0.0
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
|
|
||||||
|
|
|
||||||
2
.github/workflows/build-windows-desktop.yml
vendored
2
.github/workflows/build-windows-desktop.yml
vendored
|
|
@ -32,7 +32,7 @@ jobs:
|
||||||
fetch-depth: '0'
|
fetch-depth: '0'
|
||||||
|
|
||||||
- name: Setup
|
- name: Setup
|
||||||
uses: actions/setup-dotnet@v5.0.1
|
uses: actions/setup-dotnet@v5.0.0
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
|
|
||||||
|
|
|
||||||
2
.github/workflows/build-windows.yml
vendored
2
.github/workflows/build-windows.yml
vendored
|
|
@ -30,7 +30,7 @@ jobs:
|
||||||
uses: actions/checkout@v6.0.0
|
uses: actions/checkout@v6.0.0
|
||||||
|
|
||||||
- name: Setup
|
- name: Setup
|
||||||
uses: actions/setup-dotnet@v5.0.1
|
uses: actions/setup-dotnet@v5.0.0
|
||||||
with:
|
with:
|
||||||
dotnet-version: '8.0.x'
|
dotnet-version: '8.0.x'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,6 @@ public class Global
|
||||||
public const string GrpcMultiMode = "multi";
|
public const string GrpcMultiMode = "multi";
|
||||||
public const int MaxPort = 65536;
|
public const int MaxPort = 65536;
|
||||||
public const int MinFontSize = 8;
|
public const int MinFontSize = 8;
|
||||||
public const int MinFontSizeCount = 13;
|
|
||||||
public const string RebootAs = "rebootas";
|
public const string RebootAs = "rebootas";
|
||||||
public const string AvaAssets = "avares://v2rayN/Assets/";
|
public const string AvaAssets = "avares://v2rayN/Assets/";
|
||||||
public const string LocalAppData = "V2RAYN_LOCAL_APPLICATION_DATA_V2";
|
public const string LocalAppData = "V2RAYN_LOCAL_APPLICATION_DATA_V2";
|
||||||
|
|
|
||||||
|
|
@ -118,16 +118,7 @@ public class BaseFmt
|
||||||
}
|
}
|
||||||
if (item.Extra.IsNotEmpty())
|
if (item.Extra.IsNotEmpty())
|
||||||
{
|
{
|
||||||
var node = JsonUtils.ParseJson(item.Extra);
|
dicQuery.Add("extra", Utils.UrlEncode(item.Extra));
|
||||||
var extra = node != null
|
|
||||||
? JsonUtils.Serialize(node, new JsonSerializerOptions
|
|
||||||
{
|
|
||||||
WriteIndented = false,
|
|
||||||
DefaultIgnoreCondition = JsonIgnoreCondition.Never,
|
|
||||||
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
|
|
||||||
})
|
|
||||||
: item.Extra;
|
|
||||||
dicQuery.Add("extra", Utils.UrlEncode(extra));
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -246,21 +237,7 @@ public class BaseFmt
|
||||||
item.RequestHost = GetQueryDecoded(query, "host");
|
item.RequestHost = GetQueryDecoded(query, "host");
|
||||||
item.Path = GetQueryDecoded(query, "path", "/");
|
item.Path = GetQueryDecoded(query, "path", "/");
|
||||||
item.HeaderType = GetQueryDecoded(query, "mode");
|
item.HeaderType = GetQueryDecoded(query, "mode");
|
||||||
var extraDecoded = GetQueryDecoded(query, "extra");
|
item.Extra = GetQueryDecoded(query, "extra");
|
||||||
if (extraDecoded.IsNotEmpty())
|
|
||||||
{
|
|
||||||
var node = JsonUtils.ParseJson(extraDecoded);
|
|
||||||
if (node != null)
|
|
||||||
{
|
|
||||||
extraDecoded = JsonUtils.Serialize(node, new JsonSerializerOptions
|
|
||||||
{
|
|
||||||
WriteIndented = true,
|
|
||||||
DefaultIgnoreCondition = JsonIgnoreCondition.Never,
|
|
||||||
Encoder = JavaScriptEncoder.UnsafeRelaxedJsonEscaping
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
item.Extra = extraDecoded;
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case nameof(ETransport.http):
|
case nameof(ETransport.http):
|
||||||
|
|
|
||||||
|
|
@ -71,25 +71,28 @@ public class DownloaderHelper
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var lastUpdateTime = DateTime.Now;
|
var totalDatetime = DateTime.Now;
|
||||||
|
var totalSecond = 0;
|
||||||
var hasValue = false;
|
var hasValue = false;
|
||||||
double maxSpeed = 0;
|
double maxSpeed = 0;
|
||||||
await using var downloader = new Downloader.DownloadService(downloadOpt);
|
await using var downloader = new Downloader.DownloadService(downloadOpt);
|
||||||
|
//downloader.DownloadStarted += (sender, value) =>
|
||||||
|
//{
|
||||||
|
// if (progress != null)
|
||||||
|
// {
|
||||||
|
// progress.Report("Start download data...");
|
||||||
|
// }
|
||||||
|
//};
|
||||||
downloader.DownloadProgressChanged += (sender, value) =>
|
downloader.DownloadProgressChanged += (sender, value) =>
|
||||||
{
|
{
|
||||||
if (progress != null && value.BytesPerSecondSpeed > 0)
|
var ts = DateTime.Now - totalDatetime;
|
||||||
|
if (progress != null && ts.Seconds > totalSecond)
|
||||||
{
|
{
|
||||||
hasValue = true;
|
hasValue = true;
|
||||||
|
totalSecond = ts.Seconds;
|
||||||
if (value.BytesPerSecondSpeed > maxSpeed)
|
if (value.BytesPerSecondSpeed > maxSpeed)
|
||||||
{
|
{
|
||||||
maxSpeed = value.BytesPerSecondSpeed;
|
maxSpeed = value.BytesPerSecondSpeed;
|
||||||
}
|
|
||||||
|
|
||||||
var ts = DateTime.Now - lastUpdateTime;
|
|
||||||
if (ts.TotalMilliseconds >= 1000)
|
|
||||||
{
|
|
||||||
lastUpdateTime = DateTime.Now;
|
|
||||||
var speed = (maxSpeed / 1000 / 1000).ToString("#0.0");
|
var speed = (maxSpeed / 1000 / 1000).ToString("#0.0");
|
||||||
progress.Report(speed);
|
progress.Report(speed);
|
||||||
}
|
}
|
||||||
|
|
@ -99,19 +102,10 @@ public class DownloaderHelper
|
||||||
{
|
{
|
||||||
if (progress != null)
|
if (progress != null)
|
||||||
{
|
{
|
||||||
if (hasValue && maxSpeed > 0)
|
if (!hasValue && value.Error != null)
|
||||||
{
|
|
||||||
var finalSpeed = (maxSpeed / 1000 / 1000).ToString("#0.0");
|
|
||||||
progress.Report(finalSpeed);
|
|
||||||
}
|
|
||||||
else if (value.Error != null)
|
|
||||||
{
|
{
|
||||||
progress.Report(value.Error?.Message);
|
progress.Report(value.Error?.Message);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
progress.Report("0");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
//progress.Report("......");
|
//progress.Report("......");
|
||||||
|
|
|
||||||
11
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
11
v2rayN/ServiceLib/Resx/ResUI.Designer.cs
generated
|
|
@ -1663,7 +1663,7 @@ namespace ServiceLib.Resx {
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Configuration item 1, Auto add from subscription group 的本地化字符串。
|
/// 查找类似 Configuration List 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static string menuServerList {
|
public static string menuServerList {
|
||||||
get {
|
get {
|
||||||
|
|
@ -1671,15 +1671,6 @@ namespace ServiceLib.Resx {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 查找类似 Configuration Item 2, Select and add from self-built 的本地化字符串。
|
|
||||||
/// </summary>
|
|
||||||
public static string menuServerList2 {
|
|
||||||
get {
|
|
||||||
return ResourceManager.GetString("menuServerList2", resourceCulture);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Configuration 的本地化字符串。
|
/// 查找类似 Configuration 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -1540,7 +1540,7 @@
|
||||||
<value>Remove Child Configuration</value>
|
<value>Remove Child Configuration</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuServerList" xml:space="preserve">
|
<data name="menuServerList" xml:space="preserve">
|
||||||
<value>Configuration item 1, Auto add from subscription group</value>
|
<value>Configuration List</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbFallback" xml:space="preserve">
|
<data name="TbFallback" xml:space="preserve">
|
||||||
<value>Fallback</value>
|
<value>Fallback</value>
|
||||||
|
|
@ -1638,7 +1638,4 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
||||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||||
<value>macOS displays this in the Dock (requires restart)</value>
|
<value>macOS displays this in the Dock (requires restart)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuServerList2" xml:space="preserve">
|
</root>
|
||||||
<value>Configuration Item 2, Select and add from self-built</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
|
||||||
|
|
|
||||||
|
|
@ -1537,7 +1537,7 @@
|
||||||
<value>Supprimer une sous-configuration</value>
|
<value>Supprimer une sous-configuration</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuServerList" xml:space="preserve">
|
<data name="menuServerList" xml:space="preserve">
|
||||||
<value>Configuration item 1, Auto add from subscription group</value>
|
<value>Liste des configurations</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbFallback" xml:space="preserve">
|
<data name="TbFallback" xml:space="preserve">
|
||||||
<value>Basculement (failover)</value>
|
<value>Basculement (failover)</value>
|
||||||
|
|
@ -1635,7 +1635,4 @@ Si un certificat auto-signé est utilisé ou si le système contient une CA non
|
||||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||||
<value>Afficher dans le Dock de macOS (redém. requis)</value>
|
<value>Afficher dans le Dock de macOS (redém. requis)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuServerList2" xml:space="preserve">
|
</root>
|
||||||
<value>Configuration Item 2, Select and add from self-built</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
|
||||||
|
|
|
||||||
|
|
@ -1540,7 +1540,7 @@
|
||||||
<value>Remove Child Configuration</value>
|
<value>Remove Child Configuration</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuServerList" xml:space="preserve">
|
<data name="menuServerList" xml:space="preserve">
|
||||||
<value>Configuration item 1, Auto add from subscription group</value>
|
<value>Configuration List</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbFallback" xml:space="preserve">
|
<data name="TbFallback" xml:space="preserve">
|
||||||
<value>Fallback</value>
|
<value>Fallback</value>
|
||||||
|
|
@ -1638,7 +1638,4 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
||||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||||
<value>macOS displays this in the Dock (requires restart)</value>
|
<value>macOS displays this in the Dock (requires restart)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuServerList2" xml:space="preserve">
|
|
||||||
<value>Configuration Item 2, Select and add from self-built</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
||||||
|
|
@ -1540,7 +1540,7 @@
|
||||||
<value>Remove Child </value>
|
<value>Remove Child </value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuServerList" xml:space="preserve">
|
<data name="menuServerList" xml:space="preserve">
|
||||||
<value>Configuration item 1, Auto add from subscription group</value>
|
<value>Configuration List</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbFallback" xml:space="preserve">
|
<data name="TbFallback" xml:space="preserve">
|
||||||
<value>Fallback</value>
|
<value>Fallback</value>
|
||||||
|
|
@ -1638,7 +1638,4 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
||||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||||
<value>macOS displays this in the Dock (requires restart)</value>
|
<value>macOS displays this in the Dock (requires restart)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuServerList2" xml:space="preserve">
|
|
||||||
<value>Configuration Item 2, Select and add from self-built</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
||||||
|
|
@ -1540,7 +1540,7 @@
|
||||||
<value>Remove Child Configuration</value>
|
<value>Remove Child Configuration</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuServerList" xml:space="preserve">
|
<data name="menuServerList" xml:space="preserve">
|
||||||
<value>Configuration item 1, Auto add from subscription group</value>
|
<value>Configuration List</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbFallback" xml:space="preserve">
|
<data name="TbFallback" xml:space="preserve">
|
||||||
<value>Fallback</value>
|
<value>Fallback</value>
|
||||||
|
|
@ -1638,7 +1638,4 @@ The "Get Certificate" action may fail if a self-signed certificate is used or if
|
||||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||||
<value>macOS displays this in the Dock (requires restart)</value>
|
<value>macOS displays this in the Dock (requires restart)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuServerList2" xml:space="preserve">
|
|
||||||
<value>Configuration Item 2, Select and add from self-built</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
||||||
|
|
@ -1537,7 +1537,7 @@
|
||||||
<value>删除子配置</value>
|
<value>删除子配置</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuServerList" xml:space="preserve">
|
<data name="menuServerList" xml:space="preserve">
|
||||||
<value>子配置项一,从订阅分组中自动添加</value>
|
<value>子配置项</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbFallback" xml:space="preserve">
|
<data name="TbFallback" xml:space="preserve">
|
||||||
<value>故障转移</value>
|
<value>故障转移</value>
|
||||||
|
|
@ -1635,7 +1635,4 @@
|
||||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||||
<value>macOS 在 Dock 栏中显示 (需重启)</value>
|
<value>macOS 在 Dock 栏中显示 (需重启)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuServerList2" xml:space="preserve">
|
|
||||||
<value>子配置项二,从自建中选择添加</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
</root>
|
||||||
|
|
@ -1537,7 +1537,7 @@
|
||||||
<value>刪除子配置</value>
|
<value>刪除子配置</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuServerList" xml:space="preserve">
|
<data name="menuServerList" xml:space="preserve">
|
||||||
<value>子配置項目一,從訂閱分組中自動新增</value>
|
<value>子配置項</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="TbFallback" xml:space="preserve">
|
<data name="TbFallback" xml:space="preserve">
|
||||||
<value>容錯移轉</value>
|
<value>容錯移轉</value>
|
||||||
|
|
@ -1635,7 +1635,4 @@
|
||||||
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
<data name="TbSettingsMacOSShowInDock" xml:space="preserve">
|
||||||
<value>macOS 在 Dock 欄顯示 (需重啟)</value>
|
<value>macOS 在 Dock 欄顯示 (需重啟)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="menuServerList2" xml:space="preserve">
|
</root>
|
||||||
<value>子配置項二,從自建中選擇新增</value>
|
|
||||||
</data>
|
|
||||||
</root>
|
|
||||||
|
|
|
||||||
|
|
@ -323,28 +323,31 @@ public class SpeedtestService(Config config, Func<SpeedTestResult, Task> updateF
|
||||||
{
|
{
|
||||||
var responseTime = -1;
|
var responseTime = -1;
|
||||||
|
|
||||||
if (!IPAddress.TryParse(url, out var ipAddress))
|
|
||||||
{
|
|
||||||
var ipHostInfo = await Dns.GetHostEntryAsync(url);
|
|
||||||
ipAddress = ipHostInfo.AddressList.First();
|
|
||||||
}
|
|
||||||
|
|
||||||
IPEndPoint endPoint = new(ipAddress, port);
|
|
||||||
using Socket clientSocket = new(endPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
|
|
||||||
|
|
||||||
var timer = Stopwatch.StartNew();
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(5));
|
if (!IPAddress.TryParse(url, out var ipAddress))
|
||||||
await clientSocket.ConnectAsync(endPoint, cts.Token).ConfigureAwait(false);
|
{
|
||||||
responseTime = (int)timer.ElapsedMilliseconds;
|
var ipHostInfo = await Dns.GetHostEntryAsync(url);
|
||||||
}
|
ipAddress = ipHostInfo.AddressList.First();
|
||||||
catch (OperationCanceledException)
|
}
|
||||||
{
|
|
||||||
}
|
IPEndPoint endPoint = new(ipAddress, port);
|
||||||
finally
|
using Socket clientSocket = new(endPoint.AddressFamily, SocketType.Stream, ProtocolType.Tcp);
|
||||||
{
|
|
||||||
|
var timer = Stopwatch.StartNew();
|
||||||
|
var result = clientSocket.BeginConnect(endPoint, null, null);
|
||||||
|
if (!result.AsyncWaitHandle.WaitOne(TimeSpan.FromSeconds(5)))
|
||||||
|
{
|
||||||
|
throw new TimeoutException("connect timeout (5s): " + url);
|
||||||
|
}
|
||||||
timer.Stop();
|
timer.Stop();
|
||||||
|
responseTime = (int)timer.Elapsed.TotalMilliseconds;
|
||||||
|
|
||||||
|
clientSocket.EndConnect(result);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Logging.SaveLog(_tag, ex);
|
||||||
}
|
}
|
||||||
return responseTime;
|
return responseTime;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,6 @@ public class ProfilesViewModel : MyReactiveObject
|
||||||
|
|
||||||
public ReactiveCommand<Unit, Unit> AddSubCmd { get; }
|
public ReactiveCommand<Unit, Unit> AddSubCmd { get; }
|
||||||
public ReactiveCommand<Unit, Unit> EditSubCmd { get; }
|
public ReactiveCommand<Unit, Unit> EditSubCmd { get; }
|
||||||
public ReactiveCommand<Unit, Unit> DeleteSubCmd { get; }
|
|
||||||
|
|
||||||
#endregion Menu
|
#endregion Menu
|
||||||
|
|
||||||
|
|
@ -236,10 +235,6 @@ public class ProfilesViewModel : MyReactiveObject
|
||||||
{
|
{
|
||||||
await EditSubAsync(false);
|
await EditSubAsync(false);
|
||||||
});
|
});
|
||||||
DeleteSubCmd = ReactiveCommand.CreateFromTask(async () =>
|
|
||||||
{
|
|
||||||
await DeleteSubAsync();
|
|
||||||
});
|
|
||||||
|
|
||||||
#endregion WhenAnyValue && ReactiveCommand
|
#endregion WhenAnyValue && ReactiveCommand
|
||||||
|
|
||||||
|
|
@ -889,23 +884,5 @@ public class ProfilesViewModel : MyReactiveObject
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task DeleteSubAsync()
|
|
||||||
{
|
|
||||||
var item = await AppManager.Instance.GetSubItem(_config.SubIndexId);
|
|
||||||
if (item is null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (await _updateView?.Invoke(EViewAction.ShowYesNo, null) == false)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
await ConfigHandler.DeleteSubItem(_config, item.Id);
|
|
||||||
|
|
||||||
await RefreshSubscriptions();
|
|
||||||
await SubSelectedChangedAsync(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion Subscription
|
#endregion Subscription
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
ColumnDefinitions="300,Auto,Auto"
|
ColumnDefinitions="180,Auto,Auto"
|
||||||
DockPanel.Dock="Top"
|
DockPanel.Dock="Top"
|
||||||
RowDefinitions="Auto,Auto,Auto,Auto">
|
RowDefinitions="Auto,Auto,Auto,Auto">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
|
|
@ -75,7 +75,7 @@
|
||||||
Grid.Row="3"
|
Grid.Row="3"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="3"
|
Grid.ColumnSpan="3"
|
||||||
ColumnDefinitions="300,Auto,Auto">
|
ColumnDefinitions="180,Auto,Auto">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
|
|
@ -93,7 +93,7 @@
|
||||||
<TabItem HorizontalAlignment="Left" Header="{x:Static resx:ResUI.menuServerList}">
|
<TabItem HorizontalAlignment="Left" Header="{x:Static resx:ResUI.menuServerList}">
|
||||||
<Grid
|
<Grid
|
||||||
Margin="{StaticResource Margin8}"
|
Margin="{StaticResource Margin8}"
|
||||||
ColumnDefinitions="300,Auto,Auto"
|
ColumnDefinitions="180,Auto,Auto"
|
||||||
RowDefinitions="Auto,Auto,Auto">
|
RowDefinitions="Auto,Auto,Auto">
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
|
|
@ -134,7 +134,7 @@
|
||||||
</TabControl>
|
</TabControl>
|
||||||
|
|
||||||
<TabControl>
|
<TabControl>
|
||||||
<TabItem HorizontalAlignment="Left" Header="{x:Static resx:ResUI.menuServerList2}">
|
<TabItem HorizontalAlignment="Left" Header="{x:Static resx:ResUI.menuServerList}">
|
||||||
<DataGrid
|
<DataGrid
|
||||||
x:Name="lstChild"
|
x:Name="lstChild"
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
ColumnDefinitions="300,Auto,Auto"
|
ColumnDefinitions="180,Auto,Auto"
|
||||||
RowDefinitions="Auto,Auto,Auto,Auto">
|
RowDefinitions="Auto,Auto,Auto,Auto">
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
|
|
@ -50,7 +50,7 @@
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<ComboBox
|
<ComboBox
|
||||||
x:Name="cmbCoreType"
|
x:Name="cmbCoreType"
|
||||||
Width="200"
|
Width="100"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
ToolTip.Tip="{x:Static resx:ResUI.TbCoreType}" />
|
ToolTip.Tip="{x:Static resx:ResUI.TbCoreType}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
@ -101,7 +101,7 @@
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="gridVMess"
|
x:Name="gridVMess"
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
ColumnDefinitions="300,Auto,Auto"
|
ColumnDefinitions="180,Auto,Auto"
|
||||||
IsVisible="False"
|
IsVisible="False"
|
||||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto">
|
RowDefinitions="Auto,Auto,Auto,Auto,Auto">
|
||||||
|
|
||||||
|
|
@ -167,7 +167,7 @@
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="gridSs"
|
x:Name="gridSs"
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
ColumnDefinitions="300,Auto"
|
ColumnDefinitions="180,Auto"
|
||||||
IsVisible="False"
|
IsVisible="False"
|
||||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto">
|
RowDefinitions="Auto,Auto,Auto,Auto,Auto">
|
||||||
|
|
||||||
|
|
@ -213,7 +213,7 @@
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="gridSocks"
|
x:Name="gridSocks"
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
ColumnDefinitions="300,Auto"
|
ColumnDefinitions="180,Auto"
|
||||||
IsVisible="False"
|
IsVisible="False"
|
||||||
RowDefinitions="Auto,Auto,Auto,Auto">
|
RowDefinitions="Auto,Auto,Auto,Auto">
|
||||||
|
|
||||||
|
|
@ -246,7 +246,7 @@
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="gridVLESS"
|
x:Name="gridVLESS"
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
ColumnDefinitions="300,Auto,Auto"
|
ColumnDefinitions="180,Auto,Auto"
|
||||||
IsVisible="False"
|
IsVisible="False"
|
||||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto">
|
RowDefinitions="Auto,Auto,Auto,Auto,Auto">
|
||||||
|
|
||||||
|
|
@ -312,7 +312,7 @@
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="gridTrojan"
|
x:Name="gridTrojan"
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
ColumnDefinitions="300,Auto"
|
ColumnDefinitions="180,Auto"
|
||||||
IsVisible="False"
|
IsVisible="False"
|
||||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto">
|
RowDefinitions="Auto,Auto,Auto,Auto,Auto">
|
||||||
|
|
||||||
|
|
@ -358,7 +358,7 @@
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="gridHysteria2"
|
x:Name="gridHysteria2"
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
ColumnDefinitions="300,Auto,Auto"
|
ColumnDefinitions="180,Auto,Auto"
|
||||||
IsVisible="False"
|
IsVisible="False"
|
||||||
RowDefinitions="Auto,Auto,Auto,Auto">
|
RowDefinitions="Auto,Auto,Auto,Auto">
|
||||||
|
|
||||||
|
|
@ -411,7 +411,7 @@
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="gridTuic"
|
x:Name="gridTuic"
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
ColumnDefinitions="300,Auto"
|
ColumnDefinitions="180,Auto"
|
||||||
IsVisible="False"
|
IsVisible="False"
|
||||||
RowDefinitions="Auto,Auto,Auto,Auto">
|
RowDefinitions="Auto,Auto,Auto,Auto">
|
||||||
|
|
||||||
|
|
@ -457,7 +457,7 @@
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="gridWireguard"
|
x:Name="gridWireguard"
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
ColumnDefinitions="300,Auto"
|
ColumnDefinitions="180,Auto"
|
||||||
IsVisible="False"
|
IsVisible="False"
|
||||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto">
|
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto">
|
||||||
|
|
||||||
|
|
@ -534,7 +534,7 @@
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="gridAnytls"
|
x:Name="gridAnytls"
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
ColumnDefinitions="300,Auto"
|
ColumnDefinitions="180,Auto"
|
||||||
IsVisible="False"
|
IsVisible="False"
|
||||||
RowDefinitions="Auto,Auto,Auto">
|
RowDefinitions="Auto,Auto,Auto">
|
||||||
|
|
||||||
|
|
@ -560,7 +560,7 @@
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="gridTransport"
|
x:Name="gridTransport"
|
||||||
Grid.Row="4"
|
Grid.Row="4"
|
||||||
ColumnDefinitions="300,Auto,Auto"
|
ColumnDefinitions="180,Auto,Auto"
|
||||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">
|
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
|
|
@ -692,7 +692,7 @@
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="gridTls"
|
x:Name="gridTls"
|
||||||
Grid.Row="6"
|
Grid.Row="6"
|
||||||
ColumnDefinitions="300,Auto"
|
ColumnDefinitions="180,Auto"
|
||||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto">
|
RowDefinitions="Auto,Auto,Auto,Auto,Auto">
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
|
|
@ -711,7 +711,7 @@
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="gridTlsMore"
|
x:Name="gridTlsMore"
|
||||||
Grid.Row="7"
|
Grid.Row="7"
|
||||||
ColumnDefinitions="300,Auto"
|
ColumnDefinitions="180,Auto"
|
||||||
IsVisible="False"
|
IsVisible="False"
|
||||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto">
|
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto">
|
||||||
|
|
||||||
|
|
@ -831,7 +831,7 @@
|
||||||
<Grid
|
<Grid
|
||||||
x:Name="gridRealityMore"
|
x:Name="gridRealityMore"
|
||||||
Grid.Row="7"
|
Grid.Row="7"
|
||||||
ColumnDefinitions="300,Auto"
|
ColumnDefinitions="180,Auto"
|
||||||
IsVisible="False"
|
IsVisible="False"
|
||||||
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto">
|
RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto">
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,14 +28,6 @@
|
||||||
<WrapPanel />
|
<WrapPanel />
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
</ListBox.ItemsPanel>
|
</ListBox.ItemsPanel>
|
||||||
|
|
||||||
<ListBox.ContextMenu>
|
|
||||||
<ContextMenu>
|
|
||||||
<MenuItem x:Name="menuSubEdit" Header="{x:Static resx:ResUI.menuSubEdit}" />
|
|
||||||
<MenuItem x:Name="menuSubAdd" Header="{x:Static resx:ResUI.menuSubAdd}" />
|
|
||||||
<MenuItem x:Name="menuSubDelete" Header="{x:Static resx:ResUI.menuSubDelete}" />
|
|
||||||
</ContextMenu>
|
|
||||||
</ListBox.ContextMenu>
|
|
||||||
</ListBox>
|
</ListBox>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
|
|
|
||||||
|
|
@ -49,9 +49,6 @@ public partial class ProfilesView : ReactiveUserControl<ProfilesViewModel>
|
||||||
this.Bind(ViewModel, vm => vm.ServerFilter, v => v.txtServerFilter.Text).DisposeWith(disposables);
|
this.Bind(ViewModel, vm => vm.ServerFilter, v => v.txtServerFilter.Text).DisposeWith(disposables);
|
||||||
this.BindCommand(ViewModel, vm => vm.AddSubCmd, v => v.btnAddSub).DisposeWith(disposables);
|
this.BindCommand(ViewModel, vm => vm.AddSubCmd, v => v.btnAddSub).DisposeWith(disposables);
|
||||||
this.BindCommand(ViewModel, vm => vm.EditSubCmd, v => v.btnEditSub).DisposeWith(disposables);
|
this.BindCommand(ViewModel, vm => vm.EditSubCmd, v => v.btnEditSub).DisposeWith(disposables);
|
||||||
this.BindCommand(ViewModel, vm => vm.EditSubCmd, v => v.menuSubEdit).DisposeWith(disposables);
|
|
||||||
this.BindCommand(ViewModel, vm => vm.AddSubCmd, v => v.menuSubAdd).DisposeWith(disposables);
|
|
||||||
this.BindCommand(ViewModel, vm => vm.DeleteSubCmd, v => v.menuSubDelete).DisposeWith(disposables);
|
|
||||||
|
|
||||||
//servers delete
|
//servers delete
|
||||||
this.BindCommand(ViewModel, vm => vm.EditServerCmd, v => v.menuEditServer).DisposeWith(disposables);
|
this.BindCommand(ViewModel, vm => vm.EditServerCmd, v => v.menuEditServer).DisposeWith(disposables);
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ public partial class ThemeSettingView : ReactiveUserControl<ThemeSettingViewMode
|
||||||
ViewModel = new ThemeSettingViewModel();
|
ViewModel = new ThemeSettingViewModel();
|
||||||
|
|
||||||
cmbCurrentTheme.ItemsSource = Utils.GetEnumNames<ETheme>();
|
cmbCurrentTheme.ItemsSource = Utils.GetEnumNames<ETheme>();
|
||||||
cmbCurrentFontSize.ItemsSource = Enumerable.Range(Global.MinFontSize, Global.MinFontSizeCount).ToList();
|
cmbCurrentFontSize.ItemsSource = Enumerable.Range(Global.MinFontSize, 11).ToList();
|
||||||
cmbCurrentLanguage.ItemsSource = Global.Languages;
|
cmbCurrentLanguage.ItemsSource = Global.Languages;
|
||||||
|
|
||||||
this.WhenActivated(disposables =>
|
this.WhenActivated(disposables =>
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="300" />
|
<ColumnDefinition Width="180" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
@ -111,7 +111,7 @@
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="3">
|
Grid.ColumnSpan="3">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="300" />
|
<ColumnDefinition Width="180" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
@ -143,7 +143,7 @@
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="300" />
|
<ColumnDefinition Width="180" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
@ -191,7 +191,7 @@
|
||||||
</TabControl>
|
</TabControl>
|
||||||
|
|
||||||
<TabControl>
|
<TabControl>
|
||||||
<TabItem HorizontalAlignment="Left" Header="{x:Static resx:ResUI.menuServerList2}">
|
<TabItem HorizontalAlignment="Left" Header="{x:Static resx:ResUI.menuServerList}">
|
||||||
<DataGrid
|
<DataGrid
|
||||||
x:Name="lstChild"
|
x:Name="lstChild"
|
||||||
AutoGenerateColumns="False"
|
AutoGenerateColumns="False"
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="300" />
|
<ColumnDefinition Width="180" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
@ -87,7 +87,7 @@
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<ComboBox
|
<ComboBox
|
||||||
x:Name="cmbCoreType"
|
x:Name="cmbCoreType"
|
||||||
Width="200"
|
Width="100"
|
||||||
Margin="{StaticResource Margin4}"
|
Margin="{StaticResource Margin4}"
|
||||||
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.TbCoreType}"
|
materialDesign:HintAssist.Hint="{x:Static resx:ResUI.TbCoreType}"
|
||||||
Style="{StaticResource DefComboBox}" />
|
Style="{StaticResource DefComboBox}" />
|
||||||
|
|
@ -157,7 +157,7 @@
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="300" />
|
<ColumnDefinition Width="180" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
@ -241,7 +241,7 @@
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="300" />
|
<ColumnDefinition Width="180" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
@ -300,7 +300,7 @@
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="300" />
|
<ColumnDefinition Width="180" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
@ -346,7 +346,7 @@
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="300" />
|
<ColumnDefinition Width="180" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
@ -430,7 +430,7 @@
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="300" />
|
<ColumnDefinition Width="180" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
@ -489,7 +489,7 @@
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="300" />
|
<ColumnDefinition Width="180" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
@ -559,7 +559,7 @@
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="300" />
|
<ColumnDefinition Width="180" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
@ -621,7 +621,7 @@
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="300" />
|
<ColumnDefinition Width="180" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
@ -715,7 +715,7 @@
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="300" />
|
<ColumnDefinition Width="180" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
@ -753,7 +753,7 @@
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="300" />
|
<ColumnDefinition Width="180" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
@ -899,7 +899,7 @@
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="300" />
|
<ColumnDefinition Width="180" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
@ -931,7 +931,7 @@
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="300" />
|
<ColumnDefinition Width="180" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
@ -1067,7 +1067,7 @@
|
||||||
<RowDefinition Height="Auto" />
|
<RowDefinition Height="Auto" />
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="300" />
|
<ColumnDefinition Width="180" />
|
||||||
<ColumnDefinition Width="Auto" />
|
<ColumnDefinition Width="Auto" />
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ public partial class ThemeSettingView
|
||||||
ViewModel = new ThemeSettingViewModel();
|
ViewModel = new ThemeSettingViewModel();
|
||||||
|
|
||||||
cmbCurrentTheme.ItemsSource = Utils.GetEnumNames<ETheme>().Take(3).ToList();
|
cmbCurrentTheme.ItemsSource = Utils.GetEnumNames<ETheme>().Take(3).ToList();
|
||||||
cmbCurrentFontSize.ItemsSource = Enumerable.Range(Global.MinFontSize, Global.MinFontSizeCount).ToList();
|
cmbCurrentFontSize.ItemsSource = Enumerable.Range(Global.MinFontSize, 11).ToList();
|
||||||
cmbCurrentLanguage.ItemsSource = Global.Languages;
|
cmbCurrentLanguage.ItemsSource = Global.Languages;
|
||||||
|
|
||||||
this.WhenActivated(disposables =>
|
this.WhenActivated(disposables =>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue