Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
790209efbc | ||
|
|
f1679e444c | ||
|
|
9dc6ba182a | ||
|
|
785a30e623 | ||
|
|
f09efdad66 | ||
|
|
4e73b3ae28 | ||
|
|
6213f86f81 | ||
|
|
0a6955cd59 | ||
|
|
6ee8f03ec0 | ||
|
|
b1a82d95c2 | ||
|
|
30bc9ded29 | ||
|
|
5a32892e94 | ||
|
|
e33de896b6 | ||
|
|
3ba92444a5 | ||
|
|
4f120e8eb4 |
@@ -42,10 +42,11 @@ namespace v2rayN
|
|||||||
Global.processJob = new Job();
|
Global.processJob = new Job();
|
||||||
|
|
||||||
Logging.Setup();
|
Logging.Setup();
|
||||||
|
Init();
|
||||||
|
Logging.LoggingEnabled(_config.guiItem.enableLog);
|
||||||
Utils.SaveLog($"v2rayN start up | {Utils.GetVersion()} | {Utils.GetExePath()}");
|
Utils.SaveLog($"v2rayN start up | {Utils.GetVersion()} | {Utils.GetExePath()}");
|
||||||
Logging.ClearLogs();
|
Logging.ClearLogs();
|
||||||
|
|
||||||
Init();
|
|
||||||
|
|
||||||
Thread.CurrentThread.CurrentUICulture = new(_config.uiItem.currentLanguage);
|
Thread.CurrentThread.CurrentUICulture = new(_config.uiItem.currentLanguage);
|
||||||
|
|
||||||
|
|||||||
@@ -800,16 +800,15 @@ namespace v2rayN.Handler
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int DedupServerList(ref Config config, ref List<ProfileItem> lstProfile)
|
public static Tuple<int, int> DedupServerList(Config config, string subId)
|
||||||
{
|
{
|
||||||
List<ProfileItem> source = lstProfile;
|
var lstProfile = LazyConfig.Instance.ProfileItems(subId);
|
||||||
bool keepOlder = config.guiItem.keepOlderDedupl;
|
|
||||||
|
|
||||||
List<ProfileItem> lstKeep = new();
|
List<ProfileItem> lstKeep = new();
|
||||||
List<ProfileItem> lstRemove = new();
|
List<ProfileItem> lstRemove = new();
|
||||||
if (!keepOlder) source.Reverse(); // Remove the early items first
|
if (config.guiItem.keepOlderDedupl) lstProfile.Reverse();
|
||||||
|
|
||||||
foreach (ProfileItem item in source)
|
foreach (ProfileItem item in lstProfile)
|
||||||
{
|
{
|
||||||
if (!lstKeep.Exists(i => CompareProfileItem(i, item, false)))
|
if (!lstKeep.Exists(i => CompareProfileItem(i, item, false)))
|
||||||
{
|
{
|
||||||
@@ -822,7 +821,7 @@ namespace v2rayN.Handler
|
|||||||
}
|
}
|
||||||
RemoveServer(config, lstRemove);
|
RemoveServer(config, lstRemove);
|
||||||
|
|
||||||
return lstKeep.Count;
|
return new Tuple<int, int>(lstProfile.Count, lstKeep.Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int AddServerCommon(ref Config config, ProfileItem profileItem, bool toFile = true)
|
public static int AddServerCommon(ref Config config, ProfileItem profileItem, bool toFile = true)
|
||||||
@@ -956,7 +955,7 @@ namespace v2rayN.Handler
|
|||||||
//exist sub items
|
//exist sub items
|
||||||
if (isSub && !Utils.IsNullOrEmpty(subid))
|
if (isSub && !Utils.IsNullOrEmpty(subid))
|
||||||
{
|
{
|
||||||
var existItem = lstOriSub?.FirstOrDefault(t => CompareProfileItem(t, profileItem, true));
|
var existItem = lstOriSub?.FirstOrDefault(t => t.isSub == isSub && CompareProfileItem(t, profileItem, true));
|
||||||
if (existItem != null)
|
if (existItem != null)
|
||||||
{
|
{
|
||||||
profileItem.indexId = existItem.indexId;
|
profileItem.indexId = existItem.indexId;
|
||||||
|
|||||||
@@ -1390,7 +1390,7 @@ namespace v2rayN.Handler
|
|||||||
Utils.SaveLog(ex.Message, ex);
|
Utils.SaveLog(ex.Message, ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
log(configCopy, ref v2rayConfig, false);
|
log(configCopy, ref v2rayConfig, true);
|
||||||
//routing(config, ref v2rayConfig);
|
//routing(config, ref v2rayConfig);
|
||||||
//dns(configCopy, ref v2rayConfig);
|
//dns(configCopy, ref v2rayConfig);
|
||||||
|
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ namespace v2rayN.Handler
|
|||||||
if (Utils.IsNullOrEmpty(fileName))
|
if (Utils.IsNullOrEmpty(fileName))
|
||||||
{
|
{
|
||||||
string msg = string.Format(ResUI.NotFoundCore, Utils.GetBinPath("", coreInfo.coreType), string.Join(", ", coreInfo.coreExes.ToArray()), coreInfo.coreUrl);
|
string msg = string.Format(ResUI.NotFoundCore, Utils.GetBinPath("", coreInfo.coreType), string.Join(", ", coreInfo.coreExes.ToArray()), coreInfo.coreUrl);
|
||||||
|
Utils.SaveLog(msg);
|
||||||
ShowMsg(false, msg);
|
ShowMsg(false, msg);
|
||||||
}
|
}
|
||||||
return fileName;
|
return fileName;
|
||||||
@@ -213,6 +214,7 @@ namespace v2rayN.Handler
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
|
Utils.SaveLog(Utils.ToJson(node));
|
||||||
Utils.SaveLog(ex.Message, ex);
|
Utils.SaveLog(ex.Message, ex);
|
||||||
string msg = ex.Message;
|
string msg = ex.Message;
|
||||||
ShowMsg(true, msg);
|
ShowMsg(true, msg);
|
||||||
|
|||||||
@@ -197,6 +197,18 @@ namespace v2rayN.Handler
|
|||||||
{
|
{
|
||||||
dicQuery.Add("fp", Utils.UrlEncode(item.fingerprint));
|
dicQuery.Add("fp", Utils.UrlEncode(item.fingerprint));
|
||||||
}
|
}
|
||||||
|
if (!Utils.IsNullOrEmpty(item.publicKey))
|
||||||
|
{
|
||||||
|
dicQuery.Add("pbk", Utils.UrlEncode(item.publicKey));
|
||||||
|
}
|
||||||
|
if (!Utils.IsNullOrEmpty(item.shortId))
|
||||||
|
{
|
||||||
|
dicQuery.Add("sid", Utils.UrlEncode(item.shortId));
|
||||||
|
}
|
||||||
|
if (!Utils.IsNullOrEmpty(item.spiderX))
|
||||||
|
{
|
||||||
|
dicQuery.Add("spx", Utils.UrlEncode(item.spiderX));
|
||||||
|
}
|
||||||
|
|
||||||
dicQuery.Add("type", !Utils.IsNullOrEmpty(item.network) ? item.network : "tcp");
|
dicQuery.Add("type", !Utils.IsNullOrEmpty(item.network) ? item.network : "tcp");
|
||||||
|
|
||||||
@@ -756,6 +768,10 @@ namespace v2rayN.Handler
|
|||||||
item.sni = query["sni"] ?? "";
|
item.sni = query["sni"] ?? "";
|
||||||
item.alpn = Utils.UrlDecode(query["alpn"] ?? "");
|
item.alpn = Utils.UrlDecode(query["alpn"] ?? "");
|
||||||
item.fingerprint = Utils.UrlDecode(query["fp"] ?? "");
|
item.fingerprint = Utils.UrlDecode(query["fp"] ?? "");
|
||||||
|
item.publicKey = Utils.UrlDecode(query["pbk"] ?? "");
|
||||||
|
item.shortId = Utils.UrlDecode(query["sid"] ?? "");
|
||||||
|
item.spiderX = Utils.UrlDecode(query["spx"] ?? "");
|
||||||
|
|
||||||
item.network = query["type"] ?? "tcp";
|
item.network = query["type"] ?? "tcp";
|
||||||
switch (item.network)
|
switch (item.network)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -175,24 +175,20 @@ namespace v2rayN.Handler
|
|||||||
|
|
||||||
foreach (var item in subItem)
|
foreach (var item in subItem)
|
||||||
{
|
{
|
||||||
if (item.enabled == false)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (!Utils.IsNullOrEmpty(subId) && item.id != subId)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
string id = item.id.TrimEx();
|
string id = item.id.TrimEx();
|
||||||
string url = item.url.TrimEx();
|
string url = item.url.TrimEx();
|
||||||
string userAgent = item.userAgent.TrimEx();
|
string userAgent = item.userAgent.TrimEx();
|
||||||
string hashCode = $"{item.remarks}->";
|
string hashCode = $"{item.remarks}->";
|
||||||
if (Utils.IsNullOrEmpty(id) || Utils.IsNullOrEmpty(url))
|
if (Utils.IsNullOrEmpty(id) || Utils.IsNullOrEmpty(url) || (!Utils.IsNullOrEmpty(subId) && item.id != subId))
|
||||||
{
|
{
|
||||||
//_updateFunc(false, $"{hashCode}{ResUI.MsgNoValidSubscription}");
|
//_updateFunc(false, $"{hashCode}{ResUI.MsgNoValidSubscription}");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
if (item.enabled == false)
|
||||||
|
{
|
||||||
|
_updateFunc(false, $"{hashCode}{ResUI.MsgSkipSubscriptionUpdate}");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
var downloadHandle = new DownloadHandle();
|
var downloadHandle = new DownloadHandle();
|
||||||
downloadHandle.Error += (sender2, args) =>
|
downloadHandle.Error += (sender2, args) =>
|
||||||
|
|||||||
@@ -103,8 +103,10 @@ namespace v2rayN.Mode
|
|||||||
public bool enableSecurityProtocolTls13 { get; set; }
|
public bool enableSecurityProtocolTls13 { get; set; }
|
||||||
|
|
||||||
public int trayMenuServersLimit { get; set; } = 20;
|
public int trayMenuServersLimit { get; set; } = 20;
|
||||||
|
|
||||||
public bool enableHWA { get; set; } = true;
|
public bool enableHWA { get; set; } = false;
|
||||||
|
|
||||||
|
public bool enableLog { get; set; } = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
[Serializable]
|
[Serializable]
|
||||||
|
|||||||
18
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
18
v2rayN/v2rayN/Resx/ResUI.Designer.cs
generated
@@ -1446,6 +1446,15 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Updates are not enabled, skip this subscription 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string MsgSkipSubscriptionUpdate {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("MsgSkipSubscriptionUpdate", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 Start getting subscriptions 的本地化字符串。
|
/// 查找类似 Start getting subscriptions 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -2995,6 +3004,15 @@ namespace v2rayN.Resx {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查找类似 Please turn off when there is an abnormal disconnection 的本地化字符串。
|
||||||
|
/// </summary>
|
||||||
|
public static string TipDisplayLog {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("TipDisplayLog", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查找类似 *Default value tcp 的本地化字符串。
|
/// 查找类似 *Default value tcp 的本地化字符串。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1147,4 +1147,10 @@
|
|||||||
<data name="SpeedtestingWait" xml:space="preserve">
|
<data name="SpeedtestingWait" xml:space="preserve">
|
||||||
<value>Waiting for testing</value>
|
<value>Waiting for testing</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="TipDisplayLog" xml:space="preserve">
|
||||||
|
<value>Please turn off when there is an abnormal disconnection</value>
|
||||||
|
</data>
|
||||||
|
<data name="MsgSkipSubscriptionUpdate" xml:space="preserve">
|
||||||
|
<value>Updates are not enabled, skip this subscription</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -1147,4 +1147,10 @@
|
|||||||
<data name="SpeedtestingWait" xml:space="preserve">
|
<data name="SpeedtestingWait" xml:space="preserve">
|
||||||
<value>等待测试中...</value>
|
<value>等待测试中...</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="TipDisplayLog" xml:space="preserve">
|
||||||
|
<value>当有异常断流时请关闭</value>
|
||||||
|
</data>
|
||||||
|
<data name="MsgSkipSubscriptionUpdate" xml:space="preserve">
|
||||||
|
<value>未启用更新,跳过此订阅</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@@ -17,6 +17,13 @@ namespace v2rayN.Tool
|
|||||||
config.LoggingRules.Add(new LoggingRule("*", LogLevel.Debug, fileTarget));
|
config.LoggingRules.Add(new LoggingRule("*", LogLevel.Debug, fileTarget));
|
||||||
LogManager.Configuration = config;
|
LogManager.Configuration = config;
|
||||||
}
|
}
|
||||||
|
public static void LoggingEnabled(bool enable)
|
||||||
|
{
|
||||||
|
if (!enable)
|
||||||
|
{
|
||||||
|
LogManager.SuspendLogging();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void ClearLogs()
|
public static void ClearLogs()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -282,6 +282,8 @@ namespace v2rayN
|
|||||||
.Replace(Environment.NewLine, "")
|
.Replace(Environment.NewLine, "")
|
||||||
.Replace("\n", "")
|
.Replace("\n", "")
|
||||||
.Replace("\r", "")
|
.Replace("\r", "")
|
||||||
|
.Replace('_', '/')
|
||||||
|
.Replace('-', '+')
|
||||||
.Replace(" ", "");
|
.Replace(" ", "");
|
||||||
|
|
||||||
if (plainText.Length % 4 > 0)
|
if (plainText.Length % 4 > 0)
|
||||||
@@ -312,7 +314,7 @@ namespace v2rayN
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
SaveLog(ex.Message, ex);
|
//SaveLog(ex.Message, ex);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -324,7 +326,7 @@ namespace v2rayN
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
SaveLog(ex.Message, ex);
|
//SaveLog(ex.Message, ex);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -337,7 +339,7 @@ namespace v2rayN
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
SaveLog(ex.Message, ex);
|
//SaveLog(ex.Message, ex);
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -778,7 +780,7 @@ namespace v2rayN
|
|||||||
task.Settings.RunOnlyIfIdle = false;
|
task.Settings.RunOnlyIfIdle = false;
|
||||||
task.Settings.IdleSettings.StopOnIdleEnd = false;
|
task.Settings.IdleSettings.StopOnIdleEnd = false;
|
||||||
task.Settings.ExecutionTimeLimit = TimeSpan.Zero;
|
task.Settings.ExecutionTimeLimit = TimeSpan.Zero;
|
||||||
task.Triggers.Add(new LogonTrigger { UserId = logonUser, Delay = TimeSpan.FromMinutes(1) });
|
task.Triggers.Add(new LogonTrigger { UserId = logonUser, Delay = TimeSpan.FromSeconds(10) });
|
||||||
task.Principal.RunLevel = TaskRunLevel.Highest;
|
task.Principal.RunLevel = TaskRunLevel.Highest;
|
||||||
task.Actions.Add(new ExecAction(deamonFileName));
|
task.Actions.Add(new ExecAction(deamonFileName));
|
||||||
|
|
||||||
@@ -907,13 +909,13 @@ namespace v2rayN
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string? GetClipboardData()
|
public static string? GetClipboardData()
|
||||||
{
|
{
|
||||||
string strData = string.Empty;
|
string? strData = string.Empty;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
IDataObject data = Clipboard.GetDataObject();
|
IDataObject data = Clipboard.GetDataObject();
|
||||||
if (data.GetDataPresent(DataFormats.UnicodeText))
|
if (data.GetDataPresent(DataFormats.UnicodeText))
|
||||||
{
|
{
|
||||||
strData = data.GetData(DataFormats.UnicodeText).ToString();
|
strData = data.GetData(DataFormats.UnicodeText)?.ToString();
|
||||||
}
|
}
|
||||||
return strData;
|
return strData;
|
||||||
}
|
}
|
||||||
@@ -1150,17 +1152,23 @@ namespace v2rayN
|
|||||||
|
|
||||||
public static void SaveLog(string strContent)
|
public static void SaveLog(string strContent)
|
||||||
{
|
{
|
||||||
var logger = LogManager.GetLogger("Log1");
|
if (LogManager.IsLoggingEnabled())
|
||||||
logger.Info(strContent);
|
{
|
||||||
|
var logger = LogManager.GetLogger("Log1");
|
||||||
|
logger.Info(strContent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public static void SaveLog(string strTitle, Exception ex)
|
public static void SaveLog(string strTitle, Exception ex)
|
||||||
{
|
{
|
||||||
var logger = LogManager.GetLogger("Log2");
|
if (LogManager.IsLoggingEnabled())
|
||||||
logger.Debug($"{strTitle},{ex.Message}");
|
|
||||||
logger.Debug(ex.StackTrace);
|
|
||||||
if (ex?.InnerException != null)
|
|
||||||
{
|
{
|
||||||
logger.Error(ex.InnerException);
|
var logger = LogManager.GetLogger("Log2");
|
||||||
|
logger.Debug($"{strTitle},{ex.Message}");
|
||||||
|
logger.Debug(ex.StackTrace);
|
||||||
|
if (ex?.InnerException != null)
|
||||||
|
{
|
||||||
|
logger.Error(ex.InnerException);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -971,11 +971,10 @@ namespace v2rayN.ViewModels
|
|||||||
|
|
||||||
private void RemoveDuplicateServer()
|
private void RemoveDuplicateServer()
|
||||||
{
|
{
|
||||||
int oldCount = _lstProfile.Count;
|
var tuple = ConfigHandler.DedupServerList(_config, _subId);
|
||||||
int newCount = ConfigHandler.DedupServerList(ref _config, ref _lstProfile);
|
|
||||||
RefreshServers();
|
RefreshServers();
|
||||||
Reload();
|
Reload();
|
||||||
_noticeHandler?.Enqueue(string.Format(ResUI.RemoveDuplicateServerResult, oldCount, newCount));
|
_noticeHandler?.Enqueue(string.Format(ResUI.RemoveDuplicateServerResult, tuple.Item1, tuple.Item2));
|
||||||
}
|
}
|
||||||
private void CopyServer()
|
private void CopyServer()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -137,12 +137,19 @@
|
|||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Style="{StaticResource ToolbarTextBlock}"
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
Text="{x:Static resx:ResUI.TbDisplayLog}" />
|
Text="{x:Static resx:ResUI.TbDisplayLog}" />
|
||||||
<ToggleButton
|
<StackPanel
|
||||||
x:Name="togDisplayLog"
|
|
||||||
Grid.Row="4"
|
Grid.Row="4"
|
||||||
Grid.Column="1"
|
Grid.Column="1"
|
||||||
Margin="4"
|
Margin="4"
|
||||||
HorizontalAlignment="Left" />
|
Orientation="Horizontal">
|
||||||
|
<ToggleButton x:Name="togDisplayLog" HorizontalAlignment="Left" />
|
||||||
|
<TextBlock
|
||||||
|
Margin="8,0"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
|
Text="{x:Static resx:ResUI.TipDisplayLog}" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="5"
|
Grid.Row="5"
|
||||||
@@ -176,7 +183,7 @@
|
|||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Margin="16"
|
Margin="8"
|
||||||
HorizontalAlignment="Center">
|
HorizontalAlignment="Center">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="200" />
|
<ColumnDefinition Width="200" />
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
xmlns:resx="clr-namespace:v2rayN.Resx"
|
xmlns:resx="clr-namespace:v2rayN.Resx"
|
||||||
xmlns:vms="clr-namespace:v2rayN.ViewModels"
|
xmlns:vms="clr-namespace:v2rayN.ViewModels"
|
||||||
Title="{x:Static resx:ResUI.menuServers}"
|
Title="{x:Static resx:ResUI.menuServers}"
|
||||||
Width="800"
|
Width="820"
|
||||||
Height="830"
|
Height="820"
|
||||||
x:TypeArguments="vms:AddServerViewModel"
|
x:TypeArguments="vms:AddServerViewModel"
|
||||||
Background="{DynamicResource MaterialDesignPaper}"
|
Background="{DynamicResource MaterialDesignPaper}"
|
||||||
FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
|
FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
|
||||||
@@ -742,7 +742,7 @@
|
|||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Row="9"
|
Grid.Row="9"
|
||||||
Margin="16"
|
Margin="8"
|
||||||
HorizontalAlignment="Center">
|
HorizontalAlignment="Center">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="200" />
|
<ColumnDefinition Width="200" />
|
||||||
|
|||||||
@@ -150,7 +150,7 @@
|
|||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
Margin="16"
|
Margin="8"
|
||||||
HorizontalAlignment="Center">
|
HorizontalAlignment="Center">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="150" />
|
<ColumnDefinition Width="150" />
|
||||||
|
|||||||
@@ -15,8 +15,8 @@
|
|||||||
Title="v2rayN"
|
Title="v2rayN"
|
||||||
Width="900"
|
Width="900"
|
||||||
Height="700"
|
Height="700"
|
||||||
MinWidth="800"
|
MinWidth="900"
|
||||||
MinHeight="600"
|
MinHeight="700"
|
||||||
x:TypeArguments="vms:MainWindowViewModel"
|
x:TypeArguments="vms:MainWindowViewModel"
|
||||||
Background="{DynamicResource MaterialDesignPaper}"
|
Background="{DynamicResource MaterialDesignPaper}"
|
||||||
FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
|
FontFamily="{x:Static conv:MaterialDesignFonts.MyFont}"
|
||||||
@@ -837,9 +837,10 @@
|
|||||||
Height="Auto"
|
Height="Auto"
|
||||||
Background="{DynamicResource MaterialDesignLightBackground}"
|
Background="{DynamicResource MaterialDesignLightBackground}"
|
||||||
BorderBrush="{DynamicResource MaterialDesignDarkBackground}"
|
BorderBrush="{DynamicResource MaterialDesignDarkBackground}"
|
||||||
BorderThickness="1">
|
BorderThickness="0"
|
||||||
|
CornerRadius="4">
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="2"
|
Margin="8"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Foreground="{DynamicResource MaterialDesignDarkBackground}"
|
Foreground="{DynamicResource MaterialDesignDarkBackground}"
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ namespace v2rayN.Views
|
|||||||
{
|
{
|
||||||
WindowState = WindowState.Minimized;
|
WindowState = WindowState.Minimized;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!_config.guiItem.enableHWA)
|
if (!_config.guiItem.enableHWA)
|
||||||
{
|
{
|
||||||
RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly;
|
RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly;
|
||||||
@@ -445,8 +445,15 @@ namespace v2rayN.Views
|
|||||||
var item2 = (MyDGTextColumn)lstProfiles.Columns[k];
|
var item2 = (MyDGTextColumn)lstProfiles.Columns[k];
|
||||||
if (item2.ExName == item.Name)
|
if (item2.ExName == item.Name)
|
||||||
{
|
{
|
||||||
item2.Width = item.Width;
|
if (item.Width <= 0)
|
||||||
item2.DisplayIndex = i + 1;
|
{
|
||||||
|
item2.Visibility = Visibility.Hidden;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
item2.Width = item.Width;
|
||||||
|
item2.DisplayIndex = i + 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -471,7 +478,7 @@ namespace v2rayN.Views
|
|||||||
lvColumnItem.Add(new()
|
lvColumnItem.Add(new()
|
||||||
{
|
{
|
||||||
Name = item2.ExName,
|
Name = item2.ExName,
|
||||||
Width = Convert.ToInt32(item2.ActualWidth),
|
Width = item2.Visibility == Visibility.Visible ? Convert.ToInt32(item2.ActualWidth) : 0,
|
||||||
Index = item2.DisplayIndex
|
Index = item2.DisplayIndex
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
TextOptions.TextRenderingMode="Auto"
|
TextOptions.TextRenderingMode="Auto"
|
||||||
WindowStartupLocation="CenterScreen"
|
WindowStartupLocation="CenterScreen"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<DockPanel Margin="16">
|
<DockPanel Margin="8">
|
||||||
<Grid HorizontalAlignment="Center" DockPanel.Dock="Bottom">
|
<Grid HorizontalAlignment="Center" DockPanel.Dock="Bottom">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="200" />
|
<ColumnDefinition Width="200" />
|
||||||
@@ -753,14 +753,14 @@
|
|||||||
Width="300"
|
Width="300"
|
||||||
Margin="{StaticResource SettingItemMargin}"
|
Margin="{StaticResource SettingItemMargin}"
|
||||||
Style="{StaticResource DefComboBox}" />
|
Style="{StaticResource DefComboBox}" />
|
||||||
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Grid.Row="18"
|
Grid.Row="18"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="{StaticResource SettingItemMargin}"
|
Margin="{StaticResource SettingItemMargin}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Style="{StaticResource ToolbarTextBlock}"
|
Style="{StaticResource ToolbarTextBlock}"
|
||||||
Text="{x:Static resx:ResUI.TbSettingsEnableHWA}"/>
|
Text="{x:Static resx:ResUI.TbSettingsEnableHWA}" />
|
||||||
<ToggleButton
|
<ToggleButton
|
||||||
x:Name="togEnableHWA"
|
x:Name="togEnableHWA"
|
||||||
Grid.Row="18"
|
Grid.Row="18"
|
||||||
|
|||||||
@@ -134,7 +134,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
Margin="16"
|
Margin="8"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
DockPanel.Dock="Bottom">
|
DockPanel.Dock="Bottom">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
</ToolBarTray>
|
</ToolBarTray>
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
Margin="16"
|
Margin="8"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
DockPanel.Dock="Bottom">
|
DockPanel.Dock="Bottom">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
|||||||
@@ -114,7 +114,7 @@
|
|||||||
</ToolBarTray>
|
</ToolBarTray>
|
||||||
|
|
||||||
<Grid
|
<Grid
|
||||||
Margin="16"
|
Margin="8"
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
DockPanel.Dock="Bottom">
|
DockPanel.Dock="Bottom">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
|||||||
@@ -162,7 +162,7 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
<Grid
|
<Grid
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Margin="16"
|
Margin="8"
|
||||||
HorizontalAlignment="Center">
|
HorizontalAlignment="Center">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="200" />
|
<ColumnDefinition Width="200" />
|
||||||
|
|||||||
@@ -10,11 +10,11 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<ApplicationIcon>v2rayN.ico</ApplicationIcon>
|
<ApplicationIcon>v2rayN.ico</ApplicationIcon>
|
||||||
<Copyright>Copyright © 2017-2023 (GPLv3)</Copyright>
|
<Copyright>Copyright © 2017-2023 (GPLv3)</Copyright>
|
||||||
<FileVersion>6.18</FileVersion>
|
<FileVersion>6.20</FileVersion>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Downloader" Version="3.0.3" />
|
<PackageReference Include="Downloader" Version="3.0.4" />
|
||||||
<PackageReference Include="MaterialDesignThemes" Version="4.7.1" />
|
<PackageReference Include="MaterialDesignThemes" Version="4.7.1" />
|
||||||
<PackageReference Include="Hardcodet.NotifyIcon.Wpf" Version="1.1.0" />
|
<PackageReference Include="Hardcodet.NotifyIcon.Wpf" Version="1.1.0" />
|
||||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
|
|||||||
Reference in New Issue
Block a user