Code clean
This commit is contained in:
@@ -106,9 +106,9 @@ namespace ClashN.Handler
|
|||||||
if (!string.IsNullOrEmpty(result))
|
if (!string.IsNullOrEmpty(result))
|
||||||
{
|
{
|
||||||
var serverStatItem = config_.GetProfileItem(config_.IndexId);
|
var serverStatItem = config_.GetProfileItem(config_.IndexId);
|
||||||
|
|
||||||
ParseOutput(result, out ulong up, out ulong down);
|
ParseOutput(result, out ulong up, out ulong down);
|
||||||
if (serverStatItem != null && (up + down) > 0)
|
if (serverStatItem != null && (up + down) > 0)
|
||||||
{
|
{
|
||||||
serverStatItem.uploadRemote += up;
|
serverStatItem.uploadRemote += up;
|
||||||
serverStatItem.downloadRemote += down;
|
serverStatItem.downloadRemote += down;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
Clash = 1,
|
Clash = 1,
|
||||||
ClashMeta = 2,
|
ClashMeta = 2,
|
||||||
ClashPremium = 3,
|
ClashPremium = 3,
|
||||||
Mihomo = 4,
|
Mihomo = 4,
|
||||||
ClashN = 99
|
ClashN = 99
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -14,7 +14,6 @@ using System.Net.NetworkInformation;
|
|||||||
using System.Net.Sockets;
|
using System.Net.Sockets;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using System.Runtime.Serialization.Formatters.Binary;
|
|
||||||
using System.Security.Principal;
|
using System.Security.Principal;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
@@ -613,7 +612,7 @@ namespace ClashN
|
|||||||
}
|
}
|
||||||
return Path.Combine(startupPath, fileName);
|
return Path.Combine(startupPath, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取启动了应用程序的数据文件的路径
|
/// 获取启动了应用程序的数据文件的路径
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -909,7 +908,7 @@ namespace ClashN
|
|||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static T DeepCopy<T>(T obj)
|
public static T DeepCopy<T>(T obj)
|
||||||
{
|
{
|
||||||
return FromJson<T>(ToJson(obj, false))!;
|
return FromJson<T>(ToJson(obj, false))!;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -14,8 +14,10 @@ namespace ClashN.ViewModels
|
|||||||
private NoticeHandler? _noticeHandler;
|
private NoticeHandler? _noticeHandler;
|
||||||
|
|
||||||
public ReactiveCommand<Unit, Unit> CheckUpdateCmd { get; }
|
public ReactiveCommand<Unit, Unit> CheckUpdateCmd { get; }
|
||||||
|
|
||||||
//public ReactiveCommand<Unit, Unit> CheckUpdateClashCoreCmd { get; }
|
//public ReactiveCommand<Unit, Unit> CheckUpdateClashCoreCmd { get; }
|
||||||
public ReactiveCommand<Unit, Unit> CheckUpdateMihomoCoreCmd { get; }
|
public ReactiveCommand<Unit, Unit> CheckUpdateMihomoCoreCmd { get; }
|
||||||
|
|
||||||
//public ReactiveCommand<Unit, Unit> CheckUpdateGeoDataCmd { get; }
|
//public ReactiveCommand<Unit, Unit> CheckUpdateGeoDataCmd { get; }
|
||||||
|
|
||||||
public HelpViewModel()
|
public HelpViewModel()
|
||||||
@@ -40,7 +42,7 @@ namespace ClashN.ViewModels
|
|||||||
// CheckUpdateGeoData();
|
// CheckUpdateGeoData();
|
||||||
//});
|
//});
|
||||||
}
|
}
|
||||||
|
|
||||||
//private void CheckUpdateGeoData()
|
//private void CheckUpdateGeoData()
|
||||||
//{
|
//{
|
||||||
// void _updateUI(bool success, string msg)
|
// void _updateUI(bool success, string msg)
|
||||||
|
|||||||
@@ -96,7 +96,6 @@
|
|||||||
</DockPanel>
|
</DockPanel>
|
||||||
</materialDesign:Card>
|
</materialDesign:Card>
|
||||||
|
|
||||||
|
|
||||||
<materialDesign:Card
|
<materialDesign:Card
|
||||||
Width="300"
|
Width="300"
|
||||||
Margin="8"
|
Margin="8"
|
||||||
@@ -133,8 +132,6 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
</materialDesign:Card>
|
</materialDesign:Card>
|
||||||
|
|
||||||
|
|
||||||
</WrapPanel>
|
</WrapPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|||||||
@@ -23,9 +23,9 @@
|
|||||||
<PackageReference Include="TaskScheduler" Version="2.10.1" />
|
<PackageReference Include="TaskScheduler" Version="2.10.1" />
|
||||||
<PackageReference Include="YamlDotNet" Version="13.7.1" />
|
<PackageReference Include="YamlDotNet" Version="13.7.1" />
|
||||||
<PackageReference Include="ZXing.Net.Bindings.Windows.Compatibility" Version="0.16.12" />
|
<PackageReference Include="ZXing.Net.Bindings.Windows.Compatibility" Version="0.16.12" />
|
||||||
<PackageReference Include="ReactiveUI.Fody" Version="19.5.31" />
|
<PackageReference Include="ReactiveUI.Fody" Version="19.5.39" />
|
||||||
<PackageReference Include="ReactiveUI.Validation" Version="3.1.7" />
|
<PackageReference Include="ReactiveUI.Validation" Version="3.1.7" />
|
||||||
<PackageReference Include="ReactiveUI.WPF" Version="19.5.31" />
|
<PackageReference Include="ReactiveUI.WPF" Version="19.5.39" />
|
||||||
<PackageReference Include="Splat.NLog" Version="14.8.12" />
|
<PackageReference Include="Splat.NLog" Version="14.8.12" />
|
||||||
<PackageReference Include="System.Reactive" Version="6.0.0" />
|
<PackageReference Include="System.Reactive" Version="6.0.0" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
Reference in New Issue
Block a user