From 3b86b99813cfbd3f11b6d4a565190e2ea05bbe4d Mon Sep 17 00:00:00 2001 From: Marius Storhaug Date: Thu, 26 Oct 2023 07:10:46 +0200 Subject: [PATCH] removed menu as its currently not used --- src/GitHub/private/Menu/Invoke-DrawMenu.ps1 | 29 --------------------- src/GitHub/private/Menu/Invoke-Menu.ps1 | 29 --------------------- 2 files changed, 58 deletions(-) delete mode 100644 src/GitHub/private/Menu/Invoke-DrawMenu.ps1 delete mode 100644 src/GitHub/private/Menu/Invoke-Menu.ps1 diff --git a/src/GitHub/private/Menu/Invoke-DrawMenu.ps1 b/src/GitHub/private/Menu/Invoke-DrawMenu.ps1 deleted file mode 100644 index 4ca69a42..00000000 --- a/src/GitHub/private/Menu/Invoke-DrawMenu.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -function Invoke-DrawMenu { - ## supportfunction to the Menu function below - param ( - $menuItems, - $menuPosition, - $menuTitel - ) - $fcolor = $host.UI.RawUI.ForegroundColor - $bcolor = $host.UI.RawUI.BackgroundColor - $l = $menuItems.length + 1 - Clear-Host - $menuwidth = $menuTitel.length + 4 - Write-Host "`t" -NoNewline - Write-Host ('*' * $menuwidth) -fore $fcolor -back $bcolor - Write-Host "`t" -NoNewline - Write-Host "* $menuTitel *" -fore $fcolor -back $bcolor - Write-Host "`t" -NoNewline - Write-Host ('*' * $menuwidth) -fore $fcolor -back $bcolor - Write-Host '' - Write-Debug "L: $l MenuItems: $menuItems MenuPosition: $menuposition" - for ($i = 0; $i -le $l; $i++) { - Write-Host "`t" -NoNewline - if ($i -eq $menuPosition) { - Write-Host "$($menuItems[$i])" -fore $bcolor -back $fcolor - } else { - Write-Host "$($menuItems[$i])" -fore $fcolor -back $bcolor - } - } -} diff --git a/src/GitHub/private/Menu/Invoke-Menu.ps1 b/src/GitHub/private/Menu/Invoke-Menu.ps1 deleted file mode 100644 index 7059a10f..00000000 --- a/src/GitHub/private/Menu/Invoke-Menu.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -function Invoke-Menu { - ## Generate a small "DOS-like" menu. - ## Choose a menuitem using up and down arrows, select by pressing ENTER - param ( - [array]$menuItems, - $menuTitel = 'MENU' - ) - $vkeycode = 0 - $pos = 0 - Invoke-DrawMenu $menuItems $pos $menuTitel - while ($vkeycode -ne 13) { - $press = $host.ui.rawui.readkey('NoEcho,IncludeKeyDown') - $vkeycode = $press.virtualkeycode - Write-Host "$($press.character)" -NoNewline - if ($vkeycode -eq 38) { $pos-- } - if ($vkeycode -eq 40) { $pos++ } - if ($pos -lt 0) { $pos = 0 } - if ($pos -ge $menuItems.length) { $pos = $menuItems.length - 1 } - Invoke-DrawMenu $menuItems $pos $menuTitel - } - $($menuItems[$pos]) -} - - -<# -? What account do you want to log into? [Use arrows to move, type to filter] -> GitHub.com - GitHub Enterprise Server -#>