mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-08-10 01:51:18 +10:00
Clean up analyzer warnings across app search and ISO workflows (#4794)
* Clean up analyzer warnings * Align analyzer warning cleanup policy * Run PSScriptAnalyzer directly in unittests workflow * Bind lazy-rendered buttons to click handlers * Remove WinUtil performance tracing * Fix Win11 ISO creator temp directory reuse
This commit is contained in:
@@ -193,6 +193,7 @@ function Show-CustomDialog {
|
||||
# Define the Regex to find hyperlinks formatted as HTML <a> tags
|
||||
$regex = [regex]::new('<a href="([^"]+)">([^<]+)</a>')
|
||||
$lastPos = 0
|
||||
$linkHoverBrush = $LinkHoverForegroundColor
|
||||
|
||||
# Iterate through each match and add regular text and hyperlinks
|
||||
foreach ($match in $regex.Matches($Message)) {
|
||||
@@ -210,20 +211,23 @@ function Show-CustomDialog {
|
||||
$hyperlink.Foreground = $LinkForegroundColor
|
||||
|
||||
$hyperlink.Add_Click({
|
||||
param($sender, $args)
|
||||
Start-Process $sender.NavigateUri.AbsoluteUri
|
||||
param($eventSender, $routedEvent)
|
||||
$null = $routedEvent
|
||||
Start-Process $eventSender.NavigateUri.AbsoluteUri
|
||||
})
|
||||
$hyperlink.Add_MouseEnter({
|
||||
param($sender, $args)
|
||||
$sender.Foreground = $LinkHoverForegroundColor
|
||||
$sender.FontSize = ($FontSize + ($FontSize / 4))
|
||||
$sender.FontWeight = "SemiBold"
|
||||
param($eventSender, $routedEvent)
|
||||
$null = $routedEvent
|
||||
$eventSender.Foreground = $linkHoverBrush
|
||||
$eventSender.FontSize = ($FontSize + ($FontSize / 4))
|
||||
$eventSender.FontWeight = "SemiBold"
|
||||
})
|
||||
$hyperlink.Add_MouseLeave({
|
||||
param($sender, $args)
|
||||
$sender.Foreground = $LinkForegroundColor
|
||||
$sender.FontSize = $FontSize
|
||||
$sender.FontWeight = "Normal"
|
||||
param($eventSender, $routedEvent)
|
||||
$null = $routedEvent
|
||||
$eventSender.Foreground = $LinkForegroundColor
|
||||
$eventSender.FontSize = $FontSize
|
||||
$eventSender.FontWeight = "Normal"
|
||||
})
|
||||
|
||||
$messageTextBlock.Inlines.Add($hyperlink)
|
||||
|
||||
Reference in New Issue
Block a user