This is a script that allows a user to show a GUI for loading while their program is working in the background It can be used both in determinate and indeterminate scenarios
$exampleA = show-LoadingScreen -note "Waiting "
$i=0
while($i -lt 99){
$i++
Start-Sleep -Milliseconds 50
}
$exampleA.Close()
$exampleB = show-LoadingScreen
$i=0
while($i -lt 99){
$exampleB.update($i, "$(100-$i)% Left")
$i++
Start-Sleep -Milliseconds 50
}
$exampleB.Close()
$exampleC = show-LoadingScreen
$i=0
while($i -lt 99){
$exampleC.updatePercent($i)
$i++
Start-Sleep -Milliseconds 50
}
$exampleC.Close()
$exampleD = show-LoadingScreen
$i=0
while($i -lt 99){
$exampleD.updateNote("$(100-$i)% Left")
$i++
Start-Sleep -Milliseconds 50
}
$exampleD.Close()