Code clean

pull/6245/head
2dust 2024-12-07 16:29:58 +08:00
parent 83ad83b135
commit bf8bbbdcb0
4 changed files with 4 additions and 3 deletions

View File

@ -10,7 +10,7 @@ namespace ServiceLib.Services.Statistics
private ClientWebSocket? webSocket; private ClientWebSocket? webSocket;
private Action<ServerSpeedItem>? _updateFunc; private Action<ServerSpeedItem>? _updateFunc;
private string Url => $"ws://{Global.Loopback}:{AppHandler.Instance.StatePort2}/traffic"; private string Url => $"ws://{Global.Loopback}:{AppHandler.Instance.StatePort2}/traffic";
public StatisticsSingboxService(Config config, Action<ServerSpeedItem> updateFunc) public StatisticsSingboxService(Config config, Action<ServerSpeedItem> updateFunc)
{ {
_config = config; _config = config;

View File

@ -459,7 +459,7 @@ namespace ServiceLib.ViewModels
if (_config.Inbound.First().NewPort4LAN) if (_config.Inbound.First().NewPort4LAN)
{ {
StringBuilder sb2 = new(); StringBuilder sb2 = new();
sb2.Append($"[{EInboundProtocol.mixed}:{AppHandler.Instance.GetLocalPort(EInboundProtocol.socks2)}]"); sb2.Append($"[{EInboundProtocol.mixed}:{AppHandler.Instance.GetLocalPort(EInboundProtocol.socks2)}]");
InboundLanDisplay = $"{ResUI.LabLAN}:{sb2}"; InboundLanDisplay = $"{ResUI.LabLAN}:{sb2}";
} }
else else

View File

@ -152,7 +152,7 @@ namespace v2rayN.Desktop.Views
menuGlobalHotkeySetting.IsVisible = false; menuGlobalHotkeySetting.IsVisible = false;
} }
menuAddServerViaScan.IsVisible = false; menuAddServerViaScan.IsVisible = false;
RestoreUI(); RestoreUI();
AddHelpMenuItem(); AddHelpMenuItem();
//WindowsHandler.Instance.RegisterGlobalHotkey(_config, OnHotkeyHandler, null); //WindowsHandler.Instance.RegisterGlobalHotkey(_config, OnHotkeyHandler, null);

View File

@ -51,6 +51,7 @@ namespace v2rayN.Views
{ {
AutofitColumnWidth(); AutofitColumnWidth();
} }
private void AutofitColumnWidth() private void AutofitColumnWidth()
{ {
foreach (var it in lstConnections.Columns) foreach (var it in lstConnections.Columns)