Here's what I have so far:
这是我到目前为止所拥有的:
foreach($group in $userBGroups.Items) {
if($_.State -eq 'Selected') {
try {
$brush = New-Object System.Drawing.SolidBrush([System.Drawing.Color]::LightBlue)
$_.Graphics.FillRectangle($brush, $_.bounds)
} finally {
$brush.Dispose()
}
} elseif($group -eq $lbItem) {
try {
$brush = New-Object System.Drawing.SolidBrush([System.Drawing.Color]::LightGreen)
$_.Graphics.FillRectangle($brush, $_.Bounds)
} finally {
$brush.Dispose()
}
}
}
fo