Code clean

pull/4457/head
2dust 2023-11-28 16:07:53 +08:00
parent 81efd25e0a
commit 12be8bda52
14 changed files with 28 additions and 30 deletions

View File

@ -1,9 +1,9 @@
<Application
x:Class="v2rayN.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:conv="clr-namespace:v2rayN.Converters"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
ShutdownMode="OnExplicitShutdown"
StartupUri="Views/MainWindow.xaml">
<Application.Resources>

View File

@ -205,7 +205,6 @@ namespace v2rayN.Handler
};
}
LazyConfig.Instance.SetConfig(config);
return 0;
}

View File

@ -62,7 +62,6 @@ namespace v2rayN.Handler
Utils.SaveLog("Tun mode restart the core once");
}
}
});
}
}

View File

@ -256,8 +256,8 @@ namespace v2rayN.Handler
// Constants
public const int RAS_MaxEntryName = 256;
public const int MAX_PATH = 260; // Standard MAX_PATH value in Windows
public const int MAX_PATH = 260; // Standard MAX_PATH value in Windows
}
#endregion WinInet structures
@ -310,6 +310,7 @@ namespace v2rayN.Handler
[DllImport("WinInet.dll", SetLastError = true, CharSet = CharSet.Auto)]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool InternetSetOption(IntPtr hInternet, InternetOption dwOption, IntPtr lpBuffer, int dwBufferLength);
[DllImport("Rasapi32.dll", CharSet = CharSet.Auto)]
public static extern uint RasEnumEntries(
string? reserved, // Reserved, must be null

View File

@ -1,10 +1,5 @@
using PacLib;
using System.Diagnostics;
using System.IO;
using System.Text;
using v2rayN.Mode;
using v2rayN.Properties;
using v2rayN.Tool;
namespace v2rayN.Handler
{
@ -33,7 +28,6 @@ namespace v2rayN.Handler
static SysProxyHandle()
{
}
public static bool UpdateSysProxy(Config config, bool forceDisable)

View File

@ -148,11 +148,14 @@ namespace v2rayN.ViewModels
public ReactiveCommand<Unit, Unit> CheckUpdateNCmd { get; }
public ReactiveCommand<Unit, Unit> CheckUpdateV2flyCoreCmd { get; }
//public ReactiveCommand<Unit, Unit> CheckUpdateSagerNetCoreCmd { get; }
public ReactiveCommand<Unit, Unit> CheckUpdateXrayCoreCmd { get; }
//public ReactiveCommand<Unit, Unit> CheckUpdateClashCoreCmd { get; }
//public ReactiveCommand<Unit, Unit> CheckUpdateClashMetaCoreCmd { get; }
public ReactiveCommand<Unit, Unit> CheckUpdateSingBoxCoreCmd { get; }
public ReactiveCommand<Unit, Unit> CheckUpdateGeoCmd { get; }
public ReactiveCommand<Unit, Unit> ReloadCmd { get; }

View File

@ -1,12 +1,12 @@
<reactiveui:ReactiveWindow
x:Class="v2rayN.Views.AddServerWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:conv="clr-namespace:v2rayN.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:reactiveui="http://reactiveui.net"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:conv="clr-namespace:v2rayN.Converters"
xmlns:resx="clr-namespace:v2rayN.Resx"
xmlns:vms="clr-namespace:v2rayN.ViewModels"
Title="{x:Static resx:ResUI.menuServers}"

View File

@ -328,21 +328,27 @@ namespace v2rayN.Views
case Key.V:
ViewModel?.AddServerViaClipboard();
break;
case Key.P:
ViewModel?.ServerSpeedtest(ESpeedActionType.Ping);
break;
case Key.O:
ViewModel?.ServerSpeedtest(ESpeedActionType.Tcping);
break;
case Key.R:
ViewModel?.ServerSpeedtest(ESpeedActionType.Realping);
break;
case Key.S:
_ = ViewModel?.ScanScreenTaskAsync();
break;
case Key.T:
ViewModel?.ServerSpeedtest(ESpeedActionType.Speedtest);
break;
case Key.E:
ViewModel?.ServerSpeedtest(ESpeedActionType.Mixedtest);
break;

View File

@ -309,7 +309,6 @@
Margin="{StaticResource SettingItemMargin}"
Style="{StaticResource DefComboBox}" />
<TextBlock
Grid.Row="15"
Grid.Column="0"
@ -335,10 +334,7 @@
Margin="{StaticResource SettingItemMargin}"
materialDesign:HintAssist.Hint="Down"
Style="{StaticResource DefTextBox}" />
</StackPanel>
</Grid>
</ScrollViewer>
</TabItem>