Skip to content

Latest commit

 

History

History
214 lines (167 loc) · 5.13 KB

File metadata and controls

214 lines (167 loc) · 5.13 KB
external help file SimpleMenu-help.xml
Module Name SimpleMenu
online version
schema 2.0.0

New-SMMenuItem

SYNOPSIS

Create SimpleMenu item

SYNTAX

New-SMMenuItem [[-Title] <String>] [-ForegroundColor <ConsoleColor>] [-Id <Object>] [-Key <ConsoleKey>]
 [-Action <ScriptBlock>] [-Quit] [-Pause] [-Submenu <PSObject>] [-Detailed] [-Disabled]
 [-ArgumentList <Object[]>] [<CommonParameters>]

DESCRIPTION

Create SImpleMenu item and set custom key, action to be performed and other options.

EXAMPLES

Example 1

PS C:\> {{ Add example code here }}

{{ Add example description here }}

PARAMETERS

-Action

Scriptblock to be invoked when menu item is selected.

Type: ScriptBlock
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ArgumentList

{{Fill ArgumentList Description}}

Type: Object[]
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Detailed

Use a SMBoardItem to display the result. Perfect when you have more than a few lines to display. The back navigation arrow will also shows and send the user back to the menu.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Disabled

Set the menu item to disabled. A menu item can also be disabled/enabled if $_.Disabled = $true or $false is set in the action block of that same item.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ForegroundColor

Foreground color of menu item.

Type: ConsoleColor
Parameter Sets: (All)
Aliases:
Accepted values: Black, DarkBlue, DarkGreen, DarkCyan, DarkRed, DarkMagenta, DarkYellow, Gray, DarkGray, Blue, Green, Cyan, Red, Magenta, Yellow, White

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Id

ID of menu item. Used to get item and perform changes after creation (optional)

Type: Object
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Key

Letter character associated to the menu item. If none defined, a number will be assigned to the item instead.

Type: ConsoleKey
Parameter Sets: (All)
Aliases:
Accepted values: Backspace, Tab, Clear, Enter, Pause, Escape, Spacebar, PageUp, PageDown, End, Home, LeftArrow, UpArrow, RightArrow, DownArrow, Select, Print, Execute, PrintScreen, Insert, Delete, Help, D0, D1, D2, D3, D4, D5, D6, D7, D8, D9, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, LeftWindows, RightWindows, Applications, Sleep, NumPad0, NumPad1, NumPad2, NumPad3, NumPad4, NumPad5, NumPad6, NumPad7, NumPad8, NumPad9, Multiply, Add, Separator, Subtract, Decimal, Divide, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, BrowserBack, BrowserForward, BrowserRefresh, BrowserStop, BrowserSearch, BrowserFavorites, BrowserHome, VolumeMute, VolumeDown, VolumeUp, MediaNext, MediaPrevious, MediaStop, MediaPlay, LaunchMail, LaunchMediaSelect, LaunchApp1, LaunchApp2, Oem1, OemPlus, OemComma, OemMinus, OemPeriod, Oem2, Oem3, Oem4, Oem5, Oem6, Oem7, Oem8, Oem102, Process, Packet, Attention, CrSel, ExSel, EraseEndOfFile, Play, Zoom, NoName, Pa1, OemClear

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Pause

Pause after invoking action (Default:False)

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Quit

If defined, choosing this menu item will exit the current menu. If the current menu is a submenu, this will bring back to parent menu,

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Submenu

Set this menu item to open a submenu as action.

Type: PSObject
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Title

Display text of menu item.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

RELATED LINKS