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

33 lines
828 B
PowerShell

class tag {
[int]$id
[string]$Type
[bool]$ShowTag
[System.Drawing.Color]$BGColor
[System.Drawing.Color]$FGColor
[bool]$Compress
[bool]$Locked
[bool]$UpdateTag
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.ToBool($compress)
$this.Locked = $this.ToBool($locked)
$this.UpdateTag = $updateTag
}
[string] ToString() {
return $this.Type
}
hidden [bool]ToBool([string]$str) {
if ($str -eq "Yes") {
return $true
} else {
return $false
}
}
}