@@ -90,8 +90,8 @@ function Show-AnyBox
9090 [Parameter (ParameterSetName = ' create' )]
9191 [string ]$Image ,
9292 [Parameter (ParameterSetName = ' create' )]
93- [Alias (' m' , ' Msg ' )]
94- [string []]$Message ,
93+ [Alias (' m' , ' Message ' )]
94+ [string []]$Messages ,
9595 [Parameter (ParameterSetName = ' create' )]
9696 [Alias (' p' , ' Prompt' )]
9797 [object []]$Prompts ,
@@ -100,7 +100,7 @@ function Show-AnyBox
100100 [string ]$PromptsFromFunc ,
101101 [scriptblock ]$PromptsFromScriptblock ,
102102 [Parameter (ParameterSetName = ' create' )]
103- [Alias (' b' , ' Btn ' , ' Button' )]
103+ [Alias (' b' , ' Button' )]
104104 [object []]$Buttons ,
105105 [Parameter (ParameterSetName = ' create' )]
106106 [string ]$CancelButton ,
@@ -110,9 +110,11 @@ function Show-AnyBox
110110 [ValidateScript ({ $_ -gt 0 })]
111111 [uint16 ]$ButtonRows = 1 ,
112112 [Parameter (ParameterSetName = ' create' )]
113- [string []]$Comment ,
113+ [Alias (' c' , ' Comment' )]
114+ [string []]$Comments ,
114115 [Parameter (ParameterSetName = ' create' )]
115116 [ValidateSet (' Left' , ' Center' )]
117+ [Alias (' Alignment' )]
116118 [string ]$ContentAlignment = ' Left' ,
117119 [Parameter (ParameterSetName = ' create' )]
118120 [switch ]$CollapsibleGroups ,
@@ -128,10 +130,10 @@ function Show-AnyBox
128130 [uint16 ]$FontSize = 12 ,
129131 [Parameter (ParameterSetName = ' create' )]
130132 [ValidateNotNullOrEmpty ()]
131- [Alias (' FgColor ' )]
133+ [Alias (' fg ' )]
132134 [System.Windows.Media.Brush ]$FontColor = ' Black' ,
133135 [Parameter (ParameterSetName = ' create' )]
134- [Alias (' BgColor ' )]
136+ [Alias (' bg ' )]
135137 [System.Windows.Media.Brush ]$BackgroundColor ,
136138 [Parameter (ParameterSetName = ' create' )]
137139 [System.Windows.Media.Brush ]$AccentColor = ' Gainsboro' ,
@@ -156,10 +158,13 @@ function Show-AnyBox
156158 [Parameter (ParameterSetName = ' create' )]
157159 [switch ]$HideTaskbarIcon ,
158160 [Parameter (ParameterSetName = ' create' )]
161+ [Alias (' sec' )]
159162 [uint32 ]$Timeout ,
160163 [Parameter (ParameterSetName = ' create' )]
164+ [Alias (' count' )]
161165 [switch ]$Countdown ,
162166 [Parameter (ParameterSetName = ' create' )]
167+ [Alias (' pb' )]
163168 [switch ]$ProgressBar ,
164169 [Parameter (ParameterSetName = ' create' )]
165170 [scriptblock ]$While ,
@@ -168,6 +173,7 @@ function Show-AnyBox
168173 [Parameter (ParameterSetName = ' create' )]
169174 [System.Windows.Window ]$ParentWindow = $null ,
170175 [Parameter (ParameterSetName = ' create' )]
176+ [Alias (' d' )]
171177 [object []]$GridData ,
172178 [Parameter (ParameterSetName = ' create' )]
173179 [switch ]$GridAsList ,
@@ -353,7 +359,7 @@ function Show-AnyBox
353359 }
354360
355361 # Add message textblocks.
356- if (($txtMsg = New-TextBlock - RefForm ([ref ]$form ) - Text $ ($Message -join [environment ]::NewLine) - Name ' Message' - FontFamily $FontFamily - FontSize $FontSize - FontColor $FontColor - ContentAlignment $ContentAlignment ))
362+ if (($txtMsg = New-TextBlock - RefForm ([ref ]$form ) - Text $ ($Messages -join [environment ]::NewLine) - Name ' Message' - FontFamily $FontFamily - FontSize $FontSize - FontColor $FontColor - ContentAlignment $ContentAlignment ))
357363 {
358364 $form.highStack.AddChild ($txtMsg )
359365 }
@@ -565,7 +571,7 @@ function Show-AnyBox
565571 $inBox.HorizontalContentAlignment = ' Left'
566572
567573 # add with default value that is true boolean, not string
568- $form.Result [$prmpt.Name ] = $ ( $prmpt .DefaultValue -eq [ bool ]::TrueString)
574+ $form.Result [$prmpt.Name ] = $inBox .IsChecked
569575
570576 $inBox.add_Click ({
571577 $form.Result [$_.Source.Name ] = $_.Source.IsChecked
@@ -1163,7 +1169,7 @@ function Show-AnyBox
11631169 }
11641170
11651171 # Add comment textblocks.
1166- if (($txtMsg = New-TextBlock - RefForm ([ref ]$form ) - text $ ($Comment -join [environment ]::NewLine) - name ' txt_Explain' - FontFamily $FontFamily - FontSize $FontSize - FontColor $FontColor - ContentAlignment $ContentAlignment ))
1172+ if (($txtMsg = New-TextBlock - RefForm ([ref ]$form ) - text $ ($Comments -join [environment ]::NewLine) - name ' txt_Explain' - FontFamily $FontFamily - FontSize $FontSize - FontColor $FontColor - ContentAlignment $ContentAlignment ))
11671173 {
11681174 $txtMsg.FontStyle = ' Italic'
11691175 $txtMsg.FontWeight = ' Normal'
@@ -1513,3 +1519,4 @@ $form.Result | Foreach-Object -Process {{
15131519}
15141520
15151521Set-Alias - Name ' anybox' - Value ' Show-AnyBox' - Description ' Show-AnyBox' - Scope ' Global'
1522+ Set-Alias - Name ' show' - Value ' Show-AnyBox' - Description ' Show-AnyBox' - Scope ' Global'
0 commit comments