Skip to content

Commit 9beb431

Browse files
author
donald
committed
Bug fixes (issue 2). v0.3.1.
1 parent 07c8ae3 commit 9beb431

File tree

3 files changed

+15
-13
lines changed

3 files changed

+15
-13
lines changed

AnyBox.psd1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
RootModule = 'AnyBox.psm1'
55

66
# Version number of this module.
7-
ModuleVersion = '0.3.0'
7+
ModuleVersion = '0.3.1'
88

99
# Supported PSEditions
1010
# CompatiblePSEditions = 'Desktop'
@@ -46,7 +46,7 @@ PowerShellVersion = '3.0'
4646
# RequiredModules = @()
4747

4848
# Assemblies that must be loaded prior to importing this module
49-
RequiredAssemblies = 'PresentationFramework.dll', 'PresentationCore.dll', 'WindowsBase.dll'
49+
RequiredAssemblies = 'System.Drawing.dll', 'PresentationFramework.dll', 'PresentationCore.dll', 'WindowsBase.dll'
5050

5151
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
5252
ScriptsToProcess = 'AnyBoxPrompt', 'HelperFunctions'

README.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11

22
# [Introducing the AnyBox](https://www.donaldmellenbruch.com/post/introducing-the-anybox/)
33

4-
# [v0.3.0](https://www.donaldmellenbruch.com/post/anybox-v0.3/)
4+
# [New in v0.3.0](https://www.donaldmellenbruch.com/post/anybox-v0.3/)
55

66
# Changelog
77
All notable changes to this project will be documented in this file.
88

99
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
1010
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
1111

12+
## [v0.3.1] - 2018-08-05
13+
14+
### Changed
15+
16+
- Minor bugfixes (see [issue 2](https://github.com/dm3ll3n/AnyBox/issues/2))
17+
- Corrections to examples.
18+
1219
## [v0.3.0](https://www.donaldmellenbruch.com/post/anybox-v0.3/) - 2018-03-04
1320

1421
### Added
@@ -35,7 +42,7 @@ New function `New-AnyBoxButton` (alias `New-Button`) to wrap around the new obje
3542
- `-IsDefault`: designates the button to serve as the *default* button.
3643
- `-OnClick`: accepts a script block to run when the button is clicked.
3744

38-
## Changed
45+
### Changed
3946

4047
- `-ContentAlignment` now defaults to 'Left'.
4148
- `-FontSize` now defaults to '12'.

Show-AnyBox.ps1

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Add-Type -AssemblyName 'System.Drawing', 'PresentationFramework', 'PresentationCore', 'WindowsBase'
2+
13
function Show-AnyBox
24
{
35
<#
@@ -174,7 +176,7 @@ function Show-AnyBox
174176
}
175177
}
176178
else { # string
177-
$form.Result.Add($_, $false)
179+
$form.Result.Add($_ -as [string], $false)
178180
}
179181
}
180182

@@ -777,13 +779,6 @@ function Show-AnyBox
777779
$form.highStack.AddChild($tab_panel)
778780
}
779781

780-
# Add comment textblocks.
781-
if (($txtMsg = New-TextBlock -text $($Comment -join [environment]::NewLine) -name 'txt_Explain')) {
782-
$txtMsg.FontStyle = 'Italic'
783-
$txtMsg.FontWeight = 'Normal'
784-
$form.highStack.AddChild($txtMsg)
785-
}
786-
787782
if ($GridData)
788783
{
789784
$dataGrid = $form['data_grid']
@@ -1092,7 +1087,7 @@ $form.Result | Foreach-Object -Process {{
10921087
}
10931088
else {
10941089
# $btn.Name = $Buttons[$c]
1095-
$btn.Content = '_' + $Buttons[$c]
1090+
$btn.Content = '_' + ($Buttons[$c] -as [string])
10961091

10971092
if ($Buttons[$c] -eq 'Explore') {
10981093
$btn.ToolTip = 'Explore data in a separate grid window.'

0 commit comments

Comments
 (0)