From 4e350e3cdfd394be94a9c9cd19caac11090fea5a Mon Sep 17 00:00:00 2001 From: Marco Wende Date: Wed, 10 Jun 2026 21:57:52 +0200 Subject: [PATCH] Add PolicyCheckModel.ps1 --- MVVM/Models/PolicyCheckModel.ps1 | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 MVVM/Models/PolicyCheckModel.ps1 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" } + } + } +}