diff --git a/MVVM/Models/PolicyCheckModel.ps1 b/MVVM/Models/PolicyCheckModel.ps1 new file mode 100644 index 0000000..498b062 --- /dev/null +++ b/MVVM/Models/PolicyCheckModel.ps1 @@ -0,0 +1,24 @@ +class PolicyCheckModel { + [string] $Status # OK | WARN | FEHLER | INFO + [string] $Policy + [string] $CurrentValue + [string] $Solution + [string] $RegistryPath + + PolicyCheckModel([string]$status, [string]$policy, [string]$value, [string]$solution, [string]$regPath) { + $this.Status = $status + $this.Policy = $policy + $this.CurrentValue= $value + $this.Solution = $solution + $this.RegistryPath= $regPath + } + + [string] StatusColor() { + switch ($this.Status) { + "FEHLER" { return "#FFCCCC" } + "WARN" { return "#FFF5CC" } + "OK" { return "#CCFFCC" } + default { return "#E8F0FF" } + } + } +}