-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
794e60c
commit 4dd7c1f
Showing
9 changed files
with
367 additions
and
168 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 30 additions & 1 deletion
31
Modules/Wu.CommTool.Modules.NetworkTool/Models/NetworkCardConfig.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()); | ||
} | ||
} |
Oops, something went wrong.