Skip to content

Commit

Permalink
Code clean
Browse files Browse the repository at this point in the history
  • Loading branch information
2dust committed Nov 3, 2024
1 parent 258e822 commit e0eb73b
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion v2rayN/ServiceLib/Global.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class Global
public const string ClashMixinYaml = NamespaceSample + "clash_mixin_yaml";
public const string ClashTunYaml = NamespaceSample + "clash_tun_yaml";
public const string LinuxAutostartConfig = NamespaceSample + "linux_autostart_config";

public const string DefaultSecurity = "auto";
public const string DefaultNetwork = "tcp";
public const string TcpHeaderHttp = "http";
Expand Down
2 changes: 1 addition & 1 deletion v2rayN/ServiceLib/Handler/AutoStartupHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static void AutoStartTaskService(string taskName, string fileName, string
{
return;
}

var logonUser = WindowsIdentity.GetCurrent().Name;
using var taskService = new Microsoft.Win32.TaskScheduler.TaskService();
var tasks = taskService.RootFolder.GetTasks(new Regex(taskName));
Expand Down
2 changes: 1 addition & 1 deletion v2rayN/ServiceLib/Handler/ConfigHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1197,7 +1197,7 @@ private static async Task<int> AddBatchServers4Custom(Config config, string strD
{
await RemoveServerViaSubid(config, subid, isSub);
}

profileItem.Subid = subid;
profileItem.IsSub = isSub;
profileItem.PreSocksPort = preSocksPort;
Expand Down
3 changes: 2 additions & 1 deletion v2rayN/ServiceLib/Services/SpeedtestService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Diagnostics;
using System.Net;
using System.Net.Sockets;

namespace ServiceLib.Services
{
public class SpeedtestService
Expand Down Expand Up @@ -85,7 +86,7 @@ public SpeedtestService(Config config, List<ProfileItem> selecteds, ESpeedAction

private void ExitLoop(string x)
{
if(_exitLoop) return;
if (_exitLoop) return;
_exitLoop = true;
UpdateFunc("", ResUI.SpeedtestingStop);
}
Expand Down
2 changes: 1 addition & 1 deletion v2rayN/ServiceLib/ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ public void SetStatisticsResult(ServerSpeedItem update)
try
{
Locator.Current.GetService<StatusBarViewModel>()?.UpdateStatistics(update);
if ((update.ProxyUp + update.ProxyDown) > 0 && DateTime.Now.Second % 3 == 0)
if ((update.ProxyUp + update.ProxyDown) > 0 && DateTime.Now.Second % 9 == 0)
{
Locator.Current.GetService<ProfilesViewModel>()?.UpdateStatistics(update);
}
Expand Down
1 change: 0 additions & 1 deletion v2rayN/ServiceLib/ViewModels/ProfilesViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,6 @@ public async Task ServerSpeedtest(ESpeedActionType actionType)
//ClearTestResult();

_ = new SpeedtestService(_config, lstSelecteds, actionType, UpdateSpeedtestHandler);

}

public void ServerSpeedtestStop()
Expand Down
2 changes: 1 addition & 1 deletion v2rayN/v2rayN.Desktop/Views/OptionSettingWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ private async Task<bool> UpdateViewHandler(EViewAction action, object? obj)
{
switch (action)
{
case EViewAction.CloseWindow:
case EViewAction.CloseWindow:
this.Close(true);
break;

Expand Down

0 comments on commit e0eb73b

Please sign in to comment.