-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from shugaoye/main
Build 2.0.2
- Loading branch information
Showing
9 changed files
with
130 additions
and
31 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
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace PassXYZLib | ||
{ | ||
public interface IKeyValue | ||
{ | ||
string Key { get; set; } | ||
string Value { get; set; } | ||
bool IsValid { get => !(string.IsNullOrEmpty(Key) || string.IsNullOrEmpty(Value)); } | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace PassXYZLib | ||
{ | ||
public class NewField : Field | ||
{ | ||
public NewField(string key = "", string value="", bool isProtected=false) : base(key, value, isProtected) | ||
{ | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using KPCLib; | ||
using PassXYZLib; | ||
|
||
namespace PassXYZLib | ||
{ | ||
public class NewItem : Item | ||
{ | ||
private readonly Guid uid = new(); | ||
public override string Id | ||
{ | ||
get | ||
{ | ||
return uid.ToString(); | ||
} | ||
} | ||
public override string Name { get; set; } = default!; | ||
public override string Notes { get; set; } = default!; | ||
public override bool IsGroup { get => (SubType == ItemSubType.Group); } | ||
public override DateTime LastModificationTime { get; set; } = default!; | ||
public override string Description | ||
{ | ||
get | ||
{ | ||
return $"{ItemType} | {LastModificationTime.ToString("yyyy'-'MM'-'dd")} | {Notes}".Truncate(50); | ||
} | ||
} | ||
public ItemSubType SubType { get; set; } = ItemSubType.Group; | ||
public string ItemType | ||
{ | ||
get => SubType.ToString(); | ||
set | ||
{ | ||
SubType = SubType.GetItemSubType(value); | ||
} | ||
} | ||
} | ||
} |
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
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