Skip to content

Commit

Permalink
✨快捷设置网卡
Browse files Browse the repository at this point in the history
  • Loading branch information
Monika1313 committed Jul 16, 2024
1 parent 794e60c commit 4dd7c1f
Show file tree
Hide file tree
Showing 9 changed files with 367 additions and 168 deletions.
3 changes: 3 additions & 0 deletions Modules/Wu.CommTool.Modules.NetworkTool/GlobalUsings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@
global using Wu.ViewModels;
global using Wu.Wpf.Common;
global using Wu.Wpf.Extensions;
global using Newtonsoft.Json;
global using Microsoft.Win32;
global using System.IO;
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ public ExecuteCmdResult(int exitCode, string message)
Message = message;
}



/// <summary>
/// 状态 false失败 true成功
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,39 @@
namespace Wu.CommTool.Modules.NetworkTool.Models;
using ImTools;
using System.Linq;

namespace Wu.CommTool.Modules.NetworkTool.Models;

public partial class NetworkCardConfig : ObservableObject
{
/// <summary>
/// 配置名称
/// </summary>
[ObservableProperty]
string configName = "";

/// <summary>
/// Ipv4地址列表
/// </summary>
[ObservableProperty]
ObservableCollection<Ipv4> ipv4s = [];


[RelayCommand]
[property: JsonIgnore]
public void DeleteLine(Ipv4 obj)
{
if (obj == null)
return;
if (Ipv4s.Contains(obj))
{
Ipv4s.Remove(obj);
}
}

[RelayCommand]
[property: JsonIgnore]
public void AddNewLine()
{
Ipv4s.Add(new Ipv4());
}
}
Loading

0 comments on commit 4dd7c1f

Please sign in to comment.