diff --git a/functions/private/Get-LocalizedYesNo.ps1 b/functions/private/Get-LocalizedYesNo.ps1 deleted file mode 100644 index 01be563f..00000000 --- a/functions/private/Get-LocalizedYesNo.ps1 +++ /dev/null @@ -1,34 +0,0 @@ -function Get-LocalizedYesNo { - <# - .SYNOPSIS - This function runs choice.exe and captures its output to extract yes no in a localized Windows - - .DESCRIPTION - The function retrieves the output of the command 'cmd /c "choice nul"' and converts the default output for Yes and No - in the localized format, such as "Yes=, No=". - - .EXAMPLE - $yesNoArray = Get-LocalizedYesNo - Write-Host "Yes=$($yesNoArray[0]), No=$($yesNoArray[1])" - #> - - # Run choice and capture its options as output - # The output shows the options for Yes and No as "[Y,N]?" in the (partially) localized format. - # eg. English: [Y,N]? - # Dutch: [Y,N]? - # German: [J,N]? - # French: [O,N]? - # Spanish: [S,N]? - # Italian: [S,N]? - # Russian: [Y,N]? - - $line = cmd /c "choice nul" - $charactersArray = @() - $regexPattern = '([a-zA-Z])' - $charactersArray = [regex]::Matches($line, $regexPattern) | ForEach-Object { $_.Groups[1].Value } - - Write-Debug "According to takeown.exe local Yes is $charactersArray[0]" - # Return the array of characters - return $charactersArray - - } diff --git a/functions/private/Get-WPFObjectName.ps1 b/functions/private/Get-WPFObjectName.ps1 deleted file mode 100644 index 5875bfbf..00000000 --- a/functions/private/Get-WPFObjectName.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -function Get-WPFObjectName { - <# - .SYNOPSIS - This is a helper function that generates an objectname with the prefix WPF that can be used as a Powershell Variable after compilation. - To achieve this, all characters that are not a-z, A-Z or 0-9 are simply removed from the name. - - .PARAMETER type - The type of object for which the name should be generated. (e.g. Label, Button, CheckBox...) - - .PARAMETER name - The name or description to be used for the object. (invalid characters are removed) - - .OUTPUTS - A string that can be used as a object/variable name in powershell. - For example: WPFLabelMicrosoftTools - - .EXAMPLE - Get-WPFObjectName -type Label -name "Microsoft Tools" - #> - - param( - [Parameter(Mandatory, position=0)] - [string]$type, - - [Parameter(position=1)] - [string]$name - ) - - $Output = $("WPF"+$type+$name) -replace '[^a-zA-Z0-9]', '' - return $Output -}