Files
ps.ipam/classlib/tag.cs
2022-12-05 08:48:37 +03:00

43 lines
1.0 KiB
C#

namespace PS.IPAM;
public class Tag {
public int Id { get; }
public string Type { get; }
public bool ShowTag { get; }
public string BGColor { get; }
public string FGColor { get; }
public bool Compress { get; }
public bool Locked { get; }
public bool UpdateTag { get; }
public Tag(
int id,
string type,
bool showTag,
string BGColor,
string FGColor,
string compress,
string locked,
bool updateTag
) {
this.Id = id;
this.Type = type;
this.ShowTag = showTag;
this.BGColor = BGColor;
this.FGColor = FGColor;
this.Compress = this.StringToBool(compress);
this.Locked = this.StringToBool(locked);
this.UpdateTag = updateTag;
}
public override string ToString() {
return this.Type;
}
private bool StringToBool(string str) {
if (str == "Yes") {
return true;
}
return false;
}
}