Improve 'Invoke-WPFTab' Parameter by specifying its type (as expected by the function) and make it Mandatory

This commit is contained in:
Mr.k 2024-10-25 13:11:53 +03:00
parent fdd32f441f
commit f98d3be85e
No known key found for this signature in database

View File

@ -10,7 +10,10 @@ function Invoke-WPFTab {
#>
Param ($ClickedTab)
Param (
[Parameter(Mandatory,position=0)]
[string]$ClickedTab
)
$tabNav = Get-WinUtilVariables | Where-Object {$psitem -like "WPFTabNav"}
$tabNumber = [int]($ClickedTab -replace "WPFTab","" -replace "BT","") - 1