├── Examples
├── Form
│ └── .gitignore
├── ListBox
│ └── .gitignore
├── ListView
│ └── .gitignore
├── TextBox
│ └── .gitignore
└── DataGridView
│ ├── Add-WFDataGridViewRow
│ ├── Add-WFDataGridViewRow.exe
│ ├── Add-WFDataGridViewRow.psf.psbuild
│ ├── Add-WFDataGridViewRow.exe.config
│ ├── Add-WFDataGridViewRow.Export.ps1
│ └── Add-WFDataGridViewRow.psf
│ ├── Add-WFDataGridViewColumn
│ ├── Add-WFDataGridViewColumn.exe
│ ├── Add-WFDataGridViewColumn.psf.psbuild
│ ├── Add-WFDataGridViewColumn.exe.config
│ ├── Add-WFDataGridViewColumn.Export.ps1
│ └── Add-WFDataGridViewColumn.psf
│ └── Import-WFDataGridViewItem
│ ├── Impot-WFDataGridViewItem.exe
│ ├── Impot-WFDataGridViewItem.psf.psbuild
│ ├── Impot-WFDataGridViewItem.exe.config
│ └── Impot-WFDataGridViewItem.Export.ps1
├── WinFormPS
├── bin
│ └── .gitignore
├── lib
│ └── .gitignore
├── Private
│ └── .gitignore
├── en-US
│ └── about_WinFormPS.help.txt
├── fr-FR
│ └── about_WinFormPS.help.txt
├── Public
│ ├── Enable-WFTextBox.ps1
│ ├── Clear-WFListBox.ps1
│ ├── Update-WFDataGridView.ps1
│ ├── Clear-WFDataGridViewSelection.ps1
│ ├── Disable-WFTextBox.ps1
│ ├── Enable-WFTabControl.ps1
│ ├── Disable-WFButton.ps1
│ ├── Enable-WFButton.ps1
│ ├── Enable-WFRichTextBox.ps1
│ ├── Disable-WFTabControl.ps1
│ ├── Disable-WFRichTextBox.ps1
│ ├── Clear-WFRichTextBox.ps1
│ ├── Set-WFRichTextBox.ps1
│ ├── Clear-WFErrorProvider.ps1
│ ├── New-WFSpeakerBeep.ps1
│ ├── Get-WFForm.ps1
│ ├── Get-WFListViewItem.ps1
│ ├── Add-WFDataGridViewColumn.ps1
│ ├── Reset-WFDataGridViewFormat.ps1
│ ├── Get-WFListBoxItem.ps1
│ ├── Get-WFComboboxItem.ps1
│ ├── New-WFMessageBox.ps1
│ ├── Get-WFCheckedListBoxItem.ps1
│ ├── New-WFInputBox.ps1
│ ├── Import-WFDataGridView.ps1
│ ├── New-WFOpenFolderDialog.ps1
│ ├── Set-WFForm.ps1
│ ├── Import-WFListBox.ps1
│ ├── Add-WFDataGridViewRow.ps1
│ ├── New-WFOpenFileDialog.ps1
│ ├── New-WFBalloonNotification.ps1
│ ├── Set-WFDataGridViewFilter.ps1
│ ├── Add-WFListViewItem.ps1
│ ├── Remove-WFListBoxItem.ps1
│ ├── Add-WFRichTextBoxText.ps1
│ ├── Set-WFListViewColumn.ps1
│ ├── Find-WFDataGridViewValue.ps1
│ ├── ConvertTo-WFDataTable.ps1
│ └── Set-WFDataGridView.ps1
├── WinFormPS.psm1
└── WinFormPS.psd1
├── Media
└── Set-WFDataGridView.gif
├── Archives
├── Disable-TabControl.ps1
├── Enable-TabControl.ps1
├── Clear-ListBox.ps1
├── Clear-DataGridView.ps1
├── Add-DataGridViewRow.ps1
├── Set-DataGridViewColumn.ps1
├── Add-DataGridViewColumn.ps1
├── install.ps1
├── Get-ListViewItem.ps1
├── Get-ListBoxItem.ps1
├── Load-DataGridView.ps1
├── Load-ListBox.ps1
├── Remove-ListBoxItem.ps1
├── Add-ListViewItem.ps1
├── WinFormPS_old.psd1
├── Append-RichTextBox.ps1
├── Sort-ListViewColumn.ps1
└── WinFormPS_InDevelopment.ps1
├── LICENSE.md
└── README.md
/Examples/Form/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore everything in this directory
2 | *
3 | # Except this file
4 | !.gitignore
--------------------------------------------------------------------------------
/WinFormPS/bin/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore everything in this directory
2 | *
3 | # Except this file
4 | !.gitignore
--------------------------------------------------------------------------------
/WinFormPS/lib/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore everything in this directory
2 | *
3 | # Except this file
4 | !.gitignore
--------------------------------------------------------------------------------
/Examples/ListBox/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore everything in this directory
2 | *
3 | # Except this file
4 | !.gitignore
--------------------------------------------------------------------------------
/Examples/ListView/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore everything in this directory
2 | *
3 | # Except this file
4 | !.gitignore
--------------------------------------------------------------------------------
/Examples/TextBox/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore everything in this directory
2 | *
3 | # Except this file
4 | !.gitignore
--------------------------------------------------------------------------------
/WinFormPS/Private/.gitignore:
--------------------------------------------------------------------------------
1 | # Ignore everything in this directory
2 | *
3 | # Except this file
4 | !.gitignore
--------------------------------------------------------------------------------
/Media/Set-WFDataGridView.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lazywinadmin/WinFormPS/HEAD/Media/Set-WFDataGridView.gif
--------------------------------------------------------------------------------
/Examples/DataGridView/Add-WFDataGridViewRow/Add-WFDataGridViewRow.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lazywinadmin/WinFormPS/HEAD/Examples/DataGridView/Add-WFDataGridViewRow/Add-WFDataGridViewRow.exe
--------------------------------------------------------------------------------
/Examples/DataGridView/Add-WFDataGridViewColumn/Add-WFDataGridViewColumn.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lazywinadmin/WinFormPS/HEAD/Examples/DataGridView/Add-WFDataGridViewColumn/Add-WFDataGridViewColumn.exe
--------------------------------------------------------------------------------
/Examples/DataGridView/Add-WFDataGridViewRow/Add-WFDataGridViewRow.psf.psbuild:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lazywinadmin/WinFormPS/HEAD/Examples/DataGridView/Add-WFDataGridViewRow/Add-WFDataGridViewRow.psf.psbuild
--------------------------------------------------------------------------------
/Examples/DataGridView/Import-WFDataGridViewItem/Impot-WFDataGridViewItem.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lazywinadmin/WinFormPS/HEAD/Examples/DataGridView/Import-WFDataGridViewItem/Impot-WFDataGridViewItem.exe
--------------------------------------------------------------------------------
/Examples/DataGridView/Add-WFDataGridViewColumn/Add-WFDataGridViewColumn.psf.psbuild:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lazywinadmin/WinFormPS/HEAD/Examples/DataGridView/Add-WFDataGridViewColumn/Add-WFDataGridViewColumn.psf.psbuild
--------------------------------------------------------------------------------
/Examples/DataGridView/Import-WFDataGridViewItem/Impot-WFDataGridViewItem.psf.psbuild:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/lazywinadmin/WinFormPS/HEAD/Examples/DataGridView/Import-WFDataGridViewItem/Impot-WFDataGridViewItem.psf.psbuild
--------------------------------------------------------------------------------
/Archives/Disable-TabControl.ps1:
--------------------------------------------------------------------------------
1 | function Disable-TabControl
2 | {
3 | PARAM (
4 | [ValidateNotNull()]
5 | [Parameter(Mandatory = $true)]
6 | [System.Windows.Forms.TabControl]$TabControl
7 | )
8 | $TabControl.Enabled = $false
9 | }
--------------------------------------------------------------------------------
/Archives/Enable-TabControl.ps1:
--------------------------------------------------------------------------------
1 | function Enable-TabControl
2 | {
3 | PARAM (
4 | [ValidateNotNull()]
5 | [Parameter(Mandatory = $true)]
6 | [System.Windows.Forms.TabControl]$TabControl
7 | )
8 | $TabControl.Enabled = $true
9 | }
--------------------------------------------------------------------------------
/Archives/Clear-ListBox.ps1:
--------------------------------------------------------------------------------
1 | function Clear-ListBox
2 | {
3 | PARAM (
4 | [ValidateNotNull()]
5 | [Parameter(Mandatory = $true)]
6 | [System.Windows.Forms.ListBox]$ListBox)
7 |
8 | #Clear the ListBox
9 | $ListBox.Items.Clear()
10 | }
--------------------------------------------------------------------------------
/Archives/Clear-DataGridView.ps1:
--------------------------------------------------------------------------------
1 | function Clear-RichTextBox
2 | {
3 | PARAM (
4 | [ValidateNotNull()]
5 | [Parameter(Mandatory)]
6 | [System.Windows.Forms.Richtextbox]$RichTextBox
7 | )
8 |
9 | #Clear the RichTextBox
10 | $RichTextBox.Clear()
11 | }
12 |
--------------------------------------------------------------------------------
/Examples/DataGridView/Add-WFDataGridViewRow/Add-WFDataGridViewRow.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Examples/DataGridView/Add-WFDataGridViewColumn/Add-WFDataGridViewColumn.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Examples/DataGridView/Import-WFDataGridViewItem/Impot-WFDataGridViewItem.exe.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/Archives/Add-DataGridViewRow.ps1:
--------------------------------------------------------------------------------
1 | function Add-DataGridViewRow
2 | {
3 | PARAM (
4 | [ValidateNotNull()]
5 | [Parameter(Mandatory = $true)]
6 | [System.Windows.Forms.DataGridView]$DataGridView,
7 | [Array]$Values
8 | )
9 |
10 | #foreach ($item in $Values){
11 | # Add a row
12 | $DataGridView.Rows.Add($Values)
13 |
14 | }
--------------------------------------------------------------------------------
/Archives/Set-DataGridViewColumn.ps1:
--------------------------------------------------------------------------------
1 | function Set-DataGridViewColumn
2 | {
3 | PARAM (
4 | [ValidateNotNull()]
5 | [Parameter(Mandatory = $true)]
6 | [System.Windows.Forms.DataGridView]$DataGridView,
7 |
8 | [ValidateRange(1,65535)]
9 | [Parameter(Mandatory = $true)]
10 | [int]$NumberOfColumn
11 | )
12 | $DataGridView.ColumnCount = $NumberOfColumn
13 | }
14 |
--------------------------------------------------------------------------------
/Archives/Add-DataGridViewColumn.ps1:
--------------------------------------------------------------------------------
1 | function Add-DataGridViewColumn
2 | {
3 | PARAM (
4 | [ValidateNotNull()]
5 | [Parameter(Mandatory = $true)]
6 | [System.Windows.Forms.DataGridView]$DataGridView,
7 | [String[]]$ColumnName
8 | )
9 |
10 | foreach ($Column in $ColumnName)
11 | {
12 | # Add the Column to the Datagridview
13 | $DataGridView.Columns.Add($Column, $Column) #ColumnName and ColumnHeader are specified
14 | }
15 | }
--------------------------------------------------------------------------------
/WinFormPS/en-US/about_WinFormPS.help.txt:
--------------------------------------------------------------------------------
1 | PSTOPIC
2 |
3 | about_WinFormPS
4 |
5 | SHORT DESCRIPTION
6 |
7 | WinFormPS allows you to work with Windows Forms (WinForms), a library included as a part of Microsoft .NET Framework
8 |
9 | LONG DESCRIPTION
10 |
11 | WinFormPS allows you to work with Windows Forms (WinForms), a library included as a part of Microsoft .NET Framework
12 |
13 | You can find Windows Forms MSDN documentation here here:
14 | https://msdn.microsoft.com/en-us/library/dd30h2yb(v=vs.110).aspx
15 |
16 | DETAILED DESCRIPTION
17 |
18 | WinFormPS allows you to work with Windows Forms (WinForms), a library included as a part of Microsoft .NET Framework
19 |
20 |
--------------------------------------------------------------------------------
/WinFormPS/fr-FR/about_WinFormPS.help.txt:
--------------------------------------------------------------------------------
1 | PSTOPIC
2 |
3 | about_WinFormPS
4 |
5 | SHORT DESCRIPTION
6 |
7 | WinFormPS permet de travailler avec les controles Windows Forms (WinForms), une librairie faisant partie de Microsoft .NET Framework
8 |
9 | LONG DESCRIPTION
10 |
11 | WinFormPS permet de travailler avec les controles Windows Forms (WinForms), une librairie faisant partie de Microsoft .NET Framework
12 |
13 | Vous pouvez trouver la documentation sur le site de MSDN suivant:
14 | https://msdn.microsoft.com/en-us/library/dd30h2yb(v=vs.110).aspx
15 |
16 | DETAILED DESCRIPTION
17 |
18 | WinFormPS permet de travailler avec les controles Windows Forms (WinForms), une librairie faisant partie de Microsoft .NET Framework
--------------------------------------------------------------------------------
/WinFormPS/Public/Enable-WFTextBox.ps1:
--------------------------------------------------------------------------------
1 | function Enable-WFTextBox
2 | {
3 | <#
4 | .SYNOPSIS
5 | This function will enable a TextBox control
6 |
7 | .DESCRIPTION
8 | This function will enable a TextBox control
9 |
10 | .PARAMETER TextBox
11 | Specifies the TextBox control to enable
12 |
13 | .EXAMPLE
14 | Enable-WFTextBox -TextBox $TextBox
15 |
16 | .NOTES
17 | Francois-Xavier Cat
18 | @lazywinadm
19 | www.lazywinadmin.com
20 | github.com/lazywinadmin
21 | #>
22 |
23 | [CmdletBinding()]
24 | param
25 | (
26 | [Parameter(Mandatory = $true)]
27 | [ValidateNotNull()]
28 | [System.Windows.Forms.TextBox]$TextBox
29 | )
30 |
31 | BEGIN
32 | {
33 | Add-Type -AssemblyName System.Windows.Forms
34 | }
35 | PROCESS
36 | {
37 | $TextBox.Enabled = $true
38 | }
39 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Clear-WFListBox.ps1:
--------------------------------------------------------------------------------
1 | function Clear-WFListBox
2 | {
3 | <#
4 | .SYNOPSIS
5 | This function will clear the content of a listbox control
6 |
7 | .DESCRIPTION
8 | This function will clear the content of a listbox control
9 |
10 | .PARAMETER ListBox
11 | Specifies the ListBox control to clear
12 |
13 | .EXAMPLE
14 | Clear-WFListBox -ListBox $ListBox
15 |
16 | .NOTES
17 | Francois-Xavier Cat
18 | @lazywinadm
19 | www.lazywinadmin.com
20 | github.com/lazywinadmin
21 | #>
22 |
23 | [CmdletBinding()]
24 | param
25 | (
26 | [Parameter(Mandatory = $true)]
27 | [ValidateNotNull()]
28 | [System.Windows.Forms.ListBox]$ListBox
29 | )
30 |
31 | BEGIN
32 | {
33 | Add-Type -AssemblyName System.Windows.Forms
34 | }
35 | PROCESS
36 | {
37 | $ListBox.Items.Clear()
38 | }
39 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Update-WFDataGridView.ps1:
--------------------------------------------------------------------------------
1 | function Update-WFDataGridView
2 | {
3 | <#
4 | .SYNOPSIS
5 | Function to refresh the content of a DataGridView control
6 |
7 | .DESCRIPTION
8 | Function to refresh the content of a DataGridView control
9 |
10 | .PARAMETER DataGridView
11 | Specifies the DataGridView control to update
12 |
13 | .NOTES
14 | Author: Francois-Xavier Cat
15 | Twitter:@LazyWinAdm
16 | www.lazywinadmin.com
17 | github.com/lazywinadmin
18 | #>
19 |
20 | [CmdletBinding(SupportsShouldProcess = $true)]
21 | param
22 | (
23 | [Parameter(Mandatory = $true)]
24 | [System.Windows.Forms.DataGridView]$DataGridView
25 | )
26 |
27 | BEGIN
28 | {
29 | Add-Type -AssemblyName System.Windows.Forms
30 | }
31 | PROCESS
32 | {
33 | IF ($PSCmdlet.ShouldProcess($DataGridView,"Refresh the content"))
34 | {
35 | $DataGridView.Refresh()
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/WinFormPS/WinFormPS.psm1:
--------------------------------------------------------------------------------
1 | #Get public and private function definition files.
2 | $Public = @(Get-ChildItem -Path $PSScriptRoot\Public\*.ps1 -ErrorAction SilentlyContinue)
3 | $Private = @(Get-ChildItem -Path $PSScriptRoot\Private\*.ps1 -ErrorAction SilentlyContinue)
4 |
5 | #Dot source the files
6 | Foreach ($import in @($Public + $Private))
7 | {
8 | TRY
9 | {
10 | . $import.fullname
11 | }
12 | CATCH
13 | {
14 | Write-Error -Message "Failed to import function $($import.fullname): $_"
15 | }
16 | }
17 |
18 | # Create Aliases
19 | New-Alias -Name Load-ListBox -value Import-WFListBoxItem -Description "SAPIEN Name"
20 | New-Alias -Name Load-DataGridView -value Import-WFDataGridViewItem -Description "SAPIEN Name"
21 | New-Alias -Name Refresh-DataGridView -value Update-WFDataGridView -Description "SAPIEN Name"
22 |
23 | # Export all the functions
24 | Export-ModuleMember -Function $Public.Basename -Alias *
--------------------------------------------------------------------------------
/WinFormPS/Public/Clear-WFDataGridViewSelection.ps1:
--------------------------------------------------------------------------------
1 | function Clear-WFDataGridViewSelection
2 | {
3 | <#
4 | .SYNOPSIS
5 | The Clear-WFDataGridViewSelection function will deselect any cell, row, column selection.
6 |
7 | .DESCRIPTION
8 | The Clear-WFDataGridViewSelection function will deselect any cell, row, column selection.
9 |
10 | .PARAMETER DataGridView
11 | Specifies the DataGridView Control to clear
12 |
13 | .EXAMPLE
14 | PS C:\> Clear-WFDataGridViewSelection -DataGridView $datagridviewOutput
15 |
16 | .NOTES
17 | Francois-Xavier Cat
18 | @lazywinadm
19 | www.lazywinadmin.com
20 | github.com/lazywinadmin
21 | #>
22 | [CmdletBinding()]
23 | PARAM (
24 | [Parameter(Mandatory = $true)]
25 | [System.Windows.Forms.DataGridView]$DataGridView
26 | )
27 | BEGIN
28 | {
29 | Add-Type -AssemblyName System.Windows.Forms
30 | }
31 | PROCESS
32 | {
33 | $DataGridView.ClearSelection()
34 | }
35 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Disable-WFTextBox.ps1:
--------------------------------------------------------------------------------
1 | function Disable-WFTextBox
2 | {
3 | <#
4 | .SYNOPSIS
5 | This function will disable a TextBox control
6 |
7 | .DESCRIPTION
8 | A detailed description of the Disable-WFTextBox function.
9 |
10 | .PARAMETER TextBox
11 | A description of the TextBox parameter.
12 |
13 | .EXAMPLE
14 | Disable-WFTextBox -TextBox $TextBox
15 |
16 | .NOTES
17 | Francois-Xavier Cat
18 | @lazywinadm
19 | www.lazywinadmin.com
20 | github.com/lazywinadmin
21 | #>
22 |
23 | [CmdletBinding(SupportsShouldProcess = $true)]
24 | param
25 | (
26 | [Parameter(Mandatory = $true)]
27 | [ValidateNotNull()]
28 | [System.Windows.Forms.TextBox]$TextBox
29 | )
30 |
31 | BEGIN
32 | {
33 | Add-Type -AssemblyName System.Windows.Forms
34 | }
35 | PROCESS
36 | {
37 | IF ($PSCmdlet.ShouldProcess($TextBox, "Disable the TextBox control"))
38 | {
39 | $TextBox.Enabled = $false
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Enable-WFTabControl.ps1:
--------------------------------------------------------------------------------
1 | function Enable-WFTabControl
2 | {
3 | <#
4 | .SYNOPSIS
5 | This function will enable a TabControl control
6 |
7 | .DESCRIPTION
8 | This function will enable a TabControl control
9 |
10 | .PARAMETER TabControl
11 | Specifies the TabControl Control to enable.
12 |
13 | .EXAMPLE
14 | Enable-WFTabControl -TabControl $TabControl
15 |
16 | .NOTES
17 | Francois-Xavier Cat
18 | @lazywinadm
19 | www.lazywinadmin.com
20 | github.com/lazywinadmin
21 | #>
22 |
23 | [CmdletBinding(SupportsShouldProcess = $true)]
24 | param
25 | (
26 | [Parameter(Mandatory = $true)]
27 | [ValidateNotNull()]
28 | [System.Windows.Forms.TabControl]$TabControl
29 | )
30 |
31 | BEGIN
32 | {
33 | Add-Type -AssemblyName System.Windows.Forms
34 | }
35 | PROCESS
36 | {
37 | IF ($PSCmdlet.ShouldProcess($TabControl, "Enable the TabControl control"))
38 | {
39 | $TabControl.Enabled = $true
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Disable-WFButton.ps1:
--------------------------------------------------------------------------------
1 | function Disable-WFButton
2 | {
3 | <#
4 | .SYNOPSIS
5 | This function will disable a button control
6 |
7 | .DESCRIPTION
8 | This function will disable a button control
9 |
10 | .PARAMETER Button
11 | Specifies the Button Control to disable
12 |
13 | .EXAMPLE
14 | Disable-WFButton -Button $Button
15 |
16 | .NOTES
17 | Francois-Xavier Cat
18 | @lazywinadm
19 | www.lazywinadmin.com
20 | github.com/lazywinadmin
21 | #>
22 |
23 | [CmdletBinding(SupportsShouldProcess = $true)]
24 | param
25 | (
26 | [Parameter(Mandatory = $true)]
27 | [ValidateNotNull()]
28 | [System.Windows.Forms.Button[]]$Button
29 | )
30 |
31 | BEGIN
32 | {
33 | Add-Type -AssemblyName System.Windows.Forms
34 | }
35 | PROCESS
36 | {
37 | foreach ($ButtonObject in $Button)
38 | {
39 | IF ($PSCmdlet.ShouldProcess($Button, "Disable Button control"))
40 | {
41 | $ButtonObject.Enabled = $false
42 | }
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Enable-WFButton.ps1:
--------------------------------------------------------------------------------
1 | function Enable-WFButton
2 | {
3 | <#
4 | .SYNOPSIS
5 | This function will enable a button control
6 |
7 | .DESCRIPTION
8 | A detailed description of the Enable-WFButton function.
9 |
10 | .PARAMETER Button
11 | A description of the Button parameter.
12 |
13 | .EXAMPLE
14 | Enable-WFButton -Button $Button
15 |
16 | .NOTES
17 | Francois-Xavier Cat
18 | @lazywinadm
19 | www.lazywinadmin.com
20 | github.com/lazywinadmin
21 | #>
22 |
23 | [CmdletBinding(SupportsShouldProcess = $true)]
24 | param
25 | (
26 | [Parameter(Mandatory = $true)]
27 | [ValidateNotNull()]
28 | [System.Windows.Forms.Button[]]$Button
29 | )
30 |
31 | BEGIN
32 | {
33 | Add-Type -AssemblyName System.Windows.Forms
34 | }
35 | PROCESS
36 | {
37 | foreach ($ButtonObject in $Button)
38 | {
39 | IF ($PSCmdlet.ShouldProcess($Button, "Enable the Button Control"))
40 | {
41 | $ButtonObject.Enabled = $true
42 | }
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Enable-WFRichTextBox.ps1:
--------------------------------------------------------------------------------
1 | function Enable-WFRichTextBox
2 | {
3 | <#
4 | .SYNOPSIS
5 | This function will enable a RichTextBox control
6 |
7 | .DESCRIPTION
8 | A detailed description of the Enable-WFRichTextBox function.
9 |
10 | .PARAMETER RichTextBox
11 | A description of the RichTextBox parameter.
12 |
13 | .EXAMPLE
14 | Enable-WFRichTextBox -RichTextBox $RichTextBox
15 |
16 | .NOTES
17 | Francois-Xavier Cat
18 | @lazywinadm
19 | www.lazywinadmin.com
20 | github.com/lazywinadmin
21 | #>
22 |
23 | [CmdletBinding(SupportsShouldProcess = $true)]
24 | param
25 | (
26 | [Parameter(Mandatory = $true)]
27 | [ValidateNotNull()]
28 | [System.Windows.Forms.RichTextBox]$RichTextBox
29 | )
30 |
31 | BEGIN
32 | {
33 | Add-Type -AssemblyName System.Windows.Forms
34 | }
35 | PROCESS
36 | {
37 | IF ($PSCmdlet.ShouldProcess($RichTextBox, "Enable the Richtextbox Control"))
38 | {
39 | $RichTextBox.Enabled = $true
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Disable-WFTabControl.ps1:
--------------------------------------------------------------------------------
1 | function Disable-WFTabControl
2 | {
3 | <#
4 | .SYNOPSIS
5 | This function will disable a tab control
6 |
7 | .DESCRIPTION
8 | A detailed description of the Disable-WFTabControl function.
9 |
10 | .PARAMETER TabControl
11 | Specifies the TabControl control to disable
12 |
13 | .EXAMPLE
14 | Disable-WFTabControl -TabControl $TabControl
15 |
16 | .NOTES
17 | Francois-Xavier Cat
18 | @lazywinadm
19 | www.lazywinadmin.com
20 | github.com/lazywinadmin
21 | #>
22 |
23 | [CmdletBinding(SupportsShouldProcess = $true)]
24 | param
25 | (
26 | [Parameter(Mandatory = $true)]
27 | [ValidateNotNull()]
28 | [System.Windows.Forms.TabControl]$TabControl
29 | )
30 |
31 | BEGIN
32 | {
33 | Add-Type -AssemblyName System.Windows.Forms
34 | }
35 | PROCESS
36 | {
37 | IF ($PSCmdlet.ShouldProcess($TabControl, "Disable the TabControl control"))
38 | {
39 | $TabControl.Enabled = $false
40 | }
41 | }
42 | } #Disable-TabControl
--------------------------------------------------------------------------------
/WinFormPS/Public/Disable-WFRichTextBox.ps1:
--------------------------------------------------------------------------------
1 | function Disable-WFRichTextBox
2 | {
3 | <#
4 | .SYNOPSIS
5 | This function will disable a RichTextBox control
6 |
7 | .DESCRIPTION
8 | A detailed description of the Disable-WFRichTextBox function.
9 |
10 | .PARAMETER RichTextBox
11 | Specifies the RichTextBox control to disable
12 |
13 | .EXAMPLE
14 | Disable-WFRichTextBox -RichTextBox $RichTextBox
15 |
16 | .NOTES
17 | Francois-Xavier Cat
18 | @lazywinadm
19 | www.lazywinadmin.com
20 | github.com/lazywinadmin
21 | #>
22 |
23 | [CmdletBinding(SupportsShouldProcess = $true)]
24 | param
25 | (
26 | [Parameter(Mandatory = $true)]
27 | [ValidateNotNull()]
28 | [System.Windows.Forms.RichTextBox]$RichTextBox
29 | )
30 |
31 | BEGIN
32 | {
33 | Add-Type -AssemblyName System.Windows.Forms
34 | }
35 | PROCESS
36 | {
37 | IF ($PSCmdlet.ShouldProcess($RichTextBox, "Disable the RichTextBox control"))
38 | {
39 | $RichTextBox.Enabled = $false
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Clear-WFRichTextBox.ps1:
--------------------------------------------------------------------------------
1 | function Clear-WFRichTextBox
2 | {
3 | <#
4 | .SYNOPSIS
5 | This function will clear the content of a richtextbox control
6 |
7 | .DESCRIPTION
8 | A detailed description of the Clear-WFRichTextBox function.
9 |
10 | .PARAMETER RichTextBox
11 | A description of the RichTextBox parameter.
12 |
13 | .EXAMPLE
14 | Clear-WFRichTextBox -RichTextBox $RichTextBox
15 |
16 | .NOTES
17 | Francois-Xavier Cat
18 | @lazywinadm
19 | www.lazywinadmin.com
20 | github.com/lazywinadmin
21 | #>
22 |
23 | [CmdletBinding(SupportsShouldProcess = $true)]
24 | param
25 | (
26 | [Parameter(Mandatory = $true)]
27 | [ValidateNotNull()]
28 | [System.Windows.Forms.Richtextbox]$RichTextBox
29 | )
30 |
31 | BEGIN
32 | {
33 | Add-Type -AssemblyName System.Windows.Forms
34 | }
35 | PROCESS
36 | {
37 | IF ($PSCmdlet.ShouldProcess($RichTextBox, "Clear the Richtextbox control"))
38 | {
39 | #Clear the RichTextBox
40 | $RichTextBox.Clear()
41 | }
42 | }
43 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Set-WFRichTextBox.ps1:
--------------------------------------------------------------------------------
1 | function Set-WFRichTextBox
2 | {
3 | <#
4 | .SYNOPSIS
5 | The Set-WFRichTextBox function allow you to manage the richtextbox control
6 |
7 | .DESCRIPTION
8 | The Set-WFRichTextBox function allow you to manage the richtextbox control
9 |
10 | .PARAMETER RichTextBox
11 | Specifies the RichTextBox Control to use
12 |
13 | .PARAMETER ScrollToCaret
14 | Specifies that the RichTextBox will scroll to the end.
15 |
16 | .EXAMPLE
17 | PS C:\> Set-WFRichTextBox -PipelineVariable $value1 -RichTextBox $value2
18 |
19 | .NOTES
20 | Author: Francois-Xavier Cat
21 | Twitter:@LazyWinAdm
22 | www.lazywinadmin.com
23 | github.com/lazywinadmin
24 | #>
25 |
26 | [CmdletBinding(SupportsShouldProcess = $true)]
27 | param
28 | (
29 | [System.Windows.Forms.RichTextBox]$RichTextBox,
30 |
31 | [Switch]$ScrollToCaret
32 | )
33 |
34 | BEGIN
35 | {
36 | Add-Type -AssemblyName System.Windows.Forms
37 | }
38 | PROCESS
39 | {
40 | IF ($PSCmdlet.ShouldProcess($RichTextBox, "Scroll to the end"))
41 | {
42 | $RichTextBox.ScrollToCaret()
43 | }
44 | }
45 | }
--------------------------------------------------------------------------------
/Archives/install.ps1:
--------------------------------------------------------------------------------
1 | param([string]$InstallDirectory)
2 |
3 | $ModuleName = "WinFormPS"
4 | $GitHubUser = "LazyWinAdmin"
5 | $GithubPath = "https://raw.github.com/$GitHubUser/$ModuleName/master/$ModuleName"
6 |
7 | $fileList = Write-Output `
8 | "$ModuleName.psd1" `
9 | "$ModuleName.psm1"
10 |
11 |
12 | if ('' -eq $InstallDirectory)
13 | {
14 | $personalModules = Join-Path -Path ([Environment]::GetFolderPath('MyDocuments')) -ChildPath WindowsPowerShell\Modules
15 |
16 | if (($env:PSModulePath -split ';') -notcontains $personalModules) {
17 | Write-Warning "$personalModules is not in `$env:PSModulePath"
18 | }
19 |
20 | if (-not(Test-Path $personalModules)) {
21 | Write-Error "$personalModules does not exist"
22 | }
23 |
24 | $InstallDirectory = Join-Path -Path $personalModules -ChildPath $ModuleName
25 | }
26 |
27 | if (-not(Test-Path $InstallDirectory)) {
28 | $null = mkdir $InstallDirectory
29 | }
30 |
31 | $WebClient = New-Object -typename System.Net.WebClient
32 | $fileList |
33 | ForEach-Object {
34 | $WebClient.DownloadFile("$GithubPath/$_","$installDirectory\$_")
35 | }
36 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Francois-Xavier Cat
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/WinFormPS/Public/Clear-WFErrorProvider.ps1:
--------------------------------------------------------------------------------
1 | function Clear-WFErrorProvider
2 | {
3 | <#
4 | .SYNOPSIS
5 | The Clear-WFErrorProvider function will clear the error message on the Winforms control specified
6 |
7 | .DESCRIPTION
8 | The Clear-WFErrorProvider function will clear the error message on the Winforms control specified
9 |
10 | .PARAMETER ErrorProvider
11 | Specifies the ErrorProvider Control
12 |
13 | .PARAMETER Control
14 | Specifies the Control on which the error message will be cleared
15 |
16 | .EXAMPLE
17 | PS C:\> Clear-WFErrorProvider -$ErrorProvider $ErrorProvider1 -Control $TextBox1
18 |
19 | Clear the error message on the $TextBox1 control
20 |
21 | .NOTES
22 | Francois-Xavier Cat
23 | @lazywinadm
24 | www.lazywinadmin.com
25 | github.com/lazywinadmin
26 | #>
27 |
28 | PARAM (
29 | [parameter(Mandatory=$true)]
30 | [System.Windows.Forms.ErrorProvider]$ErrorProvider,
31 | [parameter(Mandatory=$true)]
32 | $Control
33 | )
34 | BEGIN
35 | {
36 | Add-Type -AssemblyName System.Windows.Forms
37 | }
38 | PROCESS
39 | {
40 | $ErrorProvider.SetError($Control,'')
41 | }
42 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/New-WFSpeakerBeep.ps1:
--------------------------------------------------------------------------------
1 | function New-WFSpeakerBeep
2 | {
3 | <#
4 | .SYNOPSIS
5 | The New-WFSpeakerBeep function plays the sound of a beep of a specified frequency and duration through the console speaker.
6 |
7 | .DESCRIPTION
8 | The New-WFSpeakerBeep function plays the sound of a beep of a specified frequency and duration through the console speaker.
9 |
10 | .PARAMETER Frequency
11 | The frequency of the beep, ranging from 37 to 32767 hertz.
12 |
13 | .PARAMETER Duration
14 | The duration of the beep measured in milliseconds.
15 |
16 | .EXAMPLE
17 | PS C:\> New-WFSpeakerBeep -Frequency 500 -Duration 300
18 |
19 | .NOTES
20 | Author: Francois-Xavier Cat
21 | Twitter:@LazyWinAdm
22 | www.lazywinadmin.com
23 | github.com/lazywinadmin
24 | #>
25 |
26 | [CmdletBinding(SupportsShouldProcess = $true)]
27 | param
28 | (
29 | [ValidateRange(37, 32767)]
30 | [int32]$Frequency = 800,
31 |
32 | [int32]$Duration = 200
33 | )
34 |
35 | PROCESS
36 | {
37 | if ($PSCmdlet.ShouldProcess("System Console Beep", "Create a beep with a Frequency of $Frequency hertz and a duration of $Duration ms"))
38 | {
39 | [System.Console]::Beep($Frequency, $Duration)
40 | }
41 | }
42 | }
--------------------------------------------------------------------------------
/Archives/Get-ListViewItem.ps1:
--------------------------------------------------------------------------------
1 | function Get-ListViewItem
2 | {
3 | <#
4 | .SYNOPSIS
5 | Function to get item(s) from a ListView Control
6 |
7 | .DESCRIPTION
8 | Function to get item(s) from a ListView Control
9 |
10 | .NOTES
11 | Author: Francois-Xavier Cat
12 | Twitter:@LazyWinAdm
13 | WWW: lazywinadmin.com
14 |
15 | VERSION HISTORY
16 | 1.0 2014/07/03 Initial Version
17 | #>
18 | #Requires -Version 3
19 | PARAM (
20 | [ValidateNotNull()]
21 | [Parameter(ParameterSetName = "All",
22 | Mandatory)]
23 | [Parameter(ParameterSetName = "Selected",
24 | Mandatory)]
25 | [System.Windows.Forms.ListView]$ListView,
26 | [Parameter(ParameterSetName = "All")]
27 | [Parameter(ParameterSetName = "Selected")]
28 | [switch]$ShowCount,
29 |
30 | [Parameter(ParameterSetName = "Selected",
31 | Mandatory)]
32 | [switch]$SelectedItem,
33 | [Parameter(ParameterSetName = "All",
34 | Mandatory)]
35 | [switch]$All
36 | )
37 |
38 | IF ($All)
39 | {
40 | IF ($ShowCount)
41 | {
42 | $ListView.Items.Count
43 | }
44 | ELSE { $ListView.Items }
45 | }
46 |
47 | IF ($SelectedItem)
48 | {
49 | IF ($ShowCount) { $ListView.SelectedItems.Count }
50 | ELSE { $ListView.SelectedItems }
51 | }
52 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Get-WFForm.ps1:
--------------------------------------------------------------------------------
1 | function Get-WFForm
2 | {
3 | <#
4 | .SYNOPSIS
5 | Function to retrieve information about the a Form
6 |
7 | .DESCRIPTION
8 | Function to retrieve information about the a Form
9 |
10 | .PARAMETER Form
11 | Specifies the Form
12 |
13 | .PARAMETER Controls
14 | Specifies that you want to see all the controls in the form
15 |
16 | .PARAMETER TabIndex
17 | Specifies that you want to see the tab index
18 |
19 | .PARAMETER Text
20 | Specifies that you want to see the Title of the form
21 |
22 | .NOTES
23 | Author: Francois-Xavier Cat
24 | Twitter:@LazyWinAdm
25 | WWW: lazywinadmin.com
26 | github.com/lazywinadmin
27 | #>
28 |
29 | [CmdletBinding()]
30 | param
31 | (
32 | [System.Windows.Forms.Form]$Form,
33 |
34 | [Switch]$Controls,
35 |
36 | [Switch]$TabIndex,
37 |
38 | [Alias('Title')]
39 | [Switch]$Text
40 | )
41 |
42 | BEGIN
43 | {
44 | Add-Type -AssemblyName System.Windows.Forms
45 | }
46 | PROCESS
47 | {
48 | IF ($PSBoundParameters["Controls"])
49 | {
50 | $Form.Controls
51 | }
52 | IF ($PSBoundParameters["TabIndex"])
53 | {
54 | $Form.TabIndex
55 | }
56 | IF ($PSBoundParameters["Text"])
57 | {
58 | $Form.Text
59 | }
60 | } #PROCESS
61 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Get-WFListViewItem.ps1:
--------------------------------------------------------------------------------
1 | function Get-WFListViewItem
2 | {
3 | <#
4 | .SYNOPSIS
5 | Function to get item(s) from a ListView Control
6 |
7 | .DESCRIPTION
8 | Function to get item(s) from a ListView Control
9 |
10 | .EXAMPLE
11 | Get-WFListViewItem -ListView $ListView1 -SelectedItem
12 |
13 | This will return all the selected item in the list view $listview1
14 |
15 | .NOTES
16 | Author: Francois-Xavier Cat
17 | Twitter:@LazyWinAdm
18 | www.lazywinadmin.com
19 | github.com/lazywinadmin
20 |
21 | VERSION HISTORY
22 | 1.0 2014/07/03 Initial Version
23 | #>
24 | [CmdletBinding()]
25 | PARAM (
26 | [ValidateNotNull()]
27 | [Parameter(ParameterSetName = "All",
28 | Mandatory)]
29 | [Parameter(ParameterSetName = "Selected",
30 | Mandatory)]
31 | [System.Windows.Forms.ListView]$ListView,
32 |
33 | [Parameter(ParameterSetName = "Selected",
34 | Mandatory)]
35 | [switch]$SelectedItem,
36 |
37 | [Parameter(ParameterSetName = "All",
38 | Mandatory)]
39 | [switch]$All
40 | )
41 |
42 | IF ($PSBoundParameters['All']) { $ListView.Items }
43 | IF ($PSBoundParameters['SelectedItem']) { $ListView.SelectedItems }
44 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Add-WFDataGridViewColumn.ps1:
--------------------------------------------------------------------------------
1 | function Add-WFDataGridViewColumn
2 | {
3 | <#
4 | .SYNOPSIS
5 | This function add a column to a DataGridView
6 | .DESCRIPTION
7 | This function add a column to a DataGridView
8 | .EXAMPLE
9 | Add-WFDataGridViewColumn -DataGridView $datagridview1 -ColumnName $($textbox1.Text -split "," -replace '^\s+', '' -replace '\s+$', '')
10 | .EXAMPLE
11 | Add-WFDataGridViewColumn -DataGridView $datagridview1 -ColumnName "First Name","Last Name","SamAccountName","Description"
12 | .NOTES
13 | Francois-Xavier Cat
14 | www.lazywinadmin.com
15 | @lazywinadm
16 | github.com/lazywinadmin
17 | #>
18 | [CmdletBinding()]
19 | PARAM (
20 | [ValidateNotNull()]
21 | [Parameter(Mandatory = $true)]
22 | [System.Windows.Forms.DataGridView]$DataGridView,
23 |
24 | [String[]]$ColumnName
25 | )
26 | BEGIN
27 | {
28 | Add-Type -AssemblyName System.Windows.Forms
29 | }
30 | PROCESS
31 | {
32 | foreach ($Column in $ColumnName)
33 | {
34 |
35 | # Create Column object
36 | $NewColumn = New-Object -TypeName System.Windows.Forms.DataGridViewTextBoxColumn
37 | $NewColumn.Name = $Column
38 | $NewColumn.HeaderText = $Column
39 |
40 | # Add the Column to the Datagridview
41 | $DataGridView.Columns.Add($NewColumn)
42 | }
43 | }
44 | }
--------------------------------------------------------------------------------
/Archives/Get-ListBoxItem.ps1:
--------------------------------------------------------------------------------
1 | function Get-ListBoxItem
2 | {
3 | <#
4 | .SYNOPSIS
5 | Function to get item(s) from a ListBox Control
6 |
7 | .DESCRIPTION
8 | Function to get item(s) from a ListBox Control
9 |
10 | .NOTES
11 | Author: Francois-Xavier Cat
12 | Twitter:@LazyWinAdm
13 | WWW: lazywinadmin.com
14 |
15 | VERSION HISTORY
16 | 1.0 2014/04/15 Initial Version
17 | #>
18 | #Requires -Version 3
19 | PARAM (
20 | [ValidateNotNull()]
21 | [Parameter(
22 | ParameterSetName = "All",
23 | Mandatory)]
24 | [Parameter(
25 | ParameterSetName = "Selected",
26 | Mandatory)]
27 | [System.Windows.Forms.ListBox]$ListBox,
28 | [Parameter(
29 | ParameterSetName = "All",
30 | Mandatory)]
31 | [Parameter(
32 | ParameterSetName = "Selected")]
33 | [switch]$ShowCount,
34 |
35 | [Parameter(
36 | ParameterSetName = "Selected",
37 | Mandatory)]
38 | [switch]$SelectedItem,
39 | [Parameter(
40 | ParameterSetName = "All",
41 | Mandatory)]
42 | [switch]$All
43 | )
44 |
45 | IF ($All)
46 | {
47 | IF ($ShowCount)
48 | {
49 | $ListBox.Items.Count
50 | }
51 | ELSE { $ListBox.Items }
52 | }
53 |
54 | IF ($SelectedItem)
55 | {
56 | IF ($ShowCount) { $ListBox.SelectedItems.Count }
57 | ELSE { $ListBox.SelectedItems }
58 | }
59 | }
60 |
--------------------------------------------------------------------------------
/WinFormPS/Public/Reset-WFDataGridViewFormat.ps1:
--------------------------------------------------------------------------------
1 | function Reset-WFDataGridViewFormat
2 | {
3 | <#
4 | .SYNOPSIS
5 | The Reset-DataGridViewFormat function will reset the format of a datagridview control
6 |
7 | .DESCRIPTION
8 | The Reset-DataGridViewFormat function will reset the format of a datagridview control
9 |
10 | .PARAMETER DataGridView
11 | Specifies the DataGridView Control.
12 |
13 | .EXAMPLE
14 | PS C:\> Reset-DataGridViewFormat -DataGridView $DataGridViewObj
15 |
16 | .NOTES
17 | Author: Francois-Xavier Cat
18 | Twitter:@LazyWinAdm
19 | www.lazywinadmin.com
20 | github.com/lazywinadmin
21 | #>
22 |
23 | [CmdletBinding(SupportsShouldProcess = $true)]
24 | param
25 | (
26 | [Parameter(Mandatory = $true)]
27 | [System.Windows.Forms.DataGridView]$DataGridView
28 | )
29 |
30 | BEGIN
31 | {
32 | Add-Type -AssemblyName System.Windows.Forms
33 | }
34 | PROCESS
35 | {
36 | if ($PSCmdlet.ShouldProcess($DataGridView, "Reset the format"))
37 | {
38 | $DataSource = $DataGridView.DataSource
39 | $DataGridView.DataSource = $null
40 | $DataGridView.DataSource = $DataSource
41 |
42 | #$DataGridView.RowsDefaultCellStyle.BackColor = 'White'
43 | #$DataGridView.RowsDefaultCellStyle.ForeColor = 'Black'
44 | $DataGridView.RowsDefaultCellStyle = $null
45 | $DataGridView.AlternatingRowsDefaultCellStyle = $null
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Get-WFListBoxItem.ps1:
--------------------------------------------------------------------------------
1 | function Get-WFListBoxItem
2 | {
3 | <#
4 | .SYNOPSIS
5 | Function to get item(s) from a ListBox Control
6 |
7 | .DESCRIPTION
8 | Function to get item(s) from a ListBox Control
9 |
10 | .PARAMETER ListBox
11 | Specifies the ListBox control to get
12 |
13 | .PARAMETER SelectedItem
14 | Show only the selected Item
15 |
16 | .PARAMETER All
17 | Show all the item
18 |
19 | .EXAMPLE
20 | Get-WFListBoxItem -ListBox $ListBox1
21 |
22 | .EXAMPLE
23 | Get-WFListBoxItem -ListBox $ListBox1 -selectedItem
24 |
25 | .NOTES
26 | Author: Francois-Xavier Cat
27 | Twitter:@LazyWinAdm
28 | www.lazywinadmin.com
29 | github.com/lazywinadmin
30 | #>
31 |
32 | [CmdletBinding(DefaultParameterSetName = 'All')]
33 | param
34 | (
35 | [Parameter(ParameterSetName = 'All')]
36 | [Parameter(ParameterSetName = 'Selected')]
37 | [ValidateNotNull()]
38 | [System.Windows.Forms.ListBox]$ListBox,
39 |
40 | [Parameter(ParameterSetName = 'Selected')]
41 | [switch]$SelectedItem,
42 |
43 | [Parameter(ParameterSetName = 'All')]
44 | [switch]$All
45 | )
46 |
47 | BEGIN
48 | {
49 | Add-Type -AssemblyName System.Windows.Forms
50 | }
51 | PROCESS
52 | {
53 | #All
54 | IF ($PSBoundParameters['All'])
55 | {
56 | $ListBox.Items
57 | }
58 |
59 | IF ($PSBoundParameters['SelectedItem'])
60 | {
61 | $ListBox.SelectedItems
62 | }
63 | }
64 | } #Get-ListBoxItem
--------------------------------------------------------------------------------
/WinFormPS/Public/Get-WFComboboxItem.ps1:
--------------------------------------------------------------------------------
1 | function Get-WFComboboxItem
2 | {
3 | <#
4 | .SYNOPSIS
5 | Function to get item(s) from a Combobox Control
6 |
7 | .DESCRIPTION
8 | Function to get item(s) from a Combobox Control
9 |
10 | .PARAMETER ComboBox
11 | Specifies the Combobox control to
12 |
13 | .PARAMETER SelectedItem
14 | A description of the SelectedItem parameter.
15 |
16 | .PARAMETER All
17 | A description of the All parameter.
18 |
19 | .EXAMPLE
20 | Get-WFComboboxItem -ComboBox $Combobox -SelectedItem
21 |
22 | .EXAMPLE
23 | Get-WFComboboxItem -ComboBox $Combobox
24 |
25 | .EXAMPLE
26 | Get-WFComboboxItem -ComboBox $Combobox -all
27 |
28 | .NOTES
29 | Author: Francois-Xavier Cat
30 | Twitter:@LazyWinAdm
31 | WWW: lazywinadmin.com
32 | github.com/lazywinadmin
33 | #>
34 |
35 | [CmdletBinding(DefaultParameterSetName = 'All')]
36 | param
37 | (
38 | [Parameter(ParameterSetName = 'All')]
39 | [Parameter(ParameterSetName = 'Selected')]
40 | [ValidateNotNull()]
41 | [System.Windows.Forms.ComboBox]$ComboBox,
42 |
43 | [Parameter(ParameterSetName = 'Selected')]
44 | [switch]$SelectedItem,
45 |
46 | [Parameter(ParameterSetName = 'All')]
47 | [switch]$All
48 | )
49 |
50 | BEGIN
51 | {
52 | Add-Type -AssemblyName System.Windows.Forms
53 | }
54 | PROCESS
55 | {
56 | #All
57 | IF ($PSBoundParameters['All'])
58 | {
59 | $ComboBox.Items
60 | }
61 |
62 | IF ($PSBoundParameters['SelectedItem'])
63 | {
64 | $ComboBox.SelectedItem
65 | }
66 | }
67 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/New-WFMessageBox.ps1:
--------------------------------------------------------------------------------
1 | function New-WFMessageBox
2 | {
3 | <#
4 | .SYNOPSIS
5 | The New-WFMessageBox functio will show a message box to the user
6 |
7 | .DESCRIPTION
8 | The New-WFMessageBox functio will show a message box to the user
9 |
10 | .PARAMETER Message
11 | Specifies the message to show
12 |
13 | .PARAMETER Title
14 | Specifies the title of the message box
15 |
16 | .PARAMETER Buttons
17 | Specifies which button to add. Just press tab to see the choices
18 |
19 | .PARAMETER Icon
20 | Specifies the icon to show. Just press tab to see the choices
21 |
22 | .EXAMPLE
23 | PS C:\> New-WFMessageBox -Message "Hello World" -Title "First Message" -Buttons "RetryCancel" -Icon "Asterix"
24 |
25 | .NOTES
26 | Author: Francois-Xavier Cat
27 | Twitter:@LazyWinAdm
28 | www.lazywinadmin.com
29 | github.com/lazywinadmin
30 | #>
31 |
32 | [CmdletBinding(SupportsShouldProcess = $true)]
33 | [OutputType([System.Windows.Forms.DialogResult])]
34 | param
35 | (
36 | [Parameter(Mandatory = $true)]
37 | [String]$Message,
38 |
39 | [String]$Title,
40 |
41 | [System.Windows.Forms.MessageBoxButtons]$Buttons = "OK",
42 |
43 | [System.Windows.Forms.MessageBoxIcon]$Icon = "None"
44 | )
45 |
46 | BEGIN
47 | {
48 | Add-Type -AssemblyName System.Windows.Forms
49 | }
50 | PROCESS
51 | {
52 | if ($PSCmdlet.ShouldProcess("MessageBox", "Show a new message box"))
53 | {
54 | [System.Windows.Forms.MessageBox]::Show($Message, $Title, $Buttons, $Icon)
55 | }
56 | }
57 | } #New-MessageBox
--------------------------------------------------------------------------------
/Archives/Load-DataGridView.ps1:
--------------------------------------------------------------------------------
1 | function Load-DataGridView
2 | {
3 | <#
4 | .SYNOPSIS
5 | This functions helps you load items into a DataGridView.
6 |
7 | .DESCRIPTION
8 | Use this function to dynamically load items into the DataGridView control.
9 |
10 | .PARAMETER DataGridView
11 | The ComboBox control you want to add items to.
12 |
13 | .PARAMETER Item
14 | The object or objects you wish to load into the ComboBox's items collection.
15 |
16 | .PARAMETER DataMember
17 | Sets the name of the list or table in the data source for which the DataGridView is displaying data.
18 |
19 | .NOTES
20 | SAPIEN Technologies, Inc.
21 | http://www.sapien.com/
22 | #>
23 |
24 | Param (
25 | [ValidateNotNull()]
26 | [Parameter(Mandatory = $true)]
27 | [System.Windows.Forms.DataGridView]$DataGridView,
28 | [ValidateNotNull()]
29 | [Parameter(Mandatory = $true)]
30 | $Item,
31 | [Parameter(Mandatory = $false)]
32 | [string]$DataMember
33 | )
34 | $DataGridView.SuspendLayout()
35 | $DataGridView.DataMember = $DataMember
36 |
37 | if ($Item -is [System.ComponentModel.IListSource]`
38 | -or $Item -is [System.ComponentModel.IBindingList] -or $Item -is [System.ComponentModel.IBindingListView])
39 | {
40 | $DataGridView.DataSource = $Item
41 | }
42 | else
43 | {
44 | $array = New-Object System.Collections.ArrayList
45 |
46 | if ($Item -is [System.Collections.IList])
47 | {
48 | $array.AddRange($Item)
49 | }
50 | else
51 | {
52 | $array.Add($Item)
53 | }
54 | $DataGridView.DataSource = $array
55 | }
56 |
57 | $DataGridView.ResumeLayout()
58 | }
59 |
--------------------------------------------------------------------------------
/WinFormPS/Public/Get-WFCheckedListBoxItem.ps1:
--------------------------------------------------------------------------------
1 | function Get-WFCheckedListBoxItem
2 | {
3 | <#
4 | .SYNOPSIS
5 | Function to get item(s) from a CheckedListBox Control
6 |
7 | .DESCRIPTION
8 | Function to get item(s) from a CheckedListBox Control
9 |
10 | .PARAMETER CheckedListBox
11 | Specifies the CheckedListBox control
12 |
13 | .PARAMETER SelectedItem
14 | Specifies that the function returns only the selected item (highlighted)
15 |
16 | .PARAMETER All
17 | Specifies that the function returns all the items
18 |
19 | .PARAMETER CheckedItem
20 | Specifies that the function returns only the checked items
21 |
22 | .NOTES
23 | Author: Francois-Xavier Cat
24 | Twitter:@LazyWinAdm
25 | WWW: lazywinadmin.com
26 | github.com/lazywinadmin
27 | #>
28 |
29 | [CmdletBinding(DefaultParameterSetName = 'All')]
30 | param
31 | (
32 | [Parameter(ParameterSetName = 'All')]
33 | [Parameter(ParameterSetName = 'Selected')]
34 | [Parameter(ParameterSetName = 'Checked')]
35 | [ValidateNotNull()]
36 | [System.Windows.Forms.CheckedListBox]$CheckedListBox,
37 |
38 | [Parameter(ParameterSetName = 'Selected')]
39 | [switch]$SelectedItem,
40 |
41 | [Parameter(ParameterSetName = 'All')]
42 | [switch]$All,
43 |
44 | [Parameter(ParameterSetName = 'Checked')]
45 | [switch]$CheckedItem
46 | )
47 |
48 | BEGIN
49 | {
50 | Add-Type -AssemblyName System.Windows.Forms
51 | }
52 | PROCESS
53 | {
54 |
55 | IF ($PSBoundParameters['All'])
56 | {
57 | # Show all the items
58 | $CheckedListBox.Items
59 | }
60 |
61 | IF ($PSBoundParameters['SelectedItem'])
62 | {
63 | # Show the selected Items (highlighted)
64 | $CheckedListBox.SelectedItems
65 | }
66 | IF ($PSBoundParameters['CheckedItem'])
67 | {
68 | # Show the CheckedItems
69 | $CheckedListBox.CheckedItems
70 | }
71 | }
72 | }
--------------------------------------------------------------------------------
/Archives/Load-ListBox.ps1:
--------------------------------------------------------------------------------
1 | function Load-ListBox
2 | {
3 | <#
4 | .SYNOPSIS
5 | This functions helps you load items into a ListBox or CheckedListBox.
6 |
7 | .DESCRIPTION
8 | Use this function to dynamically load items into the ListBox control.
9 |
10 | .PARAMETER ListBox
11 | The ListBox control you want to add items to.
12 |
13 | .PARAMETER Items
14 | The object or objects you wish to load into the ListBox's Items collection.
15 |
16 | .PARAMETER DisplayMember
17 | Indicates the property to display for the items in this control.
18 |
19 | .PARAMETER Append
20 | Adds the item(s) to the ListBox without clearing the Items collection.
21 |
22 | .EXAMPLE
23 | Load-ListBox $ListBox1 "Red", "White", "Blue"
24 |
25 | .EXAMPLE
26 | Load-ListBox $listBox1 "Red" -Append
27 | Load-ListBox $listBox1 "White" -Append
28 | Load-ListBox $listBox1 "Blue" -Append
29 |
30 | .EXAMPLE
31 | Load-ListBox $listBox1 (Get-Process) "ProcessName"
32 |
33 | .NOTES
34 | SAPIEN Technologies, Inc.
35 | http://www.sapien.com/
36 | #>
37 | Param (
38 | [ValidateNotNull()]
39 | [Parameter(Mandatory = $true)]
40 | [System.Windows.Forms.ListBox]$ListBox,
41 | [ValidateNotNull()]
42 | [Parameter(Mandatory = $true)]
43 | $Items,
44 | [Parameter(Mandatory = $false)]
45 | [string]$DisplayMember,
46 | [switch]$Append
47 | )
48 |
49 | if (-not $Append)
50 | {
51 | $listBox.Items.Clear()
52 | }
53 |
54 | if ($Items -is [System.Windows.Forms.ListBox+ObjectCollection])
55 | {
56 | $listBox.Items.AddRange($Items)
57 | }
58 | elseif ($Items -is [Array])
59 | {
60 | $listBox.BeginUpdate()
61 | foreach ($obj in $Items)
62 | {
63 | $listBox.Items.Add($obj)
64 | }
65 | $listBox.EndUpdate()
66 | }
67 | else
68 | {
69 | $listBox.Items.Add($Items)
70 | }
71 |
72 | $listBox.DisplayMember = $DisplayMember
73 | }
74 |
--------------------------------------------------------------------------------
/WinFormPS/Public/New-WFInputBox.ps1:
--------------------------------------------------------------------------------
1 | function New-WFInputBox
2 | {
3 | <#
4 | .SYNOPSIS
5 | The New-WFInputBox function will prompt the user for input in a window.
6 |
7 | .DESCRIPTION
8 | The New-WFInputBox function will prompt the user for input in a window.
9 |
10 | .PARAMETER Message
11 | Specifies the question you want to ask to the user.
12 |
13 | .PARAMETER Title
14 | Specifies the title of the window.
15 |
16 | .PARAMETER DefaultInputText
17 | Specifies the default answer text.
18 |
19 | .EXAMPLE
20 | PS C:\> New-WFInputBox -Message 'What is your computer name' -Title 'Computer' -DefaultInputText "$env:ComputerName"
21 |
22 | .NOTES
23 | Author: Francois-Xavier Cat
24 | Twitter:@LazyWinAdm
25 | www.lazywinadmin.com
26 | github.com/lazywinadmin
27 | #>
28 |
29 | [CmdletBinding(SupportsShouldProcess = $true)]
30 | param
31 | (
32 | [Parameter(Mandatory = $true)]
33 | [string]$Message,
34 |
35 | [Alias('WindowsTitle')]
36 | [string]$Title,
37 |
38 | [Alias('DefaultText')]
39 | [string]$DefaultInputText
40 | )
41 |
42 | BEGIN
43 | {
44 | TRY
45 | {
46 | # Load the Assembly
47 | Add-Type -AssemblyName Microsoft.VisualBasic -ErrorAction 'Stop' -ErrorVariable ErrorBeginAddType
48 | }
49 | CATCH
50 | {
51 | Write-Warning -message "[BEGIN] Something wrong happened"
52 | IF ($ErrorBeginAddType) { Write-Warning -message "[BEGIN] Error while loading assembly Microsoft.VisualBasic" }
53 | Write-Error -message $Error[0].Exception.Message
54 | }
55 | }
56 | PROCESS
57 | {
58 | if ($PSCmdlet.ShouldProcess("InputBox", "Show a new Input box with the following message: $Message"))
59 | {
60 | #[Microsoft.VisualBasic.Interaction]::InputBox($Message, $Title, $DefaultInputText, $XPosition, $YPosition)
61 | Write-output $([Microsoft.VisualBasic.Interaction]::InputBox($Message, $Title, $DefaultInputText))
62 | }
63 | }
64 | } #New-InputBox
--------------------------------------------------------------------------------
/WinFormPS/Public/Import-WFDataGridView.ps1:
--------------------------------------------------------------------------------
1 | function Import-WFDataGridView
2 | {
3 | <#
4 | .SYNOPSIS
5 | This functions helps you load items into a DataGridView.
6 |
7 | .DESCRIPTION
8 | Use this function to dynamically load items into the DataGridView control.
9 |
10 | .PARAMETER DataGridView
11 | The ComboBox control you want to add items to.
12 |
13 | .PARAMETER Item
14 | The object or objects you wish to load into the ComboBox's items collection.
15 |
16 | .PARAMETER DataMember
17 | Sets the name of the list or table in the data source for which the DataGridView is displaying data.
18 |
19 | .EXAMPLE
20 | Import-WFDataGridView -DataGridView $DataGridView1 -Item (Get-Process)
21 |
22 | .NOTES
23 | Based on Load-DataGridView function from:
24 | SAPIEN Technologies, Inc.
25 | http://www.sapien.com/
26 |
27 | #>
28 |
29 | Param (
30 | [ValidateNotNull()]
31 | [Parameter(Mandatory = $true)]
32 | [System.Windows.Forms.DataGridView]$DataGridView,
33 |
34 | [ValidateNotNull()]
35 | [Parameter(Mandatory = $true)]
36 | $Item,
37 |
38 | [Parameter(Mandatory = $false)]
39 | [string]$DataMember
40 | )
41 | BEGIN
42 | {
43 | Add-Type -AssemblyName System.Windows.Forms
44 | }
45 | PROCESS
46 | {
47 | $DataGridView.SuspendLayout()
48 | $DataGridView.DataMember = $DataMember
49 |
50 | if ($Item -is [System.ComponentModel.IListSource]`
51 | -or $Item -is [System.ComponentModel.IBindingList] -or $Item -is [System.ComponentModel.IBindingListView])
52 | {
53 | $DataGridView.DataSource = $Item
54 | }
55 | else
56 | {
57 | $array = New-Object System.Collections.ArrayList
58 |
59 | if ($Item -is [System.Collections.IList])
60 | {
61 | $array.AddRange($Item)
62 | }
63 | else
64 | {
65 | $array.Add($Item)
66 | }
67 | $DataGridView.DataSource = $array
68 | }
69 | }
70 | END
71 | {
72 | $DataGridView.ResumeLayout()
73 | }
74 | }
75 |
--------------------------------------------------------------------------------
/WinFormPS/Public/New-WFOpenFolderDialog.ps1:
--------------------------------------------------------------------------------
1 | function New-WFOpenFolderDialog
2 | {
3 | <#
4 | .SYNOPSIS
5 | The New-WFOpenFolderDialog function will ask the user to select one folder.
6 |
7 | .DESCRIPTION
8 | The New-WFOpenFolderDialog function will ask the user to select one folder.
9 |
10 | .PARAMETER Description
11 | Specifies a message to help the user select a folder
12 |
13 | .PARAMETER RootFolder
14 | Specifies the folder where to look. All the SpecialFolder are listed using tab. Default is "Desktop".
15 |
16 | .PARAMETER ShowNewFolderButton
17 | Specifies if the "New Folder" button should be displayed. Default is True.
18 |
19 | .EXAMPLE
20 | PS C:\> New-WFOpenFolderDialog -Description "Please select a folder" -RootFolder "Desktop"
21 |
22 | .NOTES
23 | Author: Francois-Xavier Cat
24 | Twitter:@LazyWinAdm
25 | www.lazywinadmin.com
26 | github.com/lazywinadmin
27 | #>
28 |
29 | [CmdletBinding(SupportsShouldProcess = $true)]
30 | param
31 | (
32 | [Alias('Message')]
33 | [String]$Description = "Please select a folder",
34 |
35 | [Alias('Path')]
36 | [Environment+SpecialFolder]$RootFolder = "Desktop",
37 |
38 | [Alias('NewFolderButton', 'NewFolder')]
39 | [bool]$ShowNewFolderButton = $true
40 | )
41 |
42 | BEGIN
43 | {
44 | Add-Type -AssemblyName System.Windows.Forms
45 | }
46 | PROCESS
47 | {
48 | IF ($PSCmdlet.ShouldProcess('OpenFolderDialog', 'Will prompt to select a folder'))
49 | {
50 | # Create an object and properties
51 | $FolderBrowser = New-Object System.Windows.Forms.FolderBrowserDialog
52 | $FolderBrowser.Description = $Description
53 | $FolderBrowser.RootFolder = $RootFolder
54 | $FolderBrowser.ShowNewFolderButton = $ShowNewFolderButton
55 |
56 | # Show the Dialog
57 | [void]$FolderBrowser.ShowDialog()
58 | }
59 | }
60 | END
61 | {
62 | # Return the selected folder
63 | $FolderBrowser.SelectedPath
64 | }
65 | } #New-OpenFolderDialog
--------------------------------------------------------------------------------
/WinFormPS/Public/Set-WFForm.ps1:
--------------------------------------------------------------------------------
1 | function Set-WFForm
2 | {
3 | <#
4 | .SYNOPSIS
5 | The Set-WFForm function is used to change the properties of a Form or to intract with it
6 |
7 | .DESCRIPTION
8 | The Set-WFForm function is used to change the properties of a Form or to intract with it
9 |
10 | .PARAMETER Form
11 | Specifies the Form control
12 |
13 | .PARAMETER Text
14 | Specifies the text/Title of the form
15 |
16 | .PARAMETER WindowState
17 | Set the Window State of the form.
18 |
19 | .PARAMETER BringToFront
20 | Bring the form to the front of the screen
21 |
22 | .EXAMPLE
23 | PS C:\> Set-WFForm -Form $form1 -BringToFront
24 |
25 | .EXAMPLE
26 | PS C:\> Set-WFForm -Form $form1 -Text "My GUI"
27 |
28 | .EXAMPLE
29 | PS C:\> Set-WFForm -Form $form1 -WindowState "Minimized"
30 |
31 | .NOTES
32 | Author: Francois-Xavier Cat
33 | Twitter:@LazyWinAdm
34 | www.lazywinadmin.com
35 | github.com/lazywinadmin
36 | #>
37 |
38 | [CmdletBinding(SupportsShouldProcess = $true)]
39 | param
40 | (
41 | [System.Windows.Forms.Form]$Form,
42 |
43 | [Alias('Title')]
44 | [String]$Text = "Hello World",
45 |
46 | [ValidateSet('Maximized', 'Minimized', 'Normal')]
47 | [String]$WindowState,
48 |
49 | [Switch]$BringToFront
50 | )
51 |
52 | BEGIN
53 | {
54 | Add-Type -AssemblyName System.Windows.Forms
55 | }
56 | PROCESS
57 | {
58 | IF ($PSBoundParameters["Text"])
59 | {
60 | IF ($PSCmdlet.ShouldProcess($Form, "Set the Title"))
61 | {
62 | $Form.Text = $Text
63 | }
64 | }
65 | IF ($PSBoundParameters["WindowState"])
66 | {
67 | IF ($PSCmdlet.ShouldProcess($Form, "Set Windows State to $WindowState"))
68 | {
69 | $Form.WindowState = $WindowState
70 | }
71 | }
72 | IF ($PSBoundParameters["BringToFront"])
73 | {
74 | IF ($PSCmdlet.ShouldProcess($Form, "Bring the Form to the front of the screen"))
75 | {
76 | $Form.BringToFront()
77 | }
78 | }
79 | } #PROCESS
80 | }
--------------------------------------------------------------------------------
/Archives/Remove-ListBoxItem.ps1:
--------------------------------------------------------------------------------
1 | function Remove-ListBoxItem
2 | {
3 | <#
4 | .SYNOPSIS
5 | Function to remove item(s) from a ListBox Control
6 |
7 | .DESCRIPTION
8 | Function to remove item(s) from a ListBox Control
9 |
10 | .NOTES
11 | Author: Francois-Xavier Cat
12 | Twitter:@LazyWinAdm
13 | WWW: lazywinadmin.com
14 |
15 | VERSION HISTORY
16 | 1.0 2014/04/15 Initial Version
17 | #>
18 |
19 | #Requires -Version 3
20 | [CmdletBinding()]
21 | PARAM (
22 | [ValidateNotNull()]
23 | [Parameter(ParameterSetName = "All", Mandatory)]
24 | [Parameter(ParameterSetName = "Pattern", Mandatory)]
25 | [Parameter(ParameterSetName = "Selected", Mandatory)]
26 | [System.Windows.Forms.ListBox]$ListBox,
27 | [Parameter(ParameterSetName = "All", Mandatory)]
28 | [Switch]$All,
29 | [Parameter(ParameterSetName = "Pattern", Mandatory)]
30 | [String[]]$Pattern,
31 | [Parameter(ParameterSetName = "Selected", Mandatory)]
32 | [Switch]$SelectedItems
33 | )
34 | BEGIN
35 | {
36 | Write-Verbose -Message "BEGIN - ListBox - Begining to update"
37 | $ListBox.BeginUpdate()
38 | }
39 | PROCESS
40 | {
41 | IF ($All)
42 | {
43 | Write-Verbose -Message "PROCESS - ListBox - Clear all item(s)"
44 | $ListBox.Items.Clear()
45 | }
46 |
47 | IF ($Pattern)
48 | {
49 | Write-Verbose -Message "PROCESS - ListBox - Clear item(s) with specific pattern"
50 | foreach ($item in $ListBox.Items)
51 | {
52 | foreach ($Text in $Pattern)
53 | {
54 | IF ($item -like $Text)
55 | {
56 | Write-Verbose -Message "PROCESS - ListBox - Removing item: $item"
57 | $ListBox.Items.Remove($item)
58 | }
59 | }
60 | }
61 | }
62 | IF ($SelectedItems)
63 | {
64 | while ($ListBox.SelectedItems -gt 0)
65 | {
66 | foreach ($item in $ListBox.SelectedItems)
67 | {
68 | Write-Verbose -Message "PROCESS - ListBox - Removing selected item: $item"
69 | $ListBox.Items.Remove($item)
70 | }
71 | }
72 | }
73 |
74 | }
75 | END
76 | {
77 | Write-Verbose -Message "END - ListBox - End of update"
78 | $ListBox.EndUpdate()
79 | }
80 | }
81 |
--------------------------------------------------------------------------------
/WinFormPS/Public/Import-WFListBox.ps1:
--------------------------------------------------------------------------------
1 | function Import-WFListBox
2 | {
3 | <#
4 | .SYNOPSIS
5 | This functions helps you load items into a ListBox or CheckedListBox.
6 |
7 | .DESCRIPTION
8 | Use this function to dynamically load items into the ListBox control.
9 |
10 | .PARAMETER ListBox
11 | The ListBox control you want to add items to.
12 |
13 | .PARAMETER Items
14 | The object or objects you wish to load into the ListBox's Items collection.
15 |
16 | .PARAMETER DisplayMember
17 | Indicates the property to display for the items in this control.
18 |
19 | .PARAMETER Append
20 | Adds the item(s) to the ListBox without clearing the Items collection.
21 |
22 | .EXAMPLE
23 | Import-WFListBox $ListBox1 "Red", "White", "Blue"
24 |
25 | .EXAMPLE
26 | Import-WFListBox $listBox1 "Red" -Append
27 | Import-WFListBox $listBox1 "White" -Append
28 | Import-WFListBox $listBox1 "Blue" -Append
29 |
30 | .EXAMPLE
31 | Import-WFListBox $listBox1 (Get-Process) "ProcessName"
32 |
33 | .NOTES
34 | SAPIEN Technologies, Inc.
35 | http://www.sapien.com/
36 | #>
37 | Param (
38 | [ValidateNotNull()]
39 | [Parameter(Mandatory = $true)]
40 | [System.Windows.Forms.ListBox]$ListBox,
41 |
42 | [ValidateNotNull()]
43 | [Parameter(Mandatory = $true)]
44 | $Items,
45 |
46 | [Parameter(Mandatory = $false)]
47 | [string]$DisplayMember,
48 |
49 | [switch]$Append
50 | )
51 | BEGIN
52 | {
53 | Add-Type -AssemblyName System.Windows.Forms
54 | }
55 | PROCESS
56 | {
57 |
58 | if (-not $Append)
59 | {
60 | $listBox.Items.Clear()
61 | }
62 |
63 | if ($Items -is [System.Windows.Forms.ListBox+ObjectCollection])
64 | {
65 | $listBox.Items.AddRange($Items)
66 | }
67 | elseif ($Items -is [Array])
68 | {
69 | $listBox.BeginUpdate()
70 | foreach ($obj in $Items)
71 | {
72 | $listBox.Items.Add($obj)
73 | }
74 | $listBox.EndUpdate()
75 | }
76 | else
77 | {
78 | $listBox.Items.Add($Items)
79 | }
80 |
81 | $listBox.DisplayMember = $DisplayMember
82 | } #PROCESS
83 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # WinFormPS
2 |
3 | WinFormPS is a PowerShell module to manage and interact with Windows Forms (WinForms) Controls.
4 |
5 | If you are among those creating PowerShell Graphical User Interface using tools such as SAPIEN PowerShell Studio, you will realize that you need to dive a lot into the controls and MSDN to find the accurate methods or properties to perform the actions you want.
6 |
7 | The goal of this module is to resolve that issue and make it simpler by using a set of functions to control WinForms Controls.
8 |
9 |
10 | ## Installation
11 | #### Download from PowerShell Gallery (PowerShell v5+)
12 | ``` powershell
13 | Install-Module -name WinFormPS
14 | ```
15 | #### Download from GitHub repository
16 |
17 | * Download the repository
18 | * Unblock the zip file
19 | * Extract the folder to a module path (e.g. $home\Documents\WindowsPowerShell\Modules)
20 |
21 |
22 | ## Usage
23 | ```powershell
24 | # Import the module.
25 | Import-Module -Name WinFormPS
26 |
27 | # Get the commands available
28 | Get-Command -Module WinFormPS
29 |
30 | # Get help
31 | Get-Help Get-WFForm
32 | Get-Help about_WinFormPS
33 | ```
34 |
35 | ## Help !!
36 | Would love contributors, suggestions, feedback, and other help!
37 |
38 | ## More Information
39 | * Sapien's Blog - Spotlight on Controls https://www.sapien.com/blog/topics/spotlight-on-controls/
40 | * MSDN is a great resource if you want to find more information on the NET classes to use. See [System.Windows.Forms](https://msdn.microsoft.com/en-us/library/system.windows.forms%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396)
41 | * [DotNetPerls.com](http://www.dotnetperls.com/windows) Great resource if you want to understand what is important in each WinForms Controls
42 |
43 | ## Notes
44 | * Thanks to the SAPIEN Inc. team (in particular David Corrales and June Blender) and their great tool PowerShell Studio! Really makes life easier to create, update and manage PowerShell scripts and UI. Some functions in this module are coming from SAPIEN's Team, you will notice in the Comment Based Help a mention for that. They were kind enought to let me use some their code. Thanks Again! You guys rock!
45 |
46 | ## Examples
47 | #### Set-WFDataGridView
48 | This function allow you to perform different action against a DataGridView
49 | 
--------------------------------------------------------------------------------
/WinFormPS/Public/Add-WFDataGridViewRow.ps1:
--------------------------------------------------------------------------------
1 | function Add-WFDataGridViewRow
2 | {
3 | <#
4 | .SYNOPSIS
5 | This function add a row to a DataGridView
6 |
7 | .DESCRIPTION
8 | This function add a row to a DataGridView
9 |
10 | .PARAMETER DataGridView
11 | Specifies the DataGridView Control to use
12 |
13 | .PARAMETER Title
14 | Specifies the Title to set on the new row
15 |
16 | .PARAMETER Values
17 | Specities the values to add
18 |
19 | .PARAMETER Collection
20 | Specifies the number of column to add
21 |
22 | .EXAMPLE
23 | Add-WFDataGridViewRow -DataGridView $datagridview1 -Title "Name1" -Values ($textbox1.Text -split ",")
24 |
25 | Add a new row with the Title 'Name1' and the values from $textbox1
26 |
27 | .EXAMPLE
28 | Add-WFDataGridViewRow -DataGridView $datagridview1
29 |
30 | Add an empty row
31 |
32 | .EXAMPLE
33 | Add-WFDataGridViewRow -DataGridView $datagridview1 -Collection 3
34 |
35 | Add 3 empty rows
36 |
37 | .EXAMPLE
38 | Add-WFDataGridViewRow -DataGridView $datagridview1 -Values "Francois-Xavier","Cat","fxcat"
39 |
40 | Add a row with the values specified.
41 |
42 | .NOTES
43 | Francois-Xavier Cat
44 | www.lazywinadmin.com
45 | @lazywinadm
46 | github.com/lazywinadmin
47 | #>
48 |
49 | [CmdletBinding(DefaultParameterSetName = 'EmptyRow')]
50 | param
51 | (
52 | [Parameter(Mandatory = $true)]
53 | [ValidateNotNull()]
54 | [System.Windows.Forms.DataGridView]$DataGridView,
55 |
56 | [Parameter(ParameterSetName = 'Row',
57 | Mandatory = $true)]
58 | [String]$Title,
59 |
60 | [Parameter(ParameterSetName = 'Row')]
61 | [Array]$Values,
62 |
63 | [Parameter(ParameterSetName = 'Collection',
64 | Mandatory = $true)]
65 | [int32]$Collection
66 | )
67 |
68 | BEGIN
69 | {
70 | Add-Type -AssemblyName System.Windows.Forms
71 | }
72 | PROCESS
73 | {
74 | IF ($PSCmdlet.ParameterSetName -eq 'EmptyRow')
75 | {
76 | $DataGridView.Rows.Add()
77 | }
78 | ELSEIF ($PSCmdlet.ParameterSetName -eq 'Row')
79 | {
80 | $Row = New-Object -TypeName System.Windows.Forms.DataGridViewRow
81 | $Row.HeaderCell.Value = $Title
82 | $Row.CreateCells($DataGridView, $Values)
83 |
84 | # Add the row
85 | $DataGridView.Rows.Add($Row)
86 |
87 | }
88 | ELSEIF ($PSCmdlet.ParameterSetName -eq 'Collection')
89 | {
90 | $DataGridView.Rows.Add($Collection)
91 | }
92 | }
93 | }
--------------------------------------------------------------------------------
/Archives/Add-ListViewItem.ps1:
--------------------------------------------------------------------------------
1 | function Add-ListViewItem
2 | {
3 | <#
4 | .SYNOPSIS
5 | Adds the item(s) to the ListView and stores the object in the ListViewItem's Tag property.
6 |
7 | .DESCRIPTION
8 | Adds the item(s) to the ListView and stores the object in the ListViewItem's Tag property.
9 |
10 | .PARAMETER ListView
11 | The ListView control to add the items to.
12 |
13 | .PARAMETER Items
14 | The object or objects you wish to load into the ListView's Items collection.
15 |
16 | .PARAMETER ImageIndex
17 | The index of a predefined image in the ListView's ImageList.
18 |
19 | .PARAMETER SubItems
20 | List of strings to add as Subitems.
21 |
22 | .PARAMETER Group
23 | The group to place the item(s) in.
24 |
25 | .PARAMETER Clear
26 | This switch clears the ListView's Items before adding the new item(s).
27 |
28 | .EXAMPLE
29 | Add-ListViewItem -ListView $listview1 -Items "Test" -Group $listview1.Groups[0] -ImageIndex 0 -SubItems "Installed"
30 |
31 | .EXAMPLE
32 | Add-ListViewItem -ListView $listview1 -Items $Output.SamAccountName -SubItems $Output.isLockedOut, $Output.Description, $Output.DN
33 |
34 | .NOTES
35 | SAPIEN Technologies, Inc.
36 | http://www.sapien.com/
37 | #>
38 |
39 | Param (
40 | [ValidateNotNull()]
41 | [Parameter(Mandatory = $true)]
42 | [System.Windows.Forms.ListView]$ListView,
43 | [ValidateNotNull()]
44 | [Parameter(Mandatory = $true)]
45 | $Items,
46 | [int]$ImageIndex = -1,
47 | [string[]]$SubItems,
48 | [System.Windows.Forms.ListViewGroup]$Group,
49 | [switch]$Clear)
50 |
51 | if ($Clear)
52 | {
53 | $ListView.Items.Clear();
54 | }
55 |
56 | if ($Items -is [Array])
57 | {
58 | $ListView.BeginUpdate()
59 | foreach ($item in $Items)
60 | {
61 | $listitem = $ListView.Items.Add($item.ToString(), $ImageIndex)
62 | #Store the object in the Tag
63 | $listitem.Tag = $item
64 |
65 | if ($SubItems -ne $null)
66 | {
67 | $listitem.SubItems.AddRange($SubItems)
68 | }
69 |
70 | if ($Group -ne $null)
71 | {
72 | $listitem.Group = $Group
73 | }
74 | }
75 | $ListView.EndUpdate()
76 | }
77 | else
78 | {
79 | #Add a new item to the ListView
80 | $listitem = $ListView.Items.Add($Items.ToString(), $ImageIndex)
81 | #Store the object in the Tag
82 | $listitem.Tag = $Items
83 |
84 | if ($SubItems -ne $null)
85 | {
86 | $listitem.SubItems.AddRange($SubItems)
87 | }
88 |
89 | if ($Group -ne $null)
90 | {
91 | $listitem.Group = $Group
92 | }
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/WinFormPS/Public/New-WFOpenFileDialog.ps1:
--------------------------------------------------------------------------------
1 | function New-WFOpenFileDialog
2 | {
3 | <#
4 | .SYNOPSIS
5 | The New-WFOpenFileDialog function will ask the user to select one of multiple files.
6 | The function will return the literal path of the file(s) selected
7 |
8 | .DESCRIPTION
9 | The New-WFOpenFileDialog function will ask the user to select one of multiple files.
10 | The function will return the literal path of the file(s) selected
11 |
12 | .PARAMETER WindowsTitle
13 | Specifies the Title of the window.
14 |
15 | .PARAMETER Path
16 | Specifies the Path where the dialog will open.
17 |
18 | .PARAMETER Filter
19 | Specifies the extension filter.Default is "All files (*.*)|*.*"
20 | Other example:
21 | "Text files (*.txt)|*.txt|All files (*.*)|*.*";
22 | "Photos files (*.jpg)|*.png|All files (*.*)|*.*";
23 |
24 | .PARAMETER AllowMultiSelect
25 | Allow the user to select multiple files.
26 |
27 | .EXAMPLE
28 | PS C:\> New-WFOpenFileDialog -WindowsTitle 'Upload' -Path 'c:\"
29 |
30 | .NOTES
31 | Author: Francois-Xavier Cat
32 | Twitter:@LazyWinAdm
33 | www.lazywinadmin.com
34 | github.com/lazywinadmin
35 | #>
36 |
37 | [CmdletBinding(SupportsShouldProcess = $true)]
38 | param
39 | (
40 | [Parameter(Mandatory = $true)]
41 | [Alias('Title')]
42 | [String]$WindowsTitle,
43 |
44 | [Parameter(Mandatory = $true)]
45 | [String]$Path,
46 |
47 | [String]$Filter = "All files (*.*)|*.*",
48 |
49 | [switch]$AllowMultiSelect
50 | )
51 |
52 | BEGIN
53 | {
54 | Add-Type -AssemblyName System.Windows.Forms
55 | }
56 | PROCESS
57 | {
58 |
59 | # Create Object and add properties
60 | $OpenFileDialog = New-Object -TypeName System.Windows.Forms.OpenFileDialog
61 | $OpenFileDialog.InitialDirectory = $Path
62 | $OpenFileDialog.CheckPathExists = $true
63 | $OpenFileDialog.CheckFileExists = $true
64 | $OpenFileDialog.Title = $WindowTitle
65 |
66 | IF ($PSBoundParameters["Filter"]) { $OpenFileDialog.Filter = $Filter }
67 | IF ($PSBoundParameters["AllowMultiSelect"]) { $OpenFileDialog.MultiSelect = $true }
68 |
69 | IF ($PSCmdlet.ShouldProcess('OpenFileDialog','Will prompt to select a file'))
70 | {
71 | # Show the Dialog
72 | $OpenFileDialog.ShowHelp = $True
73 | [void]$OpenFileDialog.ShowDialog()
74 | }
75 | }
76 | END
77 | {
78 | # Return the selected file
79 | IF ($PSBoundParameters["AllowMultiSelect"]) { $OpenFileDialog.Filenames }
80 |
81 | # Return the selected files
82 | IF (-not $PSBoundParameters["AllowMultiSelect"]) { $OpenFileDialog.Filename }
83 | }
84 | } #New-OpenFileDialog
85 |
--------------------------------------------------------------------------------
/Archives/WinFormPS_old.psd1:
--------------------------------------------------------------------------------
1 | @{
2 |
3 | # Script module or binary module file associated with this manifest
4 | ModuleToProcess = 'WinFormPS.psm1'
5 |
6 | # Version number of this module.
7 | ModuleVersion = '1.0.0.0'
8 |
9 | # ID used to uniquely identify this module
10 | GUID = 'e2ab1621-7c42-449c-a87b-31a327fe53c9'
11 |
12 | # Author of this module
13 | Author = 'Francois-Xavier Cat'
14 |
15 | # Company or vendor of this module
16 | CompanyName = 'LazyWinAdmin.com'
17 |
18 | # Copyright statement for this module
19 | Copyright = '(c) 2015. All rights reserved.'
20 |
21 | # Description of the functionality provided by this module
22 | Description = 'WinFormPS is a module to manage WinForms controls using PowerShell functions'
23 |
24 | # Minimum version of the Windows PowerShell engine required by this module
25 | PowerShellVersion = '2.0'
26 |
27 | # Name of the Windows PowerShell host required by this module
28 | PowerShellHostName = ''
29 |
30 | # Minimum version of the Windows PowerShell host required by this module
31 | PowerShellHostVersion = ''
32 |
33 | # Minimum version of the .NET Framework required by this module
34 | DotNetFrameworkVersion = '2.0'
35 |
36 | # Minimum version of the common language runtime (CLR) required by this module
37 | CLRVersion = '2.0.50727'
38 |
39 | # Processor architecture (None, X86, Amd64, IA64) required by this module
40 | ProcessorArchitecture = 'None'
41 |
42 | # Modules that must be imported into the global environment prior to importing
43 | # this module
44 | RequiredModules = @()
45 |
46 | # Assemblies that must be loaded prior to importing this module
47 | RequiredAssemblies = @()
48 |
49 | # Script files (.ps1) that are run in the caller's environment prior to
50 | # importing this module
51 | ScriptsToProcess = @()
52 |
53 | # Type files (.ps1xml) to be loaded when importing this module
54 | TypesToProcess = @()
55 |
56 | # Format files (.ps1xml) to be loaded when importing this module
57 | FormatsToProcess = @()
58 |
59 | # Modules to import as nested modules of the module specified in
60 | # ModuleToProcess
61 | NestedModules = @()
62 |
63 | # Functions to export from this module
64 | FunctionsToExport = '*'
65 |
66 | # Cmdlets to export from this module
67 | CmdletsToExport = '*'
68 |
69 | # Variables to export from this module
70 | VariablesToExport = '*'
71 |
72 | # Aliases to export from this module
73 | AliasesToExport = '*'
74 |
75 | # List of all modules packaged with this module
76 | ModuleList = @()
77 |
78 | # List of all files packaged with this module
79 | FileList = @()
80 |
81 | # Private data to pass to the module specified in ModuleToProcess
82 | PrivateData = ''
83 |
84 | }
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/WinFormPS/Public/New-WFBalloonNotification.ps1:
--------------------------------------------------------------------------------
1 | function New-WFBalloonNotification
2 | {
3 | <#
4 | .SYNOPSIS
5 | The New-WFBalloonNotification function will show a message to the user in the notification area of Windows.
6 |
7 | .DESCRIPTION
8 | The New-WFBalloonNotification function will show a message to the user in the notification area of Windows.
9 |
10 | .PARAMETER CustomIconPath
11 | Specifies the custom icon literal path to use. Default will use the PowerShell icon.
12 |
13 | .PARAMETER TimeOut
14 | Specifies the display duration of the message. Default is 10000 milliseconds
15 |
16 | .PARAMETER BalloonIcon
17 | Specifies the Icon to show. Default is None
18 |
19 | .PARAMETER BalloonTipText
20 | Specifies the Message to show.
21 |
22 | .PARAMETER BalloonTipTitle
23 | Specifies the Title to show.
24 |
25 | .EXAMPLE
26 | PS C:\> New-WFBalloonNotification -BalloonTipText "test" -BalloonTipTitle "Title" -BalloonIcon Error
27 |
28 | .NOTES
29 | Author: Francois-Xavier Cat
30 | Twitter:@LazyWinAdm
31 | www.lazywinadmin.com
32 | github.com/lazywinadmin
33 | #>
34 |
35 | [CmdletBinding(SupportsShouldProcess = $true)]
36 | param
37 | (
38 | [String]$CustomIconPath = "C:\Windows\WinSxS\amd64_microsoft-windows-dxp-deviceexperience_31bf3856ad364e35_10.0.9926.0_none_220133b3b110f55a\sync.ico",
39 |
40 | [int]$TimeOut = "10000",
41 |
42 | [ValidateSet('None', 'Info', 'Warning', 'Error')]
43 | $BalloonIcon = "None",
44 |
45 | $BalloonTipText,
46 |
47 | $BalloonTipTitle
48 | )
49 |
50 | BEGIN
51 | {
52 | Add-Type -AssemblyName System.Windows.Forms
53 | #[void][System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
54 | }
55 | PROCESS
56 | {
57 | IF ($PSCmdlet.ShouldProcess("NotifyIcon","Show a new balloon notification"))
58 | {
59 | # Create Balloon Notification object
60 | $BalloonNotification = New-Object -TypeName System.Windows.Forms.NotifyIcon
61 |
62 | IF ($PSBoundParameters["CustomIconPath"]) { $BalloonNotification.Icon = $CustomIconPath }
63 | ELSE
64 | {
65 | # Get the Icon of PowerShell
66 | $path = Get-Process -id $pid | Select-Object -ExpandProperty Path
67 | $BalloonNotification.Icon = [System.Drawing.Icon]::ExtractAssociatedIcon($path)
68 | }
69 |
70 | # Set properties of the object
71 | $BalloonNotification.BalloonTipIcon = $BalloonIcon
72 | $BalloonNotification.BalloonTipText = $BalloonTipText
73 | $BalloonNotification.BalloonTipTitle = $BalloonTipTitle
74 |
75 | $BalloonNotification.Visible = $True
76 | $BalloonNotification.ShowBalloonTip($TimeOut)
77 | }
78 | }
79 | END
80 | {
81 | # Get rid of the Balloon
82 | #$BalloonNotification.Dispose()
83 | }
84 | } #New-BalloonNotification
--------------------------------------------------------------------------------
/Archives/Append-RichTextBox.ps1:
--------------------------------------------------------------------------------
1 | function Append-Richtextbox
2 | {
3 | <#
4 | .SYNOPSIS
5 | This function Append text to a RichTextBox
6 | .DESCRIPTION
7 | This function Append text to a RichTextBox
8 | .PARAMETER Richtextbox
9 | Specify the RichTextBox Control to use
10 | .PARAMETER Message
11 | Specify the Message to show
12 | .PARAMETER MessageColor
13 | Specify the Color to use for the Message
14 | .PARAMETER Source
15 | Specify the Source type of the Message
16 | .PARAMETER SourceColor
17 | Specify the Source type color to use
18 | .PARAMETER ComputerName
19 | Specify the ComputerName on which the message apply (nothing is done on a remote computer, it's just an informational parameter)
20 | .PARAMETER ComputerNameColor
21 | Specify the ComputerName color to use
22 | .EXAMPLE
23 | Append-Richtextbox -RichTextBox $RichTextBox1 -Message "Hello World"
24 | .EXAMPLE
25 | Append-Richtextbox -RichTextBox $RichTextBox1 -Message "Some info" -Source "Get-TSSession" -ComputerName "RemoteServe01"
26 | .NOTES
27 | Francois-Xavier Cat
28 | @lazywinadm
29 | www.lazywinadmin.com
30 |
31 | VERSION HISTORY
32 | 1.0 2014/04/16 Initial Version
33 | #>
34 | [CmdletBinding()]
35 | PARAM (
36 | [ValidateNotNull()]
37 | [Parameter(Mandatory)]
38 | [System.Windows.Forms.Richtextbox]$RichTextBox,
39 | [Parameter(Mandatory)]
40 | [string]$Message,
41 | [string]$MessageColor = "DarkGreen",
42 | [string]$DateTimeColor = "Black",
43 | [string]$Source,
44 | [string]$SourceColor = "Gray",
45 | [string]$ComputerName,
46 | [String]$ComputerNameColor = "Blue")
47 |
48 | BEGIN
49 | {
50 | # Get current date/time
51 | $SortableTime = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
52 | }
53 | PROCESS
54 | {
55 | TRY
56 | {
57 | # Add the Date/Time
58 | $RichTextBox.SelectionColor = $DateTimeColor
59 | $RichTextBox.AppendText("[$SortableTime] ")
60 |
61 |
62 | IF ($PSBoundParameters['ComputerName'])
63 | {
64 | # Add ComputerName
65 | $RichTextBox.SelectionColor = $ComputerNameColor
66 | $RichTextBox.AppendText(("$ComputerName ").ToUpper())
67 | }
68 |
69 | IF ($PSBoundParameters['Source'])
70 | {
71 | # Add Source
72 | $RichTextBox.SelectionColor = $SourceColor
73 | $RichTextBox.AppendText("$Source ")
74 | }
75 |
76 | # Add Message with a return character
77 | $RichTextBox.SelectionColor = $MessageColor
78 | $RichTextBox.AppendText("$Message`r")
79 | Write-Verbose -Message "$SortableTime $Message"
80 | }
81 | CATCH
82 | {
83 | Write-Error -Message "PROCESS - Error while writing inside the RichTextBox"
84 | }
85 | }
86 | END
87 | {
88 | # Refresh RichTextBox
89 | $RichTextBox.Refresh()
90 |
91 | # Scroll to the end of the RichTextBox
92 | $RichTextBox.ScrollToCaret()
93 | }
94 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Set-WFDataGridViewFilter.ps1:
--------------------------------------------------------------------------------
1 | function Set-WFDataGridViewFilter
2 | {
3 | <#
4 | .SYNOPSIS
5 | The function Set-WFDataGridViewFilter helps to only show specific entries with a specific value
6 |
7 | .DESCRIPTION
8 | The function Set-WFDataGridViewFilter helps to only show specific entries with a specific value.
9 | The data needs to be in a DataTable Object. You can use ConvertTo-DataTable to convert your
10 | PowerShell object into a DataTable object.
11 |
12 | .PARAMETER DataGridView
13 | Specifies the DataGridView control where the data will be filtered
14 |
15 | .PARAMETER DataTable
16 | Specifies the DataTable object that is most likely the original source of the DataGridView
17 |
18 | .PARAMETER Filter
19 | Specifies the string to search
20 |
21 | .PARAMETER ColumnName
22 | Specifies to search in a specific column name
23 |
24 | .PARAMETER AllColumns
25 | Specifies to search all the column
26 |
27 | .EXAMPLE
28 | PS C:\> Set-WFDataGridViewFilter -DataGridView $datagridview1 -DataTable $ProcessesDT -AllColumns -Filter $textbox1.Text
29 |
30 | .EXAMPLE
31 | PS C:\> Set-WFDataGridViewFilter -DataGridView $datagridview1 -DataTable $ProcessesDT -ColumnName "Name" -Filter $textbox1.Text
32 |
33 | .NOTES
34 | Author: Francois-Xavier Cat
35 | Twitter:@LazyWinAdm
36 | www.lazywinadmin.com
37 | github.com/lazywinadmin
38 |
39 | RowFilter Help:
40 | https://msdn.microsoft.com/en-us/library/system.data.datacolumn.expression(VS.80).aspx
41 | #>
42 |
43 | [CmdletBinding(DefaultParameterSetName = 'AllColumns',
44 | SupportsShouldProcess = $true)]
45 | param
46 | (
47 | [Parameter(Mandatory = $true)]
48 | [System.Windows.Forms.DataGridView]$DataGridView,
49 |
50 | [Parameter(Mandatory = $true)]
51 | [System.Data.DataTable]$DataTable,
52 |
53 | [Parameter(Mandatory = $true)]
54 | [String]$Filter,
55 |
56 | [Parameter(ParameterSetName = 'OneColumn',
57 | Mandatory = $true)]
58 | [String]$ColumnName,
59 |
60 | [Parameter(ParameterSetName = 'AllColumns',
61 | Mandatory = $true)]
62 | [Switch]$AllColumns
63 | )
64 |
65 | BEGIN
66 | {
67 | Add-Type -AssemblyName System.Windows.Forms
68 | }
69 | PROCESS
70 | {
71 | IF ($PSBoundParameters['AllColumns'])
72 | {
73 | FOREACH ($Column in $DataTable.Columns)
74 | {
75 | $RowFilter += "{0} Like '%{1}%' OR " -f $($Column.ColumnName), $Filter
76 | }
77 |
78 | # Remove the last 'OR'
79 | $RowFilter = $RowFilter -replace " OR $", ''
80 | }
81 | IF ($PSBoundParameters['ColumnName'])
82 | {
83 | $RowFilter = "$ColumnName LIKE '%$Filter%'"
84 | }
85 |
86 | IF ($PSCmdlet.ShouldProcess($DataGridView, "Filter the content on $filter"))
87 | {
88 | $DataTable.defaultview.rowfilter = $RowFilter
89 | Import-WFDataGridViewItem -DataGridView $DataGridView -Item $DataTable
90 | }
91 | }
92 | END { Remove-Variable -Name $RowFilter -ErrorAction 'SilentlyContinue' | Out-Null }
93 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Add-WFListViewItem.ps1:
--------------------------------------------------------------------------------
1 | function Add-WFListViewItem
2 | {
3 | <#
4 | .SYNOPSIS
5 | Adds the item(s) to the ListView and stores the object in the ListViewItem's Tag property.
6 |
7 | .DESCRIPTION
8 | Adds the item(s) to the ListView and stores the object in the ListViewItem's Tag property.
9 |
10 | .PARAMETER ListView
11 | The ListView control to add the items to.
12 |
13 | .PARAMETER Items
14 | The object or objects you wish to load into the ListView's Items collection.
15 |
16 | .PARAMETER ImageIndex
17 | The index of a predefined image in the ListView's ImageList.
18 |
19 | .PARAMETER SubItems
20 | List of strings to add as Subitems.
21 |
22 | .PARAMETER Group
23 | The group to place the item(s) in.
24 |
25 | .PARAMETER Clear
26 | This switch clears the ListView's Items before adding the new item(s).
27 |
28 | .EXAMPLE
29 | Add-WFListViewItem -ListView $listview1 -Items "Test" -Group $listview1.Groups[0] -ImageIndex 0 -SubItems "Installed"
30 |
31 | .NOTES
32 | SAPIEN Technologies, Inc.
33 | http://www.sapien.com/
34 | #>
35 |
36 | Param (
37 | [ValidateNotNull()]
38 | [Parameter(Mandatory = $true)]
39 | [System.Windows.Forms.ListView]$ListView,
40 |
41 | [ValidateNotNull()]
42 | [Parameter(Mandatory = $true)]
43 | $Items,
44 |
45 | [int]$ImageIndex = -1,
46 |
47 | [string[]]$SubItems,
48 |
49 | $Group,
50 |
51 | [switch]$Clear
52 | )
53 | BEGIN
54 | {
55 | Add-Type -AssemblyName System.Windows.Forms
56 | }
57 | PROCESS
58 | {
59 |
60 | if ($Clear)
61 | {
62 | $ListView.Items.Clear();
63 | }
64 |
65 | $lvGroup = $null
66 | if ($Group -is [System.Windows.Forms.ListViewGroup])
67 | {
68 | $lvGroup = $Group
69 | }
70 | elseif ($Group -is [string])
71 | {
72 | #$lvGroup = $ListView.Group[$Group] # Case sensitive
73 | foreach ($groupItem in $ListView.Groups)
74 | {
75 | if ($groupItem.Name -eq $Group)
76 | {
77 | $lvGroup = $groupItem
78 | break
79 | }
80 | }
81 |
82 | if (-not $lvGroup)
83 | {
84 | $lvGroup = $ListView.Groups.Add($Group, $Group)
85 | }
86 | }
87 |
88 | if ($Items -is [Array])
89 | {
90 | $ListView.BeginUpdate()
91 | foreach ($item in $Items)
92 | {
93 | $listitem = $ListView.Items.Add($item.ToString(), $ImageIndex)
94 | #Store the object in the Tag
95 | $listitem.Tag = $item
96 |
97 | if ($SubItems)
98 | {
99 | $listitem.SubItems.AddRange($SubItems)
100 | }
101 |
102 | if ($lvGroup)
103 | {
104 | $listitem.Group = $lvGroup
105 | }
106 | }
107 | $ListView.EndUpdate()
108 | }
109 | else
110 | {
111 | #Add a new item to the ListView
112 | $listitem = $ListView.Items.Add($Items.ToString(), $ImageIndex)
113 | #Store the object in the Tag
114 | $listitem.Tag = $Items
115 |
116 | if ($SubItems)
117 | {
118 | $listitem.SubItems.AddRange($SubItems)
119 | }
120 |
121 | if ($lvGroup)
122 | {
123 | $listitem.Group = $lvGroup
124 | }
125 | }
126 | } #PROCESS
127 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Remove-WFListBoxItem.ps1:
--------------------------------------------------------------------------------
1 | function Remove-WFListBoxItem
2 | {
3 | <#
4 | .SYNOPSIS
5 | Function to remove item(s) from a ListBox Control
6 |
7 | .DESCRIPTION
8 | Function to remove item(s) from a ListBox Control
9 |
10 | .PARAMETER ListBox
11 | Specifies the ListBox control
12 |
13 | .PARAMETER All
14 | Specifies that you want to remove all the item
15 |
16 | .PARAMETER Pattern
17 | Specifies that you want to remove items with a specific pattern
18 |
19 | .PARAMETER SelectedItems
20 | Specifies that you want to remove the selected items
21 |
22 | .NOTES
23 | Author: Francois-Xavier Cat
24 | Twitter:@LazyWinAdm
25 | www.lazywinadmin.com
26 | github.com/lazywinadmin
27 | #>
28 |
29 | [CmdletBinding(DefaultParameterSetName = 'All',
30 | SupportsShouldProcess = $true)]
31 | param
32 | (
33 | [Parameter(ParameterSetName = 'All',
34 | Mandatory = $true)]
35 | [Parameter(ParameterSetName = 'Pattern',
36 | Mandatory = $true)]
37 | [Parameter(ParameterSetName = 'Selected',
38 | Mandatory = $true)]
39 | [ValidateNotNull()]
40 | [System.Windows.Forms.ListBox]$ListBox,
41 |
42 | [Parameter(ParameterSetName = 'All',
43 | Mandatory = $true)]
44 | [Switch]$All,
45 |
46 | [Parameter(ParameterSetName = 'Pattern',
47 | Mandatory = $true)]
48 | [String[]]$Pattern,
49 |
50 | [Parameter(ParameterSetName = 'Selected',
51 | Mandatory = $true)]
52 | [Switch]$SelectedItems
53 | )
54 |
55 | #Requires -Version 3
56 |
57 | BEGIN
58 | {
59 | Add-Type -AssemblyName System.Windows.Forms
60 |
61 | Write-Verbose -Message "BEGIN - ListBox - Begining to update"
62 | $ListBox.BeginUpdate()
63 | }
64 | PROCESS
65 | {
66 | IF ($PSBoundParameters['All'])
67 | {
68 | Write-Verbose -Message "PROCESS - ListBox - Clear all item(s)"
69 | IF ($PSCmdlet.ShouldProcess($ListBox,"Clear all item(s)"))
70 | {
71 | $ListBox.Items.Clear()
72 | }
73 | }
74 |
75 | IF ($PSBoundParameters['Pattern'])
76 | {
77 | Write-Verbose -Message "PROCESS - ListBox - Clear item(s) with specific pattern"
78 | foreach ($item in $ListBox.Items)
79 | {
80 | foreach ($Text in $Pattern)
81 | {
82 | IF ($item -like $Text)
83 | {
84 | IF ($PSCmdlet.ShouldProcess($ListBox, "Remove Item with pattern $pattern : $item"))
85 | {
86 | Write-Verbose -Message "PROCESS - ListBox - Removing item: $item"
87 | $ListBox.Items.Remove($item)
88 | }
89 | }
90 | }
91 | }
92 | }
93 | IF ($PSBoundParameters['SelectedItems'])
94 | {
95 | while ($ListBox.SelectedItems -gt 0)
96 | {
97 | foreach ($item in $ListBox.SelectedItems)
98 | {
99 | IF ($PSCmdlet.ShouldProcess($ListBox, "Remove selected Item $item"))
100 | {
101 | Write-Verbose -Message "PROCESS - ListBox - Removing selected item: $item"
102 | $ListBox.Items.Remove($item)
103 | }
104 | }
105 | }
106 | }
107 |
108 | }
109 | END
110 | {
111 | Write-Verbose -Message "END - ListBox - End of update"
112 | $ListBox.EndUpdate()
113 | }
114 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Add-WFRichTextBoxText.ps1:
--------------------------------------------------------------------------------
1 | function Add-WFRichTextBoxText
2 | {
3 | <#
4 | .SYNOPSIS
5 | This function Append text to a RichTextBox
6 | .DESCRIPTION
7 | This function Append text to a RichTextBox
8 | .PARAMETER Richtextbox
9 | Specify the RichTextBox Control to use
10 | .PARAMETER Message
11 | Specify the Message to show
12 | .PARAMETER MessageColor
13 | Specify the Color to use for the Message. Default is DarkGreen.
14 | .PARAMETER Source
15 | Specify the Source type of the Message
16 | .PARAMETER SourceColor
17 | Specify the Source type color to use. Default is Gray.
18 | .PARAMETER ItemName
19 | Specify a name that will help the user to identify the item
20 | .PARAMETER ItemColor
21 | Specify a color for the ItemName. Default is Blue.
22 | .EXAMPLE
23 | Add-WFRichTextBoxText -RichTextBox $RichTextBox1 -Message "Hello World"
24 | .EXAMPLE
25 | Add-WFRichTextBoxText -RichTextBox $RichTextBox1 -Message "Some info" -Source "Get-TSSession" -ComputerName "RemoteServe01"
26 | .NOTES
27 | Francois-Xavier Cat
28 | @lazywinadm
29 | www.lazywinadmin.com
30 | github.com/lazywinadmin
31 |
32 | VERSION HISTORY
33 | 1.0 2014/04/16 Initial Version
34 | 2.0 2015/02/13 Small update of parameter/Comment Based help
35 | #>
36 | [CmdletBinding()]
37 | PARAM (
38 | [Parameter(Mandatory = $true)]
39 | [System.Windows.Forms.Richtextbox]$RichTextBox,
40 |
41 | [Alias("ComputerName", "UserName")]
42 | [string]$ItemName,
43 |
44 | [Alias("ComputerNameColor", "UserNameColor")]
45 | [System.Drawing.Color]$ItemColor = "Blue",
46 |
47 | [Parameter(Mandatory = $true)]
48 | [string]$Message,
49 |
50 | [System.Drawing.Color]$MessageColor = "DarkGreen",
51 |
52 | [string]$Source,
53 |
54 | [System.Drawing.Color]$SourceColor = "Gray",
55 |
56 | [switch]$IncludeDateTime,
57 |
58 | [System.Drawing.Color]$DateTimeColor = "Black"
59 |
60 | )
61 |
62 | BEGIN
63 | {
64 | Add-Type -AssemblyName System.Windows.Forms
65 |
66 | # Get current date/time. Example: 2015-12-20 18:25:03
67 | $SortableTime = Get-Date -Format "yyyy-MM-dd HH:mm:ss"
68 | }
69 | PROCESS
70 | {
71 | TRY
72 | {
73 | IF ($PSBoundParameters['IncludeDateTime'])
74 | {
75 | # Add the Date/Time
76 | $RichTextBox.SelectionColor = $DateTimeColor
77 | $RichTextBox.AppendText("[$SortableTime] ")
78 | }
79 |
80 | IF ($PSBoundParameters['ItemName'])
81 | {
82 | # Add ComputerName
83 | $RichTextBox.SelectionColor = $ItemColor
84 | $RichTextBox.AppendText(("$ItemName ").ToUpper())
85 | }
86 |
87 | IF ($PSBoundParameters['Source'])
88 | {
89 | # Add Source
90 | $RichTextBox.SelectionColor = $SourceColor
91 | $RichTextBox.AppendText("$Source ")
92 | }
93 |
94 | # Add Message with a return character
95 | $RichTextBox.SelectionColor = $MessageColor
96 | $RichTextBox.AppendText("$Message`r")
97 | Write-Verbose -Message "$SortableTime $Message"
98 | }
99 | CATCH
100 | {
101 | Write-Error -Message "PROCESS - Error while writing inside the RichTextBox"
102 | Write-Error -Message "PROCESS - $($Error[0].Exception.message)"
103 | }
104 | }
105 | END
106 | {
107 | # Refresh RichTextBox
108 | $RichTextBox.Refresh()
109 |
110 | # Scroll to the end of the RichTextBox
111 | $RichTextBox.ScrollToCaret()
112 | }
113 | }
--------------------------------------------------------------------------------
/Archives/Sort-ListViewColumn.ps1:
--------------------------------------------------------------------------------
1 | function Sort-ListViewColumn
2 | {
3 | <#
4 | .SYNOPSIS
5 | Sort the ListView's item using the specified column.
6 |
7 | .DESCRIPTION
8 | Sort the ListView's item using the specified column.
9 | This function uses Add-Type to define a class that sort the items.
10 | The ListView's Tag property is used to keep track of the sorting.
11 |
12 | .PARAMETER ListView
13 | The ListView control to sort.
14 |
15 | .PARAMETER ColumnIndex
16 | The index of the column to use for sorting.
17 |
18 | .PARAMETER SortOrder
19 | The direction to sort the items. If not specified or set to None, it will toggle.
20 |
21 | .EXAMPLE
22 | Sort-ListViewColumn -ListView $listview1 -ColumnIndex 0
23 |
24 | .NOTES
25 | SAPIEN Technologies, Inc.
26 | http://www.sapien.com/
27 |
28 | #>
29 | param (
30 | [ValidateNotNull()]
31 | [Parameter(Mandatory = $true)]
32 | [System.Windows.Forms.ListView]$ListView,
33 | [Parameter(Mandatory = $true)]
34 | [int]$ColumnIndex,
35 | [System.Windows.Forms.SortOrder]$SortOrder = 'None')
36 |
37 | if (($ListView.Items.Count -eq 0) -or ($ColumnIndex -lt 0) -or ($ColumnIndex -ge $ListView.Columns.Count))
38 | {
39 | return;
40 | }
41 |
42 | #region Define ListViewItemComparer
43 | try
44 | {
45 | $local:type = [ListViewItemComparer]
46 | }
47 | catch
48 | {
49 | Add-Type -ReferencedAssemblies ('System.Windows.Forms') -TypeDefinition @"
50 | using System;
51 | using System.Windows.Forms;
52 | using System.Collections;
53 | public class ListViewItemComparer : IComparer
54 | {
55 | public int column;
56 | public SortOrder sortOrder;
57 | public ListViewItemComparer()
58 | {
59 | column = 0;
60 | sortOrder = SortOrder.Ascending;
61 | }
62 | public ListViewItemComparer(int column, SortOrder sort)
63 | {
64 | this.column = column;
65 | sortOrder = sort;
66 | }
67 | public int Compare(object x, object y)
68 | {
69 | if(column >= ((ListViewItem)x).SubItems.Count)
70 | return sortOrder == SortOrder.Ascending ? -1 : 1;
71 |
72 | if(column >= ((ListViewItem)y).SubItems.Count)
73 | return sortOrder == SortOrder.Ascending ? 1 : -1;
74 |
75 | if(sortOrder == SortOrder.Ascending)
76 | return String.Compare(((ListViewItem)x).SubItems[column].Text, ((ListViewItem)y).SubItems[column].Text);
77 | else
78 | return String.Compare(((ListViewItem)y).SubItems[column].Text, ((ListViewItem)x).SubItems[column].Text);
79 | }
80 | }
81 | "@ | Out-Null
82 | }
83 | #endregion
84 |
85 | if ($ListView.Tag -is [ListViewItemComparer])
86 | {
87 | #Toggle the Sort Order
88 | if ($SortOrder -eq [System.Windows.Forms.SortOrder]::None)
89 | {
90 | if ($ListView.Tag.column -eq $ColumnIndex -and $ListView.Tag.sortOrder -eq 'Ascending')
91 | {
92 | $ListView.Tag.sortOrder = 'Descending'
93 | }
94 | else
95 | {
96 | $ListView.Tag.sortOrder = 'Ascending'
97 | }
98 | }
99 | else
100 | {
101 | $ListView.Tag.sortOrder = $SortOrder
102 | }
103 |
104 | $ListView.Tag.column = $ColumnIndex
105 | $ListView.Sort()#Sort the items
106 | }
107 | else
108 | {
109 | if ($Sort -eq [System.Windows.Forms.SortOrder]::None)
110 | {
111 | $Sort = [System.Windows.Forms.SortOrder]::Ascending
112 | }
113 |
114 | #Set to Tag because for some reason in PowerShell ListViewItemSorter prop returns null
115 | $ListView.Tag = New-Object ListViewItemComparer ($ColumnIndex, $SortOrder)
116 | $ListView.ListViewItemSorter = $ListView.Tag #Automatically sorts
117 | }
118 | }
119 |
--------------------------------------------------------------------------------
/WinFormPS/Public/Set-WFListViewColumn.ps1:
--------------------------------------------------------------------------------
1 | function Set-WFListViewColumn
2 | {
3 | <#
4 | .SYNOPSIS
5 | Sort the ListView's item using the specified column.
6 |
7 | .DESCRIPTION
8 | Sort the ListView's item using the specified column.
9 | This function uses Add-Type to define a class that sort the items.
10 | The ListView's Tag property is used to keep track of the sorting.
11 |
12 | .PARAMETER ListView
13 | The ListView control to sort.
14 |
15 | .PARAMETER ColumnIndex
16 | The index of the column to use for sorting.
17 |
18 | .PARAMETER SortOrder
19 | The direction to sort the items. If not specified or set to None, it will toggle.
20 |
21 | .EXAMPLE
22 | Set-WFListViewColumn -ListView $listview1 -ColumnIndex 0
23 |
24 | .NOTES
25 | SAPIEN Technologies, Inc.
26 | http://www.sapien.com/
27 | #>
28 | param (
29 | [ValidateNotNull()]
30 | [Parameter(Mandatory = $true)]
31 | [System.Windows.Forms.ListView]$ListView,
32 |
33 | [Parameter(Mandatory = $true)]
34 | [int]$ColumnIndex,
35 |
36 | [System.Windows.Forms.SortOrder]$SortOrder = 'None')
37 |
38 | if (($ListView.Items.Count -eq 0) -or ($ColumnIndex -lt 0) -or ($ColumnIndex -ge $ListView.Columns.Count))
39 | {
40 | return;
41 | }
42 |
43 | #region Define ListViewItemComparer
44 | try
45 | {
46 | #$local:type = [ListViewItemComparer]
47 | }
48 | catch
49 | {
50 | Add-Type -ReferencedAssemblies ('System.Windows.Forms') -TypeDefinition @"
51 | using System;
52 | using System.Windows.Forms;
53 | using System.Collections;
54 | public class ListViewItemComparer : IComparer
55 | {
56 | public int column;
57 | public SortOrder sortOrder;
58 | public ListViewItemComparer()
59 | {
60 | column = 0;
61 | sortOrder = SortOrder.Ascending;
62 | }
63 | public ListViewItemComparer(int column, SortOrder sort)
64 | {
65 | this.column = column;
66 | sortOrder = sort;
67 | }
68 | public int Compare(object x, object y)
69 | {
70 | if(column >= ((ListViewItem)x).SubItems.Count)
71 | return sortOrder == SortOrder.Ascending ? -1 : 1;
72 |
73 | if(column >= ((ListViewItem)y).SubItems.Count)
74 | return sortOrder == SortOrder.Ascending ? 1 : -1;
75 |
76 | if(sortOrder == SortOrder.Ascending)
77 | return String.Compare(((ListViewItem)x).SubItems[column].Text, ((ListViewItem)y).SubItems[column].Text);
78 | else
79 | return String.Compare(((ListViewItem)y).SubItems[column].Text, ((ListViewItem)x).SubItems[column].Text);
80 | }
81 | }
82 | "@ | Out-Null
83 | }
84 | #endregion
85 |
86 | if ($ListView.Tag -is [ListViewItemComparer])
87 | {
88 | #Toggle the Sort Order
89 | if ($SortOrder -eq [System.Windows.Forms.SortOrder]::None)
90 | {
91 | if ($ListView.Tag.column -eq $ColumnIndex -and $ListView.Tag.sortOrder -eq 'Ascending')
92 | {
93 | $ListView.Tag.sortOrder = 'Descending'
94 | }
95 | else
96 | {
97 | $ListView.Tag.sortOrder = 'Ascending'
98 | }
99 | }
100 | else
101 | {
102 | $ListView.Tag.sortOrder = $SortOrder
103 | }
104 |
105 | $ListView.Tag.column = $ColumnIndex
106 | $ListView.Sort() #Sort the items
107 | }
108 | else
109 | {
110 | if ($SortOrder -eq [System.Windows.Forms.SortOrder]::None)
111 | {
112 | $SortOrder = [System.Windows.Forms.SortOrder]::Ascending
113 | }
114 |
115 | #Set to Tag because for some reason in PowerShell ListViewItemSorter prop returns null
116 | $ListView.Tag = New-Object ListViewItemComparer ($ColumnIndex, $SortOrder)
117 | $ListView.ListViewItemSorter = $ListView.Tag #Automatically sorts
118 | }
119 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Find-WFDataGridViewValue.ps1:
--------------------------------------------------------------------------------
1 | function Find-WFDataGridViewValue
2 | {
3 | <#
4 | .SYNOPSIS
5 | The Find-WFDataGridViewValue function helps you to find a specific value and select the cell, row or to set a fore and back color.
6 |
7 | .DESCRIPTION
8 | The Find-WFDataGridViewValue function helps you to find a specific value and select the cell, row or to set a fore and back color.
9 |
10 | .PARAMETER DataGridView
11 | Specifies the DataGridView Control to use
12 |
13 | .PARAMETER RowBackColor
14 | Specifies the back color of the row to use
15 |
16 | .PARAMETER RowForeColor
17 | Specifies the fore color of the row to use
18 |
19 | .PARAMETER SelectCell
20 | Specifies to select only the cell when the value is found
21 |
22 | .PARAMETER SelectRow
23 | Specifies to select the entire row when the value is found
24 |
25 | .PARAMETER Value
26 | Specifies the value to search
27 |
28 | .EXAMPLE
29 | PS C:\> Find-WFDataGridViewValue -DataGridView $datagridview1 -Value $textbox1.Text
30 |
31 | This will find the value and select the cell(s)
32 |
33 | .EXAMPLE
34 | PS C:\> Find-WFDataGridViewValue -DataGridView $datagridview1 -Value $textbox1.Text -RowForeColor 'Red' -RowBackColor 'Black'
35 |
36 | This will find the value and color the fore and back of the row
37 | .EXAMPLE
38 | PS C:\> Find-WFDataGridViewValue -DataGridView $datagridview1 -Value $textbox1.Text -SelectRow
39 |
40 | This will find the value and select the entire row
41 |
42 | .NOTES
43 | Francois-Xavier Cat
44 | @lazywinadm
45 | www.lazywinadmin.com
46 | github.com/lazywinadmin
47 | #>
48 | [CmdletBinding(DefaultParameterSetName = "Cell")]
49 | PARAM (
50 | [Parameter(Mandatory = $true)]
51 | [System.Windows.Forms.DataGridView]$DataGridView,
52 |
53 | [Parameter(Mandatory = $true)]
54 | $Value,
55 |
56 | [Parameter(ParameterSetName = "Cell")]
57 | [Switch]$SelectCell,
58 |
59 | [Parameter(ParameterSetName = "Row")]
60 | [Switch]$SelectRow,
61 |
62 | #[Parameter(ParameterSetName = "Column")]
63 |
64 |
65 | #[Switch]$SelectColumn,
66 |
67 |
68 | [Parameter(ParameterSetName = "RowColor")]
69 | [system.Drawing.Color]$RowForeColor,
70 |
71 | [Parameter(ParameterSetName = "RowColor")]
72 | [system.Drawing.Color]$RowBackColor
73 | )
74 | BEGIN
75 | {
76 | Add-Type -AssemblyName System.Windows.Forms
77 | }
78 | PROCESS
79 | {
80 | FOR ([int]$i = 0; $i -lt $DataGridView.RowCount; $i++)
81 | {
82 | FOR ([int]$j = 0; $j -lt $DataGridView.ColumnCount; $j++)
83 | {
84 | $CurrentCell = $dataGridView.Rows[$i].Cells[$j]
85 |
86 | if ((-not $CurrentCell.Value.Equals([DBNull]::Value)) -and ($CurrentCell.Value.ToString() -like "*$Value*"))
87 | {
88 | # Row Selection
89 | IF ($PSBoundParameters['SelectRow'])
90 | {
91 | $dataGridView.Rows[$i].Selected = $true
92 | }
93 |
94 | <#
95 | # Column Selection
96 | IF ($PSBoundParameters['SelectColumn'])
97 | {
98 | #$DataGridView.Columns[$($CurrentCell.ColumnIndex)].Selected = $true
99 | #$DataGridView.Columns[$j].Selected = $true
100 | #$CurrentCell.DataGridView.Columns[$j].Selected = $true
101 | }
102 | #>
103 |
104 | # Row Fore Color
105 | IF ($PSBoundParameters['RowForeColor'])
106 | {
107 | $dataGridView.Rows[$i].DefaultCellStyle.ForeColor = $RowForeColor
108 | }
109 | # Row Back Color
110 | IF ($PSBoundParameters['RowBackColor'])
111 | {
112 | $dataGridView.Rows[$i].DefaultCellStyle.BackColor = $RowBackColor
113 | }
114 |
115 | # Cell Selection
116 | ELSEIF (-not ($PSBoundParameters['SelectRow']) -and -not ($PSBoundParameters['SelectColumn']))
117 | {
118 | $CurrentCell.Selected = $true
119 | }
120 | } #IF not empty and contains value
121 | } #For Each column
122 | } #For Each Row
123 | } #PROCESS
124 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/ConvertTo-WFDataTable.ps1:
--------------------------------------------------------------------------------
1 | function ConvertTo-WFDataTable
2 | {
3 | <#
4 | .SYNOPSIS
5 | Converts objects into a DataTable.
6 |
7 | .DESCRIPTION
8 | Converts objects into a DataTable, which are used for DataBinding.
9 |
10 | .PARAMETER InputObject
11 | The input to convert into a DataTable.
12 |
13 | .PARAMETER Table
14 | The DataTable you wish to load the input into.
15 |
16 | .PARAMETER RetainColumns
17 | This switch tells the function to keep the DataTable's existing columns.
18 |
19 | .PARAMETER FilterWMIProperties
20 | This switch removes WMI properties that start with an underline.
21 |
22 | .EXAMPLE
23 | $DataTable = ConvertTo-WFDataTable -InputObject (Get-Process)
24 |
25 | .NOTES
26 | SAPIEN Technologies, Inc.
27 | http://www.sapien.com/
28 |
29 | VERSION HISTORY
30 | 1.0 ????/??/?? From Sapien.com Version
31 | 2.0 2014/12/03 Francois-Xavier Cat - In the rows workk, I added a
32 | small piece of code to handle the $null value with [DBNull]::Value
33 | 2.1 2016/03/23 Some improvements added
34 |
35 | #>
36 | [CmdletBinding()]
37 | [OutputType([System.Data.DataTable])]
38 | param (
39 | [ValidateNotNull()]
40 | $InputObject,
41 |
42 | [ValidateNotNull()]
43 | [System.Data.DataTable]$Table,
44 |
45 | [switch]$RetainColumns,
46 |
47 | [switch]$FilterWMIProperties
48 | )
49 |
50 | if ($Table -eq $null)
51 | {
52 | $Table = New-Object System.Data.DataTable
53 | }
54 |
55 | if ($InputObject -is [System.Data.DataTable])
56 | {
57 | $Table = $InputObject
58 | }
59 | else
60 | {
61 | if (-not $RetainColumns -or $Table.Columns.Count -eq 0)
62 | {
63 | #Clear out the Table Contents
64 | $Table.Clear()
65 |
66 | if (-not$InputObject) { return } #Empty Data
67 |
68 | $object = $null
69 |
70 | #find the first non null value
71 | foreach ($item in $InputObject)
72 | {
73 | if ($item)
74 | {
75 | $object = $item
76 | break
77 | }
78 | }
79 |
80 | if (-not$object) { return } #All null then empty
81 |
82 | #COLUMN
83 | #Get all the properties in order to create the columns
84 | foreach ($prop in $object.PSObject.Get_Properties())
85 | {
86 | if (-not $FilterWMIProperties -or -not $prop.Name.StartsWith('__')) #filter out WMI properties
87 |
88 | {
89 | #Get the type from the Definition string
90 | $type = $null
91 |
92 | if ($prop.Value)
93 | {
94 | try { $type = $prop.Value.GetType() }
95 | catch { Write-Verbose -Message "Can't find type of $prop" }
96 | }
97 |
98 | if ($type) # -and [System.Type]::GetTypeCode($type) -ne 'Object')
99 |
100 | {
101 | Write-Verbose -Message "Creating Column: $($Prop.name) (Type: $type)"
102 | [void]$table.Columns.Add($prop.Name, $type)
103 | }
104 | else #Type info not found
105 |
106 | {
107 | #if ($prop.name -eq "" -or $prop.name -eq $null) { [void]$table.Columns.Add([DBNull]::Value) }
108 | [void]$table.Columns.Add($prop.Name)
109 | }
110 | }
111 | }
112 |
113 | if ($object -is [System.Data.DataRow])
114 | {
115 | foreach ($item in $InputObject)
116 | {
117 | $Table.Rows.Add($item)
118 | }
119 | #return @(, $Table)
120 | return $Table
121 | }
122 | }
123 | else
124 | {
125 | $Table.Rows.Clear()
126 | }
127 |
128 | #Rows Work
129 | foreach ($item in $InputObject)
130 | {
131 | # Create a new row object
132 | $row = $table.NewRow()
133 |
134 | if ($item)
135 | {
136 | foreach ($prop in $item.PSObject.Get_Properties())
137 | {
138 | #Find the appropriate column to put the value
139 | if ($table.Columns.Contains($prop.Name))
140 | {
141 | if (-not$prop.value) { $prop.value = [DBNull]::Value }
142 | $row.Item($prop.Name) = $prop.Value
143 | }
144 | }
145 | }
146 | [void]$table.Rows.Add($row)
147 | }
148 | }
149 |
150 | #return @(, $Table)
151 | return $Table
152 | }
--------------------------------------------------------------------------------
/WinFormPS/WinFormPS.psd1:
--------------------------------------------------------------------------------
1 | #
2 | # Module manifest for module 'WinFormPS'
3 | #
4 | # Generated by: Francois-Xavier Cat
5 | #
6 | # Generated on: 2016-03-22
7 | #
8 |
9 | @{
10 |
11 | # Script module or binary module file associated with this manifest.
12 | RootModule = 'WinFormPS.psm1'
13 |
14 | # Version number of this module.
15 | ModuleVersion = '1.0.0'
16 |
17 | # ID used to uniquely identify this module
18 | GUID = 'df3d1de7-37bd-4262-9e10-69a72bd0f8f0'
19 |
20 | # Author of this module
21 | Author = 'Francois-Xavier Cat'
22 |
23 | # Company or vendor of this module
24 | CompanyName = 'LazyWinAdmin.com'
25 |
26 | # Copyright statement for this module
27 | Copyright = '(c) 2016 Francois-Xavier Cat. All rights reserved. Licensed under The MIT License (MIT)'
28 |
29 | # Description of the functionality provided by this module
30 | Description = 'PowerShell module to interact with Windows Forms (WinForms) controls'
31 |
32 | # Minimum version of the Windows PowerShell engine required by this module
33 | PowerShellVersion = '3.0'
34 |
35 | # Name of the Windows PowerShell host required by this module
36 | # PowerShellHostName = ''
37 |
38 | # Minimum version of the Windows PowerShell host required by this module
39 | # PowerShellHostVersion = ''
40 |
41 | # Minimum version of Microsoft .NET Framework required by this module
42 | # DotNetFrameworkVersion = ''
43 |
44 | # Minimum version of the common language runtime (CLR) required by this module
45 | # CLRVersion = ''
46 |
47 | # Processor architecture (None, X86, Amd64) required by this module
48 | # ProcessorArchitecture = ''
49 |
50 | # Modules that must be imported into the global environment prior to importing this module
51 | # RequiredModules = @()
52 |
53 | # Assemblies that must be loaded prior to importing this module
54 | # RequiredAssemblies = @()
55 |
56 | # Script files (.ps1) that are run in the caller's environment prior to importing this module.
57 | # ScriptsToProcess = @()
58 |
59 | # Type files (.ps1xml) to be loaded when importing this module
60 | # TypesToProcess = @()
61 |
62 | # Format files (.ps1xml) to be loaded when importing this module
63 | # FormatsToProcess = @()
64 |
65 | # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
66 | # NestedModules = @()
67 |
68 | # Functions to export from this module
69 | FunctionsToExport = 'Load-DataGridView','Load-ListBox','Refresh-DataGridView','Add-WFDataGridViewColumn','Add-WFDataGridViewRow','Add-WFListViewItem','Add-WFRichTextBoxText','Clear-WFDataGridViewSelection','Clear-WFErrorProvider','Clear-WFListBox','Clear-WFRichTextBox','ConvertTo-WFDataTable','Disable-WFButton','Disable-WFRichTextBox','Disable-WFTabControl','Disable-WFTextBox','Enable-WFButton','Enable-WFRichTextBox','Enable-WFTabControl','Enable-WFTextBox','Find-WFDataGridViewValue','Get-WFCheckedListBoxItem','Get-WFComboboxItem','Get-WFForm','Get-WFListBoxItem','Get-WFListViewItem','Import-WFDataGridView','Import-WFListBox','New-WFBalloonNotification','New-WFInputBox','New-WFMessageBox','New-WFOpenFileDialog','New-WFOpenFolderDialog','New-WFSpeakerBeep','Remove-WFListBoxItem','Reset-WFDataGridViewFormat','Set-WFDataGridView','Set-WFDataGridViewFilter','Set-WFForm','Set-WFListViewColumn','Set-WFRichTextBox','Update-WFDataGridView'
70 |
71 |
72 | # Cmdlets to export from this module
73 | #CmdletsToExport = '*'
74 |
75 | # Variables to export from this module
76 | #VariablesToExport = '*'
77 |
78 | # Aliases to export from this module
79 | #AliasesToExport = '*'
80 |
81 | # DSC resources to export from this module
82 | # DscResourcesToExport = @()
83 |
84 | # List of all modules packaged with this module
85 | # ModuleList = @()
86 |
87 | # List of all files packaged with this module
88 | # FileList = @()
89 |
90 | # Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
91 | PrivateData = @{
92 |
93 | PSData = @{
94 | # Title of the module
95 | Title = 'WinFormPS'
96 |
97 | # Tags applied to this module. These help with module discovery in online galleries.
98 | Tags = @('Winforms', 'GUI', 'WindowsForms')
99 |
100 | # A URL to the license for this module.
101 | LicenseUri = 'https://github.com/lazywinadmin/WinFormPS/blob/master/LICENSE.md'
102 |
103 | # A URL to the main website for this project.
104 | ProjectUri = 'https://github.com/lazywinadmin/WinFormPS'
105 |
106 | # A URL to an icon representing this module.
107 | # IconUri = ''
108 |
109 | # ReleaseNotes of this module
110 | # ReleaseNotes = ''
111 |
112 | } # End of PSData hashtable
113 |
114 | } # End of PrivateData hashtable
115 |
116 | # HelpInfo URI of this module
117 | # HelpInfoURI = ''
118 |
119 | # Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
120 | # DefaultCommandPrefix = ''
121 |
122 | }
123 |
124 |
--------------------------------------------------------------------------------
/Archives/WinFormPS_InDevelopment.ps1:
--------------------------------------------------------------------------------
1 | function Get-DataGridViewItem
2 | {
3 | <#
4 | Add Count
5 | Coordinate of the item (ROW index/Columnindex).value
6 | #>
7 | [CmdletBinding(DefaultParameterSetName = "CellAddress")]
8 | PARAM (
9 | [Parameter(Mandatory = $true)]
10 | [System.Windows.Forms.DataGridView]$DataGridView,
11 |
12 | [Parameter(Mandatory = $true, ParameterSetName = "SelectedCell")]
13 | [Switch]$SelectedCell,
14 |
15 | [Parameter(Mandatory = $true, ParameterSetName = "SelectedRowIndex")]
16 | [Switch]$SelectedRowIndex,
17 |
18 | [Parameter(Mandatory = $true, ParameterSetName = "SelectedColumnIndex")]
19 | [Switch]$SelectedColumnIndex,
20 |
21 | [Parameter(Mandatory = $true, ParameterSetName = "SelectedRow")]
22 | [Switch]$SelectedRow,
23 |
24 | [Parameter(ParameterSetName = "SelectedRow")]
25 | [int]$ColumnNumber,
26 |
27 | [Parameter(ParameterSetName = "SelectedRow")]
28 | [String]$ColumnName,
29 |
30 | [Parameter(ParameterSetName = "SelectedRow")]
31 | [switch]$AllColumns
32 | )
33 | PROCESS
34 | {
35 | IF ($PSBoundParameters['SelectedCell'])
36 | {
37 | foreach ($SelectedCell in $datagridview1.SelectedCells)
38 | {
39 | New-Object -TypeName PSObject -Property @{
40 | RowIndex = $SelectedCell.RowIndex
41 | ColumnIndex = $SelectedCell.ColumnIndex
42 | }
43 | }
44 | }
45 | IF ($PSBoundParameters['SelectedRowIndex'])
46 | {
47 | foreach ($SelectedCell in $datagridview1.SelectedCells)
48 | {
49 | $SelectedCell.RowIndex
50 | }
51 | }
52 | IF ($PSBoundParameters['SelectedColumnIndex'])
53 | {
54 | foreach ($SelectedCell in $datagridview1.SelectedCells)
55 | {
56 | $SelectedCell.ColumnIndex
57 | }
58 | }
59 | IF ($PSBoundParameters['SelectedRow'])
60 | {
61 |
62 |
63 | #[System.Windows.Forms.DataGridViewRow]
64 | #foreach ($SelectedRow in
65 |
66 | if (-not ($PSboundparameters['All']))
67 | {
68 | foreach ($SelectedRow in $datagridview.SelectedRows)
69 | {
70 | IF ($PSboundparameters['ColumnNumber'])
71 | {
72 |
73 | }
74 | IF ($PSboundparameters['ColumnName'])
75 | {
76 | # Get the Selected row
77 | $SelectedRow.indexSelectedRows
78 | # Get the value for the $ColumnName of this row
79 | $DataGridView[$ColumnName][$d]
80 | }
81 | ELSE
82 | {
83 | $SelectedRow.value
84 | }
85 | }#foreach ($SelectedRow in $datagridview.SelectedCells)
86 | }#if (-not ($PSboundparameters['All'])
87 | if ($PSboundparameters['All'])
88 | {
89 | <#
90 | $SelectedRowCount = $DataGridView.Rows.GetRowCount('Selected')
91 | #$DisplayedRowCount = $DataGridView.Rows.GetRowCount('Displayed')
92 | if ($SelectedRowCount -gt 0)
93 | {
94 | IF ($PSboundparameters['ColumnNumber'])
95 | {
96 | for ([int]$i = 0, $i -gt $SelectedRowCount; $i++) { }
97 | $SelectedRow
98 | $datagridview1
99 |
100 | }
101 | if (-not ($PSboundparameters['ColumnNumber']) -and -not ($psboundparameter['AllColumns']))
102 | {
103 | $datagridview.SelectedRows[]
104 | }
105 | }
106 | #>
107 |
108 | }#if ($PSboundparameters['All'])
109 | }#IF ($PSBoundParameters['SelectedRow'])
110 | }#PROCESS
111 | }
112 |
113 | function Get-DataGridViewItemCount
114 | {
115 | <#
116 | .SYNOPSIS
117 | This function will gather the count of Item
118 | .EXAMPLE
119 | Disable-TabControl -TabControl $TabControl
120 | .NOTES
121 | Francois-Xavier Cat
122 | @lazywinadm
123 | www.lazywinadmin.com
124 | #>
125 | PARAM (
126 | [Parameter(Mandatory = $true)]
127 | [System.Windows.Forms.DataGridView]$DataGridView,
128 |
129 | [Parameter(Mandatory = $true)]
130 | [ValidateSet("Displayed", "Frozen", "None", "ReadOnly", "Resizable", "ResizableSet", "Selected", "Visible")]
131 | [System.Windows.Forms.DataGridViewElementStates]$Type
132 | )
133 | PROCESS
134 | {
135 | $SelectedRowCount = $DataGridView.Rows.GetRowCount($Type)
136 | }
137 | }
138 |
139 | function Set-DataGridViewColumn
140 | {
141 | [CmdletBinding()]
142 | PARAM (
143 | [ValidateNotNull()]
144 | [Parameter(Mandatory = $true)]
145 | [System.Windows.Forms.DataGridView]$DataGridView,
146 |
147 | [ValidateRange(1, 65535)]
148 | [Parameter(Mandatory = $true)]
149 | [int]$NumberOfColumn
150 | )
151 | $DataGridView.ColumnCount = $NumberOfColumn
152 | }
153 |
154 | function Set-TextBox
155 | {
156 | [CmdletBinding()]
157 | PARAM (
158 | [System.Windows.Forms.TextBox]$TextBox,
159 | [System.Drawing.Color]$BackColor
160 | )
161 | BEGIN { }
162 | PROCESS
163 | {
164 | TRY
165 | {
166 | $TextBox.BackColor = $BackColor
167 | }
168 | CATCH { }
169 | }
170 | }
171 |
172 | function Reset-TextBox
173 | {
174 | [CmdletBinding()]
175 | PARAM (
176 | [System.Windows.Forms.TextBox]$TextBox,
177 | [System.Drawing.Color]$BackColor = "White",
178 | [System.Drawing.Color]$ForeColor = "Black"
179 | )
180 | BEGIN { }
181 | PROCESS
182 | {
183 | TRY
184 | {
185 | $TextBox.Text = ""
186 | $TextBox.BackColor = $BackColor
187 | $TextBox.ForeColor = $ForeColor
188 | }
189 | CATCH { }
190 | }
191 | }
--------------------------------------------------------------------------------
/WinFormPS/Public/Set-WFDataGridView.ps1:
--------------------------------------------------------------------------------
1 | function Set-WFDataGridView
2 | {
3 | <#
4 | .SYNOPSIS
5 | This function helps you edit the datagridview control
6 |
7 | .DESCRIPTION
8 | This function helps you edit the datagridview control
9 |
10 | .PARAMETER DataGridView
11 | Specifies the DataGridView Control
12 |
13 | .PARAMETER AlternativeRowColor
14 | Specifies the color of the alternative row color
15 |
16 | .PARAMETER DefaultRowColor
17 | Specifies the color of the default row color
18 |
19 | .PARAMETER ForeColor
20 | Specifies the color of the text
21 |
22 | .PARAMETER BackColor
23 | Specifies the background color
24 |
25 | .PARAMETER ProperFormat
26 | Set the datagirdview to the proper format
27 |
28 | .PARAMETER FontFamily
29 | Specifies the the Font family to use
30 |
31 | .PARAMETER FontSize
32 | Specifies the Font size
33 |
34 | .PARAMETER HideRowHeader
35 | Hide the Row Header
36 |
37 | .PARAMETER ShowRowHeader
38 | Show the Row Header
39 |
40 | .PARAMETER HideColumnHeader
41 | Hide the Column Header
42 |
43 | .PARAMETER ShowColumnHeader
44 | Show the Column Header
45 |
46 | .EXAMPLE
47 | Set-WFDataGridView -DataGridView $datagridview1 -ProperFormat -FontFamily $listboxFontFamily.Text -FontSize $listboxFontSize.Text
48 |
49 | .EXAMPLE
50 | Set-WFDataGridView -DataGridView $datagridview1 -AlternativeRowColor -BackColor 'AliceBlue' -ForeColor 'Black'
51 |
52 | .EXAMPLE
53 | Set-WFDataGridView -DataGridView $datagridviewOutput -DefaultRowColor -BackColor 'Beige' -ForeColor 'Brown'
54 |
55 | .EXAMPLE
56 | Set-DataGridViewRowHeader -DataGridView $datagridview1 -HideRowHeader
57 |
58 | This will hide the Row Header
59 |
60 | .EXAMPLE
61 | Set-DataGridViewRowHeader -DataGridView $datagridview1 -ShowRowHeader
62 |
63 | This will show the Row Header
64 |
65 | .EXAMPLE
66 | Set-DataGridViewRowHeader -DataGridView $datagridview1 -HideColumnHeader
67 |
68 | This will hide the Column Header
69 |
70 | .EXAMPLE
71 | Set-DataGridViewRowHeader -DataGridView $datagridview1 -ShowColumnHeader
72 |
73 | This will show the Column Header
74 |
75 | .NOTES
76 | Author: Francois-Xavier Cat
77 | Twitter:@LazyWinAdm
78 | www.lazywinadmin.com
79 | github.com/lazywinadmin
80 | #>
81 |
82 | [CmdletBinding(DefaultParameterSetName = 'ShowRowHeader',
83 | SupportsShouldProcess = $true)]
84 | param
85 | (
86 | [Parameter(Mandatory = $true)]
87 | [ValidateNotNull()]
88 | [System.Windows.Forms.DataGridView]$DataGridView,
89 |
90 | [Parameter(ParameterSetName = 'AlternativeRowColor',
91 | Mandatory = $true)]
92 | [Switch]$AlternativeRowColor,
93 |
94 | [Parameter(ParameterSetName = 'DefaultRowColor')]
95 | [Switch]$DefaultRowColor,
96 |
97 | [Parameter(ParameterSetName = 'AlternativeRowColor',
98 | Mandatory = $true)]
99 | [Parameter(ParameterSetName = 'DefaultRowColor')]
100 | [System.Drawing.Color]$ForeColor,
101 |
102 | [Parameter(ParameterSetName = 'AlternativeRowColor',
103 | Mandatory = $true)]
104 | [Parameter(ParameterSetName = 'DefaultRowColor')]
105 | [System.Drawing.Color]$BackColor,
106 |
107 | [Parameter(ParameterSetName = 'Proper',
108 | Mandatory = $true)]
109 | [Switch]$ProperFormat,
110 |
111 | [Parameter(ParameterSetName = 'Proper')]
112 | [String]$FontFamily = "Consolas",
113 |
114 | [Parameter(ParameterSetName = 'Proper')]
115 | [Int]$FontSize = 10,
116 |
117 | [Parameter(ParameterSetName = 'HideRowHeader')]
118 | [Switch]$HideRowHeader,
119 |
120 | [Parameter(ParameterSetName = 'ShowRowHeader')]
121 | [Switch]$ShowRowHeader,
122 |
123 | [Parameter(ParameterSetName = 'HideColumnHeader')]
124 | [Switch]$HideColumnHeader,
125 |
126 | [Parameter(ParameterSetName = 'ShowColumnHeader')]
127 | [Switch]$ShowColumnHeader
128 |
129 | )
130 |
131 | BEGIN
132 | {
133 | Add-Type -AssemblyName System.Windows.Forms
134 | }
135 | PROCESS
136 | {
137 | if ($psboundparameters['AlternativeRowColor'])
138 | {
139 | IF ($PSCmdlet.ShouldProcess($DataGridView, "Set the Alternative row color. ForeColor: $ForeColor, BackColor: $BackColor"))
140 | {
141 | $DataGridView.AlternatingRowsDefaultCellStyle.ForeColor = $ForeColor
142 | $DataGridView.AlternatingRowsDefaultCellStyle.BackColor = $BackColor
143 | }
144 | }
145 |
146 | if ($psboundparameters['DefaultRowColor'])
147 | {
148 | IF ($PSCmdlet.ShouldProcess($DataGridView, "Set the Default row color. ForeColor: $ForeColor, BackColor: $BackColor"))
149 | {
150 | $DataGridView.RowsDefaultCellStyle.ForeColor = $ForeColor
151 | $DataGridView.RowsDefaultCellStyle.BackColor = $BackColor
152 | }
153 | }
154 |
155 | if ($psboundparameters['ProperFormat'])
156 | {
157 | IF ($PSCmdlet.ShouldProcess($DataGridView, "Set the Border Header Style to 'Raised', Border Style to 'Fixed3D', Selection Mode to 'FullRowSelected', Disable resizable row, Set the font to $FontFamily with a the size $FontSize"))
158 | {
159 | #$Font = New-Object -TypeName System.Drawing.Font -ArgumentList "Segoi UI", 10
160 | $Font = New-Object -TypeName System.Drawing.Font -ArgumentList $FontFamily, $FontSize
161 |
162 | #[System.Drawing.FontStyle]::Bold
163 |
164 | $DataGridView.ColumnHeadersBorderStyle = 'Raised'
165 | $DataGridView.BorderStyle = 'Fixed3D'
166 | $DataGridView.SelectionMode = 'FullRowSelect'
167 | $DataGridView.AllowUserToResizeRows = $false
168 | $datagridview.DefaultCellStyle.font = $Font
169 | }
170 | }
171 |
172 | if ($psboundparameters['HideRowHeader'])
173 | {
174 | IF ($PSCmdlet.ShouldProcess($DataGridView, "Hide the Row Header"))
175 | {
176 | $DataGridView.RowHeadersVisible = $false
177 | }
178 | }
179 | if ($psboundparameters['ShowRowHeader'])
180 | {
181 | IF ($PSCmdlet.ShouldProcess($DataGridView, "Show the Row Header"))
182 | {
183 | $DataGridView.RowHeadersVisible = $true
184 | }
185 | }
186 | if ($psboundparameters['HideColumnHeader'])
187 | {
188 | IF ($PSCmdlet.ShouldProcess($DataGridView, "Hide the Column Header"))
189 | {
190 | $DataGridView.ColumnHeadersVisible = $false
191 | }
192 | }
193 | if ($psboundparameters['ShowColumnHeader'])
194 | {
195 | IF ($PSCmdlet.ShouldProcess($DataGridView, "Show the Column Header"))
196 | {
197 | $DataGridView.ColumnHeadersVisible = $true
198 | }
199 | }
200 | }
201 | }
--------------------------------------------------------------------------------
/Examples/DataGridView/Import-WFDataGridViewItem/Impot-WFDataGridViewItem.Export.ps1:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------
2 | # Source File Information (DO NOT MODIFY)
3 | # Source ID: 4c00885a-f8a9-4e3e-a5d0-04cad8faaa8b
4 | # Source File: Impot-WFDataGridViewItem.psf
5 | #------------------------------------------------------------------------
6 | #region File Recovery Data (DO NOT MODIFY)
7 | <#RecoveryData:
8 | MQwAAB+LCAAAAAAABADVV2Fv2jAQ/T5p/8Hy50AIgWVIIVLLRovWbWgwum+TSQ7q4cTIdqDZr59D
9 | UtoSKAEB0oQUcHJ37969Z0e4P8DnCxDJJ6II0j8k5VEb17H3/h1C7ndBpzQirEsZfCMheL1wzlXl
10 | vpuG3wgajCgsewrC6lxOXLMQnhUZ/wFfIZXMoY0HiUzD72kU8KWsdrkIs6uBtj0y0CjvqVGtpR8D
11 | dWKmYgHtCGIlCDNQPx4z6n+BZMhnELXHjkOafvOD1bIbUPvYwijSrbTxRNfTtdOv/iDlIdSKBUb+
12 | A2WB0Km4wyMlOJMZfd17X/A5CJXkNTqMQqQG9C9gr1GzDGTbNdd8CtqRlE4Ce7vg96YP4VFhb52K
13 | KijLrmxqUKy0f/Iva5xdgUCDTTXYQoNZb419y+A5i8PoFkigm7kFOn1YqfCVB3q0V7Hi6aowgGKd
14 | O+4Tpclgz6obqGGVSMnke9V7iazMI7bjGKjuOCUShmTciwJ4xF69KKSZKVle1+tYKR6dXdHxCuYG
15 | 1ADEgvpwmKjPYrRsA1lF3rvE2IQtrYfT1HLYB6lRRuxsi+p+KuUb+ilhRGVM2EAlDK6JP9Me5wJ7
16 | QxFvzf+80EfP8znkz4pz+L2675qr0P/GO5qqD1Ie6510Ix/jnRz2nN4pvhve8k75hk7qnRx2r3de
17 | L66khFDrDPIpNr+TeKH0uWB0fAKvuOa66iZK5s5LYJx8B+xHTF/LlwESZEmj6TFYNXvSnDgTywqa
18 | NWKT/Vi/QnYZTlRom3KR5KfiUZIdzK7DBVyEXs4q37an57ZeZnvbNV/+RfD+AeWey20xDAAA#>
19 | #endregion
20 |
21 | <#
22 | .NOTES
23 | --------------------------------------------------------------------------------
24 | Code generated by: SAPIEN Technologies, Inc., PowerShell Studio 2016 v5.2.117
25 | Generated on: 2016-03-24 4:26 PM
26 | Generated by:
27 | Organization:
28 | --------------------------------------------------------------------------------
29 | .DESCRIPTION
30 | GUI script generated by PowerShell Studio 2016
31 | #>
32 | #----------------------------------------------
33 | #region Application Functions
34 | #----------------------------------------------
35 |
36 | #endregion Application Functions
37 |
38 | #----------------------------------------------
39 | # Generated Form Function
40 | #----------------------------------------------
41 | function Call-Impot-WFDataGridViewItem_psf {
42 |
43 | #----------------------------------------------
44 | #region Import the Assemblies
45 | #----------------------------------------------
46 | [void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
47 | [void][reflection.assembly]::Load('System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
48 | [void][reflection.assembly]::Load('System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
49 | [void][reflection.assembly]::Load('System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
50 | [void][reflection.assembly]::Load('System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
51 | #endregion Import Assemblies
52 |
53 | #----------------------------------------------
54 | #region Generated Form Objects
55 | #----------------------------------------------
56 | [System.Windows.Forms.Application]::EnableVisualStyles()
57 | $formWinformPSImportDataG = New-Object 'System.Windows.Forms.Form'
58 | $datagridview1 = New-Object 'System.Windows.Forms.DataGridView'
59 | $buttonGetService = New-Object 'System.Windows.Forms.Button'
60 | $buttonGetProcess = New-Object 'System.Windows.Forms.Button'
61 | $InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
62 | #endregion Generated Form Objects
63 |
64 | #----------------------------------------------
65 | # User Generated Script
66 | #----------------------------------------------
67 | function Import-DataGridViewItem
68 | {
69 | <#
70 | .SYNOPSIS
71 | This functions helps you load items into a DataGridView.
72 |
73 | .DESCRIPTION
74 | Use this function to dynamically load items into the DataGridView control.
75 |
76 | .PARAMETER DataGridView
77 | The ComboBox control you want to add items to.
78 |
79 | .PARAMETER Item
80 | The object or objects you wish to load into the ComboBox's items collection.
81 |
82 | .PARAMETER DataMember
83 | Sets the name of the list or table in the data source for which the DataGridView is displaying data.
84 |
85 | .NOTES
86 | SAPIEN Technologies, Inc.
87 | http://www.sapien.com/
88 | #>
89 |
90 | Param (
91 | [ValidateNotNull()]
92 | [Parameter(Mandatory = $true)]
93 | [System.Windows.Forms.DataGridView]$DataGridView,
94 |
95 | [ValidateNotNull()]
96 | [Parameter(Mandatory = $true)]
97 | $Item,
98 |
99 | [Parameter(Mandatory = $false)]
100 | [string]$DataMember
101 | )
102 | BEGIN
103 | {
104 | Add-Type -AssemblyName System.Windows.Forms
105 | }
106 | PROCESS
107 | {
108 | $DataGridView.SuspendLayout()
109 | $DataGridView.DataMember = $DataMember
110 |
111 | if ($Item -is [System.ComponentModel.IListSource]`
112 | -or $Item -is [System.ComponentModel.IBindingList] -or $Item -is [System.ComponentModel.IBindingListView])
113 | {
114 | $DataGridView.DataSource = $Item
115 | }
116 | else
117 | {
118 | $array = New-Object System.Collections.ArrayList
119 |
120 | if ($Item -is [System.Collections.IList])
121 | {
122 | $array.AddRange($Item)
123 | }
124 | else
125 | {
126 | $array.Add($Item)
127 | }
128 | $DataGridView.DataSource = $array
129 | }
130 | }
131 | END
132 | {
133 | $DataGridView.ResumeLayout()
134 | }
135 | }
136 |
137 |
138 | $buttonGetProcess_Click = {
139 | # Get the Processes
140 | $Processes = Get-Process
141 |
142 | # Load the result in the DataGridview
143 | Import-DataGridViewItem -DataGridView $datagridview1 -Item $Processes
144 | }
145 | $buttonGetService_Click={
146 | # Get the Services
147 | $Services = Get-Service
148 |
149 | # Load the result in the DataGridview
150 | Import-DataGridViewItem -DataGridView $datagridview1 -Item $Services
151 | }
152 |
153 | # --End User Generated Script--
154 | #----------------------------------------------
155 | #region Generated Events
156 | #----------------------------------------------
157 |
158 | $Form_StateCorrection_Load=
159 | {
160 | #Correct the initial state of the form to prevent the .Net maximized form issue
161 | $formWinformPSImportDataG.WindowState = $InitialFormWindowState
162 | }
163 |
164 | $Form_Cleanup_FormClosed=
165 | {
166 | #Remove all event handlers from the controls
167 | try
168 | {
169 | $buttonGetService.remove_Click($buttonGetService_Click)
170 | $buttonGetProcess.remove_Click($buttonGetProcess_Click)
171 | $formWinformPSImportDataG.remove_Load($Form_StateCorrection_Load)
172 | $formWinformPSImportDataG.remove_FormClosed($Form_Cleanup_FormClosed)
173 | }
174 | catch [Exception]
175 | { }
176 | }
177 | #endregion Generated Events
178 |
179 | #----------------------------------------------
180 | #region Generated Form Code
181 | #----------------------------------------------
182 | $formWinformPSImportDataG.SuspendLayout()
183 | #
184 | # formWinformPSImportDataG
185 | #
186 | $formWinformPSImportDataG.Controls.Add($datagridview1)
187 | $formWinformPSImportDataG.Controls.Add($buttonGetService)
188 | $formWinformPSImportDataG.Controls.Add($buttonGetProcess)
189 | $formWinformPSImportDataG.ClientSize = '401, 330'
190 | $formWinformPSImportDataG.Name = 'formWinformPSImportDataG'
191 | $formWinformPSImportDataG.Text = 'WinformPS - Import-DataGridViewItem'
192 | #
193 | # datagridview1
194 | #
195 | $datagridview1.ColumnHeadersHeightSizeMode = 'AutoSize'
196 | $datagridview1.Location = '12, 41'
197 | $datagridview1.Name = 'datagridview1'
198 | $datagridview1.Size = '377, 277'
199 | $datagridview1.TabIndex = 2
200 | #
201 | # buttonGetService
202 | #
203 | $buttonGetService.Location = '93, 12'
204 | $buttonGetService.Name = 'buttonGetService'
205 | $buttonGetService.Size = '75, 23'
206 | $buttonGetService.TabIndex = 1
207 | $buttonGetService.Text = 'Get-Service'
208 | $buttonGetService.UseVisualStyleBackColor = $True
209 | $buttonGetService.add_Click($buttonGetService_Click)
210 | #
211 | # buttonGetProcess
212 | #
213 | $buttonGetProcess.Location = '12, 12'
214 | $buttonGetProcess.Name = 'buttonGetProcess'
215 | $buttonGetProcess.Size = '75, 23'
216 | $buttonGetProcess.TabIndex = 0
217 | $buttonGetProcess.Text = 'Get-Process'
218 | $buttonGetProcess.UseVisualStyleBackColor = $True
219 | $buttonGetProcess.add_Click($buttonGetProcess_Click)
220 | $formWinformPSImportDataG.ResumeLayout()
221 | #endregion Generated Form Code
222 |
223 | #----------------------------------------------
224 |
225 | #Save the initial state of the form
226 | $InitialFormWindowState = $formWinformPSImportDataG.WindowState
227 | #Init the OnLoad event to correct the initial state of the form
228 | $formWinformPSImportDataG.add_Load($Form_StateCorrection_Load)
229 | #Clean up the control events
230 | $formWinformPSImportDataG.add_FormClosed($Form_Cleanup_FormClosed)
231 | #Show the Form
232 | return $formWinformPSImportDataG.ShowDialog()
233 |
234 | } #End Function
235 |
236 | #Call the form
237 | Call-Impot-WFDataGridViewItem_psf | Out-Null
238 |
--------------------------------------------------------------------------------
/Examples/DataGridView/Add-WFDataGridViewColumn/Add-WFDataGridViewColumn.Export.ps1:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------
2 | # Source File Information (DO NOT MODIFY)
3 | # Source ID: f7c89b20-6eb8-46f5-8bd8-2bdd4e97df8f
4 | # Source File: Add-WFDataGridViewColumn.psf
5 | #------------------------------------------------------------------------
6 | #region File Recovery Data (DO NOT MODIFY)
7 | <#RecoveryData:
8 | swsAAB+LCAAAAAAABAC9Vl2P2jAQfK/U/2D5mYOEjwOkEAlo6VW9tqhQrm8nJ1k4FydGjgOkv74b
9 | AhTIUQI6EBLCiXdnZ2d2hfUDXDkHFX9gmhH8EXIZtGiZ2u/fEWJ9V3zCAyZ6XMA35oPd9ry7p15y
10 | +ZPi3ojDoitF5AfFWTi2SpnraRLnN7ia6HgGLTqIQw1+8YkHnlyExZ5UfvpdIK+9KpDRuqZq0Ug+
11 | BdKNhI4UtAKItGKiQPqRI7j7BeKhnELQcup1VnNr92azUgWj0aQkwFJadIz5MHeStj9AHhsalLgv
12 | XHgKQ2lXBlpJEab0sfa+kjNQOl7n6AoOgR7wP0DtWrlcIOV70yptLh0JSjpB7WPwJ8OHsNTU3oaS
13 | O3JMhGyqj3Msd53nUTLveBnPyWurtArYRJ8WLqmtI5dX104jjiOX5v+0ynbuUbpMIz61TaOCWlWq
14 | mQ4dU2sDmCMgdUPVqCOCkeP+kDmfAw+W1C5nBSulPc+vQCfSWgZXF8BZwaBfUqddrEMyMpUs72My
15 | HMDmVqNRS3DOEiOP1OkoYjkkdz0/QxjxMGJioGMBHeZOMVQqag9VBK/F744srht3munC8+rxwaye
16 | bZzd9XF1+3gINkGwOYKdOcQp5wdgHhbzAHzystq/X6WHOrcjLZNTDiH2TWjm9+Be7fn3QbOBFjTz
17 | bJx/Hsyujz1d9w/tMAQfuw/h5u76SWz7oSuV4M4bKGiVtlkPUVLP3ALjzX15GjEZj9sAKbbgweQS
18 | LKMyro3rY9P0agarsNNYv3xxG05coU2ligeg5tyFiyQ7m11XKrgJvTUrHFWkdgVu22M621Zp90+6
19 | /RefycOXswsAAA==#>
20 | #endregion
21 |
22 | <#
23 | .NOTES
24 | --------------------------------------------------------------------------------
25 | Code generated by: SAPIEN Technologies, Inc., PowerShell Studio 2016 v5.2.117
26 | Generated on: 2016-03-24 1:42 PM
27 | Generated by:
28 | Organization:
29 | --------------------------------------------------------------------------------
30 | .DESCRIPTION
31 | GUI script generated by PowerShell Studio 2016
32 | #>
33 | #----------------------------------------------
34 | #region Application Functions
35 | #----------------------------------------------
36 |
37 | #endregion Application Functions
38 |
39 | #----------------------------------------------
40 | # Generated Form Function
41 | #----------------------------------------------
42 | function Call-Add-WFDataGridViewColumn_psf {
43 |
44 | #----------------------------------------------
45 | #region Import the Assemblies
46 | #----------------------------------------------
47 | [void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
48 | [void][reflection.assembly]::Load('System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
49 | [void][reflection.assembly]::Load('System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
50 | [void][reflection.assembly]::Load('System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
51 | [void][reflection.assembly]::Load('System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
52 | #endregion Import Assemblies
53 |
54 | #----------------------------------------------
55 | #region Generated Form Objects
56 | #----------------------------------------------
57 | [System.Windows.Forms.Application]::EnableVisualStyles()
58 | $formWinFormPSAddWFDataGr = New-Object 'System.Windows.Forms.Form'
59 | $textbox1 = New-Object 'System.Windows.Forms.TextBox'
60 | $buttonAddColumn = New-Object 'System.Windows.Forms.Button'
61 | $datagridview1 = New-Object 'System.Windows.Forms.DataGridView'
62 | $InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
63 | #endregion Generated Form Objects
64 |
65 | #----------------------------------------------
66 | # User Generated Script
67 | #----------------------------------------------
68 |
69 | $formWinFormPSAddWFDataGr_Load = {
70 | }
71 |
72 |
73 |
74 | #region Control Helper Functions
75 | function Load-DataGridView
76 | {
77 | <#
78 | .SYNOPSIS
79 | This functions helps you load items into a DataGridView.
80 |
81 | .DESCRIPTION
82 | Use this function to dynamically load items into the DataGridView control.
83 |
84 | .PARAMETER DataGridView
85 | The ComboBox control you want to add items to.
86 |
87 | .PARAMETER Item
88 | The object or objects you wish to load into the ComboBox's items collection.
89 |
90 | .PARAMETER DataMember
91 | Sets the name of the list or table in the data source for which the DataGridView is displaying data.
92 |
93 | #>
94 | Param (
95 | [ValidateNotNull()]
96 | [Parameter(Mandatory = $true)]
97 | [System.Windows.Forms.DataGridView]$DataGridView,
98 | [ValidateNotNull()]
99 | [Parameter(Mandatory = $true)]
100 | $Item,
101 | [Parameter(Mandatory = $false)]
102 | [string]$DataMember
103 | )
104 | $DataGridView.SuspendLayout()
105 | $DataGridView.DataMember = $DataMember
106 |
107 | if ($Item -is [System.ComponentModel.IListSource]`
108 | -or $Item -is [System.ComponentModel.IBindingList] -or $Item -is [System.ComponentModel.IBindingListView])
109 | {
110 | $DataGridView.DataSource = $Item
111 | }
112 | else
113 | {
114 | $array = New-Object System.Collections.ArrayList
115 |
116 | if ($Item -is [System.Collections.IList])
117 | {
118 | $array.AddRange($Item)
119 | }
120 | else
121 | {
122 | $array.Add($Item)
123 | }
124 | $DataGridView.DataSource = $array
125 | }
126 |
127 | $DataGridView.ResumeLayout()
128 | }
129 | #endregion
130 |
131 | function Add-WFDataGridViewColumn
132 | {
133 | <#
134 | .SYNOPSIS
135 | This function add a column to a DataGridView
136 | .DESCRIPTION
137 | This function add a column to a DataGridView
138 | .EXAMPLE
139 | Add-WFDataGridViewColumn -DataGridView $datagridview1 -ColumnName $($textbox1.Text -split "," -replace '^\s+', '' -replace '\s+$', '')
140 | .EXAMPLE
141 | Add-WFDataGridViewColumn -DataGridView $datagridview1 -ColumnName "First Name","Last Name","SamAccountName","Description"
142 | .NOTES
143 | Francois-Xavier Cat
144 | www.lazywinadmin.com
145 | @lazywinadm
146 | github.com/lazywinadmin
147 | #>
148 | [CmdletBinding()]
149 | PARAM (
150 | [ValidateNotNull()]
151 | [Parameter(Mandatory = $true)]
152 | [System.Windows.Forms.DataGridView]$DataGridView,
153 |
154 | [String[]]$ColumnName
155 | )
156 | BEGIN
157 | {
158 | Add-Type -AssemblyName System.Windows.Forms
159 | }
160 | PROCESS
161 | {
162 | foreach ($Column in $ColumnName)
163 | {
164 |
165 | # Create Column object
166 | $NewColumn = New-Object -TypeName System.Windows.Forms.DataGridViewTextBoxColumn
167 | $NewColumn.Name = $Column
168 | $NewColumn.HeaderText = $Column
169 |
170 | # Add the Column to the Datagridview
171 | $DataGridView.Columns.Add($NewColumn)
172 | }
173 | }
174 | } #Add-WFDataGridViewColumn
175 |
176 |
177 | $buttonAddColumn_Click = {
178 | if ($textbox1.Text)
179 | {
180 | # Add the a new column (separated by a comma), additionally it will remove white spaces at the beginning and end
181 | Add-WFDataGridViewColumn -DataGridView $datagridview1 -ColumnName $($textbox1.Text -split "," -replace '^\s+', '' -replace '\s+$', '')
182 | }
183 | }
184 |
185 | # --End User Generated Script--
186 | #----------------------------------------------
187 | #region Generated Events
188 | #----------------------------------------------
189 |
190 | $Form_StateCorrection_Load=
191 | {
192 | #Correct the initial state of the form to prevent the .Net maximized form issue
193 | $formWinFormPSAddWFDataGr.WindowState = $InitialFormWindowState
194 | }
195 |
196 | $Form_Cleanup_FormClosed=
197 | {
198 | #Remove all event handlers from the controls
199 | try
200 | {
201 | $buttonAddColumn.remove_Click($buttonAddColumn_Click)
202 | $formWinFormPSAddWFDataGr.remove_Load($formWinFormPSAddWFDataGr_Load)
203 | $formWinFormPSAddWFDataGr.remove_Load($Form_StateCorrection_Load)
204 | $formWinFormPSAddWFDataGr.remove_FormClosed($Form_Cleanup_FormClosed)
205 | }
206 | catch [Exception]
207 | { }
208 | }
209 | #endregion Generated Events
210 |
211 | #----------------------------------------------
212 | #region Generated Form Code
213 | #----------------------------------------------
214 | $formWinFormPSAddWFDataGr.SuspendLayout()
215 | #
216 | # formWinFormPSAddWFDataGr
217 | #
218 | $formWinFormPSAddWFDataGr.Controls.Add($textbox1)
219 | $formWinFormPSAddWFDataGr.Controls.Add($buttonAddColumn)
220 | $formWinFormPSAddWFDataGr.Controls.Add($datagridview1)
221 | $formWinFormPSAddWFDataGr.ClientSize = '522, 261'
222 | $formWinFormPSAddWFDataGr.Name = 'formWinFormPSAddWFDataGr'
223 | $formWinFormPSAddWFDataGr.Text = 'WinFormPS - Add-WFDataGridViewColumn'
224 | $formWinFormPSAddWFDataGr.add_Load($formWinFormPSAddWFDataGr_Load)
225 | #
226 | # textbox1
227 | #
228 | $textbox1.Location = '103, 234'
229 | $textbox1.Name = 'textbox1'
230 | $textbox1.Size = '407, 20'
231 | $textbox1.TabIndex = 2
232 | #
233 | # buttonAddColumn
234 | #
235 | $buttonAddColumn.Location = '12, 232'
236 | $buttonAddColumn.Name = 'buttonAddColumn'
237 | $buttonAddColumn.Size = '85, 23'
238 | $buttonAddColumn.TabIndex = 1
239 | $buttonAddColumn.Text = 'Add Column'
240 | $buttonAddColumn.UseVisualStyleBackColor = $True
241 | $buttonAddColumn.add_Click($buttonAddColumn_Click)
242 | #
243 | # datagridview1
244 | #
245 | $datagridview1.ColumnHeadersHeightSizeMode = 'AutoSize'
246 | $datagridview1.Location = '12, 12'
247 | $datagridview1.Name = 'datagridview1'
248 | $datagridview1.Size = '498, 214'
249 | $datagridview1.TabIndex = 0
250 | $formWinFormPSAddWFDataGr.ResumeLayout()
251 | #endregion Generated Form Code
252 |
253 | #----------------------------------------------
254 |
255 | #Save the initial state of the form
256 | $InitialFormWindowState = $formWinFormPSAddWFDataGr.WindowState
257 | #Init the OnLoad event to correct the initial state of the form
258 | $formWinFormPSAddWFDataGr.add_Load($Form_StateCorrection_Load)
259 | #Clean up the control events
260 | $formWinFormPSAddWFDataGr.add_FormClosed($Form_Cleanup_FormClosed)
261 | #Show the Form
262 | return $formWinFormPSAddWFDataGr.ShowDialog()
263 |
264 | } #End Function
265 |
266 | #Call the form
267 | Call-Add-WFDataGridViewColumn_psf | Out-Null
268 |
--------------------------------------------------------------------------------
/Examples/DataGridView/Add-WFDataGridViewRow/Add-WFDataGridViewRow.Export.ps1:
--------------------------------------------------------------------------------
1 | #------------------------------------------------------------------------
2 | # Source File Information (DO NOT MODIFY)
3 | # Source ID: f7c89b20-6eb8-46f5-8bd8-2bdd4e97df8f
4 | # Source File: Add-WFDataGridViewRow.psf
5 | #------------------------------------------------------------------------
6 | #region File Recovery Data (DO NOT MODIFY)
7 | <#RecoveryData:
8 | jQsAAB+LCAAAAAAABAC9Vu9v2jAQ/T5p/0Pkzykk/CgghUiQjXVat1WF0X6rnOSgHo5dOQ6Q/fW7
9 | EOigaUdABUWK4uTsd+/eu1OcWwjkHFT6iWpq4EPMpOiSGnE/fjAM56diUyYoHzAOP2gEbi8ML+4G
10 | WfAXxcIxg8WtXFSe4olTLcTmJ/i/IdCGTp+gS4ZprCGq3DERykVcGUgV5XfTeO2TaYzXCTUqVnaZ
11 | hpdwnSjoCki0otw0bhKfs+AbpCM5A9H1Wy3aDJqXdqfeAKvdIYbAVLpkgufZxAgeGQ8VxhFPCq0k
12 | j3OimOiNkk+gdLre4HEGQg/ZHyBus1Yzjdql7VQ3QW9symgTd4W1N3YES03cjGcx9PMcsddx15KG
13 | 6zMfsmenuvq6Cd1f3wyoL5cnL7FGHF8u/1vlYhmuZUA14hPXtupY5XqjUI636rwBLLEh17FhtRDB
14 | KhE/ov5XEcKSuLUy0bmUiopAsvjins4ZKNOj2pwskV1R32quWnkN+4nWUpxcQn8Fgz2OTX20jFmv
15 | 1MuULVdxG7O0ku1mBnKQkGVskguJuRjlkvkVw5jFCeVDnXLo02DmSS4VcUcqgdf2bzc2Tphgtsv/
16 | YfXuRYcfbJbt6Xxyy4QINkUwtPziwNbHWiWRuAIaYjJXwKaPq3n7XYaocC/RMluVUGHXe3Z56+3k
17 | Xn6KdNpoPrvMnPrnvuLQ2dF1d9GLY4iw+hBvYtdvUjeKA6k4899BQaf6fOpLlNwz58B4d1/uR8za
18 | 4zxAii6YmB6DZdUnzUlrYtth06J1uh/rPuLn4cQU2lSqdAhqzgI4SrKD2XlSwVnorVlhqyK1E3B7
19 | Xua97VS3f7/dv/fu3P2NCwAA#>
20 | #endregion
21 |
22 | <#
23 | .NOTES
24 | --------------------------------------------------------------------------------
25 | Code generated by: SAPIEN Technologies, Inc., PowerShell Studio 2016 v5.2.117
26 | Generated on: 2016-03-24 3:52 PM
27 | Generated by:
28 | Organization:
29 | --------------------------------------------------------------------------------
30 | .DESCRIPTION
31 | GUI script generated by PowerShell Studio 2016
32 | #>
33 | #----------------------------------------------
34 | #region Application Functions
35 | #----------------------------------------------
36 |
37 | #endregion Application Functions
38 |
39 | #----------------------------------------------
40 | # Generated Form Function
41 | #----------------------------------------------
42 | function Call-Add-WFDataGridViewRow_psf {
43 |
44 | #----------------------------------------------
45 | #region Import the Assemblies
46 | #----------------------------------------------
47 | [void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
48 | [void][reflection.assembly]::Load('System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
49 | [void][reflection.assembly]::Load('System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
50 | [void][reflection.assembly]::Load('System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
51 | [void][reflection.assembly]::Load('System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
52 | #endregion Import Assemblies
53 |
54 | #----------------------------------------------
55 | #region Generated Form Objects
56 | #----------------------------------------------
57 | [System.Windows.Forms.Application]::EnableVisualStyles()
58 | $form1 = New-Object 'System.Windows.Forms.Form'
59 | $textbox1 = New-Object 'System.Windows.Forms.TextBox'
60 | $buttonAddRow = New-Object 'System.Windows.Forms.Button'
61 | $datagridview1 = New-Object 'System.Windows.Forms.DataGridView'
62 | $InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
63 | #endregion Generated Form Objects
64 |
65 | #----------------------------------------------
66 | # User Generated Script
67 | #----------------------------------------------
68 |
69 | $form1_Load = {
70 | # Add examples columns
71 | Add-WFDataGridViewColumn -DataGridView $datagridview1 -ColumnName "First Name", "Last Name", "SamAccountName"
72 | }
73 |
74 |
75 | function Add-WFDataGridViewColumn
76 | {
77 | <#
78 | .SYNOPSIS
79 | This function add a column to a DataGridView
80 | .DESCRIPTION
81 | This function add a column to a DataGridView
82 | .EXAMPLE
83 | Add-WFDataGridViewColumn -DataGridView $datagridview1 -ColumnName $($textbox1.Text -split "," -replace '^\s+', '' -replace '\s+$', '')
84 | .EXAMPLE
85 | Add-WFDataGridViewColumn -DataGridView $datagridview1 -ColumnName "First Name","Last Name","SamAccountName","Description"
86 | .NOTES
87 | Francois-Xavier Cat
88 | www.lazywinadmin.com
89 | @lazywinadm
90 | github.com/lazywinadmin
91 | #>
92 | [CmdletBinding()]
93 | PARAM (
94 | [ValidateNotNull()]
95 | [Parameter(Mandatory = $true)]
96 | [System.Windows.Forms.DataGridView]$DataGridView,
97 |
98 | [String[]]$ColumnName
99 | )
100 | BEGIN
101 | {
102 | Add-Type -AssemblyName System.Windows.Forms
103 | }
104 | PROCESS
105 | {
106 | foreach ($Column in $ColumnName)
107 | {
108 |
109 | # Create Column object
110 | $NewColumn = New-Object -TypeName System.Windows.Forms.DataGridViewTextBoxColumn
111 | $NewColumn.Name = $Column
112 | $NewColumn.HeaderText = $Column
113 |
114 | # Add the Column to the Datagridview
115 | $DataGridView.Columns.Add($NewColumn)
116 | }
117 | }
118 | } #Add-WFDataGridViewColumn
119 |
120 | function Add-WFDataGridViewRow
121 | {
122 | <#
123 | .SYNOPSIS
124 | This function add a row to a DataGridView
125 |
126 | .DESCRIPTION
127 | This function add a row to a DataGridView
128 |
129 | .PARAMETER DataGridView
130 | Specifies the DataGridView Control to use
131 |
132 | .PARAMETER Title
133 | Specifies the Title to set on the new row
134 |
135 | .PARAMETER Values
136 | Specities the values to add
137 |
138 | .PARAMETER Collection
139 | Specifies the number of column to add
140 |
141 | .EXAMPLE
142 | Add-WFDataGridViewRow -DataGridView $datagridview1 -Title "Name1" -Values ($textbox1.Text -split ",")
143 |
144 | Add a new row with the Title 'Name1' and the values from $textbox1
145 |
146 | .EXAMPLE
147 | Add-WFDataGridViewRow -DataGridView $datagridview1
148 |
149 | Add an empty row
150 |
151 | .EXAMPLE
152 | Add-WFDataGridViewRow -DataGridView $datagridview1 -Collection 3
153 |
154 | Add 3 empty rows
155 |
156 | .EXAMPLE
157 | Add-WFDataGridViewRow -DataGridView $datagridview1 -Values "Francois-Xavier","Cat","fxcat"
158 |
159 | Add a row with the values specified.
160 |
161 | .NOTES
162 | Francois-Xavier Cat
163 | www.lazywinadmin.com
164 | @lazywinadm
165 | github.com/lazywinadmin
166 | #>
167 |
168 | [CmdletBinding(DefaultParameterSetName = 'EmptyRow')]
169 | param
170 | (
171 | [Parameter(Mandatory = $true)]
172 | [ValidateNotNull()]
173 | [System.Windows.Forms.DataGridView]$DataGridView,
174 |
175 | [Parameter(ParameterSetName = 'Row',
176 | Mandatory = $true)]
177 | [String]$Title,
178 |
179 | [Parameter(ParameterSetName = 'Row')]
180 | [Array]$Values,
181 |
182 | [Parameter(ParameterSetName = 'Collection',
183 | Mandatory = $true)]
184 | [int32]$Collection
185 | )
186 |
187 | BEGIN
188 | {
189 | Add-Type -AssemblyName System.Windows.Forms
190 | }
191 | PROCESS
192 | {
193 | IF ($PSCmdlet.ParameterSetName -eq 'EmptyRow')
194 | {
195 | $DataGridView.Rows.Add()
196 | }
197 | ELSEIF ($PSCmdlet.ParameterSetName -eq 'Row')
198 | {
199 | $Row = New-Object -TypeName System.Windows.Forms.DataGridViewRow
200 | $Row.HeaderCell.Value = $Title
201 | $Row.CreateCells($DataGridView, $Values)
202 |
203 | # Add the row
204 | $DataGridView.Rows.Add($Row)
205 |
206 | }
207 | ELSEIF ($PSCmdlet.ParameterSetName -eq 'Collection')
208 | {
209 | $DataGridView.Rows.Add($Collection)
210 | }
211 | }
212 | }
213 |
214 | $buttonAddRow_Click = {
215 | if ($textbox1.Text)
216 | {
217 | #Add row 'Name1'
218 | Add-WFDataGridViewRow -DataGridView $datagridview1 -Title "Name1" -Values ($textbox1.Text -split ",")
219 |
220 | #Add Empty Row
221 | #Add-WFDataGridViewRow -DataGridView $datagridview1
222 |
223 | #Add Multiple Empty Row
224 | #Add-WFDataGridViewRow -DataGridView $datagridview1 -Collection 3
225 | }
226 | }
227 |
228 | # --End User Generated Script--
229 | #----------------------------------------------
230 | #region Generated Events
231 | #----------------------------------------------
232 |
233 | $Form_StateCorrection_Load=
234 | {
235 | #Correct the initial state of the form to prevent the .Net maximized form issue
236 | $form1.WindowState = $InitialFormWindowState
237 | }
238 |
239 | $Form_Cleanup_FormClosed=
240 | {
241 | #Remove all event handlers from the controls
242 | try
243 | {
244 | $buttonAddRow.remove_Click($buttonAddRow_Click)
245 | $form1.remove_Load($form1_Load)
246 | $form1.remove_Load($Form_StateCorrection_Load)
247 | $form1.remove_FormClosed($Form_Cleanup_FormClosed)
248 | }
249 | catch [Exception]
250 | { }
251 | }
252 | #endregion Generated Events
253 |
254 | #----------------------------------------------
255 | #region Generated Form Code
256 | #----------------------------------------------
257 | $form1.SuspendLayout()
258 | #
259 | # form1
260 | #
261 | $form1.Controls.Add($textbox1)
262 | $form1.Controls.Add($buttonAddRow)
263 | $form1.Controls.Add($datagridview1)
264 | $form1.ClientSize = '522, 261'
265 | $form1.Name = 'form1'
266 | $form1.Text = 'Form'
267 | $form1.add_Load($form1_Load)
268 | #
269 | # textbox1
270 | #
271 | $textbox1.Location = '103, 234'
272 | $textbox1.Name = 'textbox1'
273 | $textbox1.Size = '407, 20'
274 | $textbox1.TabIndex = 2
275 | $textbox1.Text = 'Francois-Xavier,Cat,fxcat'
276 | #
277 | # buttonAddRow
278 | #
279 | $buttonAddRow.Location = '12, 232'
280 | $buttonAddRow.Name = 'buttonAddRow'
281 | $buttonAddRow.Size = '85, 23'
282 | $buttonAddRow.TabIndex = 1
283 | $buttonAddRow.Text = 'Add Row'
284 | $buttonAddRow.UseVisualStyleBackColor = $True
285 | $buttonAddRow.add_Click($buttonAddRow_Click)
286 | #
287 | # datagridview1
288 | #
289 | $datagridview1.ColumnHeadersHeightSizeMode = 'AutoSize'
290 | $datagridview1.Location = '12, 12'
291 | $datagridview1.Name = 'datagridview1'
292 | $datagridview1.Size = '498, 214'
293 | $datagridview1.TabIndex = 0
294 | $form1.ResumeLayout()
295 | #endregion Generated Form Code
296 |
297 | #----------------------------------------------
298 |
299 | #Save the initial state of the form
300 | $InitialFormWindowState = $form1.WindowState
301 | #Init the OnLoad event to correct the initial state of the form
302 | $form1.add_Load($Form_StateCorrection_Load)
303 | #Clean up the control events
304 | $form1.add_FormClosed($Form_Cleanup_FormClosed)
305 | #Show the Form
306 | return $form1.ShowDialog()
307 |
308 | } #End Function
309 |
310 | #Call the form
311 | Call-Add-WFDataGridViewRow_psf | Out-Null
312 |
--------------------------------------------------------------------------------
/Examples/DataGridView/Add-WFDataGridViewRow/Add-WFDataGridViewRow.psf:
--------------------------------------------------------------------------------
1 |
2 | f7c89b20-6eb8-46f5-8bd8-2bdd4e97df8f
3 | 131033227506707112
4 | iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAAA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| 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
112 | 7/z38x93Pv1KmO3b23A4OEUbvIOVZQaQS31dr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 | AAAA4EIMAAAAuBADAAAALsQAAACACzEAAADgQgwAAAC4EAMAAAAuxAAAAIALMQAAAOBCDAAAALgQ
127 | AwAAAC7EAAAAgAsxAAAA4EIMAAAAuBADAAAALsQAAACACzEAAADgQgwAAAC4EAMAAAAuxAAAAIAL
128 | MQAAAOBCDAAAALgQAwAAAC7EAAAAgAsxAAAA4EIMAAAAuBADAAAALsQAAACACzEAAADgQgwAAAC4
129 | EAMAAAAuxAAAAIALMQAAAOBCDAAAALgQAwAAAC7EAAAAgAsxAAAA4EIMAAAAuBADAAAALsQAAACA
130 | CzEAAADgQgwAAAC4EAMAAAAuxAAAAIALMQAAAOBCDAAAALgQAwAAAC7EAAAAgAsxAAAA4EIMAAAA
131 | uBADAAAALsQAAACACzEAAADgQgwAAAC4EAMAAAAuxAAAAIALMQAAAOBCDAAAALgQAwAAAC7EAAAA
132 | gAsxAAAA4EIMAAAAuBADAAAALsQAAACACzEAAADgQgwAAAC4EAMAAAAuxAAAAIALMQAAAOBCDAAA
133 | ALgQAwAAAC7EAAAAgAsxAAAA4EIMAAAAuBADAAAALsQAAACACzEAAADgQgwAAAC4EAMAAAAuxAAA
134 | AIALMQAAAOBCDAAAALgQAwAAAC7EAAAAgAsxAAAA4EIMAAAAuBADAAAALsQAAACACzEAAADgQgwA
135 | AAC4EAMAAAAuxAAAAIALMQAAAOBCDAAAALgQAwAAAC7EAAAAgAsxAAAA4EIMAAAAuBADAAAALsQA
136 | AACACzEAAADgQgwAAAC4EAMAAAAuxAAAAIALMQAAAOBCDAAAALgQAwAAAC7EAAAAgAsxAAAA4EIM
137 | AAAAuBADAAAALsQAAACACzEAAADgQgwAAAC4EAMAAAAuxAAAAIALMQAAAOBCDAAAALgQAwAAAC7E
138 | AAAAgAsxAAAA4EIMAAAAuBADAAAALsQAAACACzEAAADgQgwAAAC4EAMAAAAuxAAAAIALMQAAAOBC
139 | DAAAALgQAwAAAC7EAAAAgAsxAAAA4EIMAAAAuBADAAAALsQAAACACzEAAADgQgwAAAC4EAMAAAAu
140 | xAAAAIALMQAAAOBCDAAAALgQAwAAAC7EAAAAgAsxAAAA4EIMAAAAuBADAAAALsQAAACACzEAAADg
141 | QgwAAAC4EAMAAAAuxAAAAIALMQAAAOBCDAAAALgQAwAAAC7EAAAAgAsxAAAA4EIMAAAAuBADAAAA
142 | LsQAAACACzEAAADgQgwAAAC4EAMAAAAuxAAAAIALXdcDwK5du3TzzTfr+PHjzhAAAACuTFBQkO68
143 | 806tWbPm+hoAbHYA+OlPf6qpU6dqwoQJAADgCk2fPl2/+MUvtHr1amdN9bTWdtZlBoAzZ84oPDxc
144 | Dz30kB544AEAAHCV7Bp69OhRnT171uNa21mXGQAaGhrU0tLi3Gg7DAAAgKtj11C7lto11dNa21mX
145 | GQDOa2pqAgAAfyFPa6snXW4AAAAA1x4DAAAALsQAAACAC3W5AcA+f9HW1qbW1lZcIXt/NTc3e7w/
146 | AQDwpEsNAPaViyUlJQoICHAEBgbiMuz9dOzYMeXm5jrDwKXu15aWZrWYIQEA8ANmft5f6QsBu9QA
147 | YI9kMzMzdfDgQRUUFCgnJweXYe8nOwDExMTo5MmT37g/7T+Curp6BYdEyP9ooI4eCwYA/ID5HwlU
148 | cXGJOSBs+cZ64EmXHACCg4P1xRdfdBy54tvY933GxsY6LhwAmpubVFVdrQMHj6isvELV1bUAgB+w
149 | I2YISM/IMuup50eEO+uSA4D9fcb24Wz7iwzw7ex9Fh0d/a0DgJ0I7f+1QEREP+wio+Ku/wHAHt3W
150 | 19f/9Rqa1Gq229rcqIaLzm9QY5N9zqTpgvPMHdPSbG53Q6fTDLsts8jahfZr5k5uauh0me+ZvZ+u
151 | ZACwjxQQEdEPu/CIWAaAdg1qrqtQdka28ksrVW/20fn8hvpaVZYVK7+gTLVfL+JmKKirVHFhkU6U
152 | VZtFv9MQUF2inNRExcZEO4tuVHSMElKzVF7fosbzl/meXfkAcNb80zins211KinIVZa5n+19nV1c
153 | oeYv2v/h/Pd3Tq01xao+9WXHx7av1NZ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ybY6GfxDk
167 | 3Pr2Tqu0qEAJYUfk5xOk4JCD2r/fS15eXvLee1j5TeaIurla6SkFyoiwp+/W4YgU1X/Vfu2G7Fgd
168 | 8ran71FM6fnlvU7xfp/Ly9tbfkHF5rj4nBqripVV0GLOa1Ze/EF5m8sfTipQS8d2/txXqgv5TI+/
169 | 8Jo+Xfmhhvbrpz12NW0uUfzR9tvl5fW5QjMrdParJmWExSu3/KTZg+lUpdKDo5ReWKj0rPZV+1R1
170 | hg47t89H4Rl2JPhCJYX5Sgz104HdAcqobr/NpypCNP2FkdpdcMr5uHNn63IV5dexb28fxRRWmH8L
171 | 8/XUAy/pww2Rqjnd/gLLMy1p2jZ2gB56YrJ2Hw5WQFSAEkvaP8HShACFROfLbr0qNkA+zrb2KqPZ
172 | nntGRdG7Oz633fKPSlRxWZim939OvYasVnKpvd+IiC7fdT8A2F9uY1/hXlNT8xeqNgvuSbUkr9O4
173 | eRt0PKdJSXMG6/01h5VtFsS4Vf310G0P69E/PKTb/+NG3fqmt4pL/PXZsN/rlvu6q/uDN+ln/95D
174 | 43YlqPGLFtXV1KqhvkYnwhbq6fv76J1pczR/4WItWzRHk8bN0IwtMarM262Z/R/UrQ9216O3/la9
175 | pu9ScsIG9bnpGX20L06F6avV42dPamVKnmIPzFGfm4drT6H5vM0A4PlzuDL2fouMjLzCAaBe0dsm
176 | 6olHX9PClSu1cuVOBUX5aNrooep2/8N67rnxmjBphEa++ZIGDOivPr0f0ejlkWYxn6vH7/iTRr32
177 | pJ588iH9/k9DtSq6QU3mPlsy9Gn98Y/29HvU86VPdSynTPn739JT9/9R3R57RL97cJTW5WQqdONM
178 | DZ1wQPmxuzW+1xN6oe+j5r4eouXHK8ySf2FfKnLm7fp//+4/NOhAtXPKmeIwrRz3gvoPGKABLz6m
179 | p19borCMNM176h4NmH9UdV+aGSFsih644wXNWTpdLwzdqbKGfB2bN0rP9jXXGdBL/d/dqLi8UH0y
180 | cqC6Pfiwevd8VztS7CMN59ScuFIvvLhKmS3OHfWN2jIPaMGYvu377vuInh+/VIvHD9Rd//Jr3TN4
181 | jdIa2x9GaSk9oLF33ahf/t9uGjx4rEaN+K16T96ipCRffdzzNg2cfUQZ6Tv1ca8n9ccnzH32xB3q
182 | /5aXGRBrdGxRP/Wz2x/QW88OHakpsxdp2H036j9uG6714WXO9omILtcPYgCwL3CrNovXX6ZGDadO
183 | K33dUD3fs6cGjZ2n8c/fpP80C9ThUG+93/MJLQypMweDFQpY+Z66vbZc3uvf1ysvjlFAg7kHq/dr
184 | 5KDX9N7acNWdblat2V69GQBKwhfoiRvv1O+feEq9n+2lR+67Rff97g1FnmrWoU+G6uWhkxXdZq6f
185 | sljdX3xDi4+mav/Y7pq49pgCFw/W/d3u06CFRxW8ebL6jPVVSWOdas0i7vlzuDJ2ULryAaBR8Vvf
186 | 072/ekB/eu45s+C/pWXb1mvSiKEaPTes4znzU0rct10rVyzTvAmv6A/PztZ+r3F68sGB8q2059do
187 | 32ezNW62t7yXjNBbH21U+/LUqGMzFmin7za926eXlsfYY91zit70urq9s0aHt87XmNm75Ld2ivre
188 | 9IoW+x+R1xJf7QvIVUmit1bNm63Z3vFqcG5npYKn9NWjd7+qmZtynKNmW0tRpLasWKEVn72vHo8N
189 | 13z/alVEjNbzb32m2FIzCM16Qc+vOqa04ys0/PUNCvafrxfvvF8jF5jrrPhATz/YTUPfnagxA0fo
190 | g+VxnV6P8JUaEpbr+RfXKKv14gHAVpsZqI1234tG64+Pvqctviv1xpsrFf6NpwBalXn0Mw15a7+c
191 | rZQEa+VHT+j++7trwopDKledNozorg83RHfc14Xyft/8m8w/LZ0t1IHV9nbO0qiXhuqNyUvN12Ch
192 | pq9Mdi5JRHQluX4AqKpp0KnmNK2e9qaef+w5DX35Jb30cl89dN+LWrhirJ7su9YsGNU63ZKvwJ2f
193 | atQrkzR/3kQNHutvjpG/0NmqY5o08gPNXBOq6vMDQF2lCkIW6tnnFyqu2q7yZqnM8tHUkb31zq4j
194 | Wj/lA42aFqQmndGZ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wxWwb53GjpupZT7ZHad2
208 | 9GWFdo96RL3nR3+94J7KOazti6dpwsCxenewT8fpMRo9arpWbJ6nYa+tUGRF57cIfKG0vXPVf4S3
209 | +dcmnSn00YKRvfToo89p5PytKj5XpXXDn9Hk7eeP6mt0fN5Kee1fopf/+V0zirUXummOho2fr8UL
210 | 5mr6moyOU4mILp/LB4AaNZ0u0aEJA9X3pY/0eV6rWuqrVVNTb44sP9TjvxuhiaMf1R8efkbP9npC
211 | t9x5q343ZIuycz/XJy//Vvc+Ya7X+y79/Ibu+si+wOtU09cDQF7gbHV7fLKOZJoBwL4w8HS1ojZN
212 | 0qsP99fqY7s048X7dX+PgerzWA/1mblJ0cX1am2O0dS7/peenOKvwuJi+Yy7W//w+GJl1NWopqrK
213 | w+2/Olc3AFQrcP0k9RnmrUbnn4rpbLgmjRiraRvSzAcNCpv4unr1+pP69++vZ+77lX7SbbK89szU
214 | s/03yC7JUq62zBivkdPDVZvjq09f7qmez/U3l3/MXG+yfJPylbp9sJ56uLf69XlBPQaN06aEZAWt
215 | n6YhY3YpZu8M/em2W9TDHJEPGPKuNh7N6hggzFL+ZZo29L5Vvx20T8Udp33ZkKDt7z6tx+99TUOe
216 | 765e5nb173mvfvKvT+nDg4XOZc4kztYdf/8TPe8sll+p6Ngn6vXiJhXWpWn/3L7q/YS9fU+pZ8+P
217 | zGK7Ve+8+ZHm7+pYWM8V6NDM3YqraFZl8m6NGdBT3V+0l39RvXs+qvfmr9P+7Vv0Tvc/mvvAnN79
218 | dv3PXw3UksCtev/Rx9St+2yFN51UW2OGDs3aqO3bp6nvSC8V5R7S+8/do36zDqugIFKfvHS3nn9/
219 | jyKDF2jCc8/oGbuPfg/ppcErFJgUp1X9/qTHB5nT+j6p2264V93nbJbXouG6++bn9Jlf9tdPgxAR
220 | fVs/iAHAvsCtoqLiL1CtuoYCRe311cF90SqorTcLuFksqypVVZyo/WsOKCo1VFvmz9DH06Zr9rpd
221 | 8vNLUk1zlTJDP9f8aZM1ZeF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YW63ABg2f/iFlfH/qdAnu5L
235 | y55nHw0AAPzQNXtcBzzpkgMAAAC4thgAAABwIQYAAABc6JoPAHbjrc3tOwIAAF2DXZvLrtUAkGE2
236 | WlDRpPKaJpUBAIAuw67Ndo22a3Xntfs7GQCsDMNOFwAAoGuxa/SF6/Z3NgAAAIDrBwMAAAAuxAAA
237 | AIALXfUAUFrZoPzqL5wrAgCA61Nu5WlV1LZe2QAwYMCAupKKOlXVnXSmBgAAcH2qqG1TZU2zhgwZ
238 | erpjmb90vXr1yn/11WEtlp0YAADA9enVV41hw1t69+5d2bHMExERERERERERERERERERERERERER
239 | ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER
240 | ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER
241 | ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER
242 | ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER
243 | ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER
244 | ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER
245 | ERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERER
246 | EREREREREREREREREREREREREREREREREREREREREREREREREREREdF31o9+9P8Da9qHgtW9BP8A
247 | AAAASUVORK5CYII=
248 |
277 |
301 | [CmdletBinding()]
302 | PARAM (
303 | [ValidateNotNull()]
304 | [Parameter(Mandatory = $true)]
305 | [System.Windows.Forms.DataGridView]$DataGridView,
306 |
307 | [String[]]$ColumnName
308 | )
309 | BEGIN
310 | {
311 | Add-Type -AssemblyName System.Windows.Forms
312 | }
313 | PROCESS
314 | {
315 | foreach ($Column in $ColumnName)
316 | {
317 |
318 | # Create Column object
319 | $NewColumn = New-Object -TypeName System.Windows.Forms.DataGridViewTextBoxColumn
320 | $NewColumn.Name = $Column
321 | $NewColumn.HeaderText = $Column
322 |
323 | # Add the Column to the Datagridview
324 | $DataGridView.Columns.Add($NewColumn)
325 | }
326 | }
327 | } #Add-WFDataGridViewColumn
328 |
329 | function Add-WFDataGridViewRow
330 | {
331 | <#
332 | .SYNOPSIS
333 | This function add a row to a DataGridView
334 |
335 | .DESCRIPTION
336 | This function add a row to a DataGridView
337 |
338 | .PARAMETER DataGridView
339 | Specifies the DataGridView Control to use
340 |
341 | .PARAMETER Title
342 | Specifies the Title to set on the new row
343 |
344 | .PARAMETER Values
345 | Specities the values to add
346 |
347 | .PARAMETER Collection
348 | Specifies the number of column to add
349 |
350 | .EXAMPLE
351 | Add-WFDataGridViewRow -DataGridView $datagridview1 -Title "Name1" -Values ($textbox1.Text -split ",")
352 |
353 | Add a new row with the Title 'Name1' and the values from $textbox1
354 |
355 | .EXAMPLE
356 | Add-WFDataGridViewRow -DataGridView $datagridview1
357 |
358 | Add an empty row
359 |
360 | .EXAMPLE
361 | Add-WFDataGridViewRow -DataGridView $datagridview1 -Collection 3
362 |
363 | Add 3 empty rows
364 |
365 | .EXAMPLE
366 | Add-WFDataGridViewRow -DataGridView $datagridview1 -Values "Francois-Xavier","Cat","fxcat"
367 |
368 | Add a row with the values specified.
369 |
370 | .NOTES
371 | Francois-Xavier Cat
372 | www.lazywinadmin.com
373 | @lazywinadm
374 | github.com/lazywinadmin
375 | #>
376 |
377 | [CmdletBinding(DefaultParameterSetName = 'EmptyRow')]
378 | param
379 | (
380 | [Parameter(Mandatory = $true)]
381 | [ValidateNotNull()]
382 | [System.Windows.Forms.DataGridView]$DataGridView,
383 |
384 | [Parameter(ParameterSetName = 'Row',
385 | Mandatory = $true)]
386 | [String]$Title,
387 |
388 | [Parameter(ParameterSetName = 'Row')]
389 | [Array]$Values,
390 |
391 | [Parameter(ParameterSetName = 'Collection',
392 | Mandatory = $true)]
393 | [int32]$Collection
394 | )
395 |
396 | BEGIN
397 | {
398 | Add-Type -AssemblyName System.Windows.Forms
399 | }
400 | PROCESS
401 | {
402 | IF ($PSCmdlet.ParameterSetName -eq 'EmptyRow')
403 | {
404 | $DataGridView.Rows.Add()
405 | }
406 | ELSEIF ($PSCmdlet.ParameterSetName -eq 'Row')
407 | {
408 | $Row = New-Object -TypeName System.Windows.Forms.DataGridViewRow
409 | $Row.HeaderCell.Value = $Title
410 | $Row.CreateCells($DataGridView, $Values)
411 |
412 | # Add the row
413 | $DataGridView.Rows.Add($Row)
414 |
415 | }
416 | ELSEIF ($PSCmdlet.ParameterSetName -eq 'Collection')
417 | {
418 | $DataGridView.Rows.Add($Collection)
419 | }
420 | }
421 | }
422 |
423 | $buttonAddRow_Click = {
424 | if ($textbox1.Text)
425 | {
426 | #Add row 'Name1'
427 | Add-WFDataGridViewRow -DataGridView $datagridview1 -Title "Name1" -Values ($textbox1.Text -split ",")
428 |
429 | #Add Empty Row
430 | #Add-WFDataGridViewRow -DataGridView $datagridview1
431 |
432 | #Add Multiple Empty Row
433 | #Add-WFDataGridViewRow -DataGridView $datagridview1 -Collection 3
434 | }
435 | }
436 | ]]>
437 | 1
438 |
439 | mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
440 | System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
441 | System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
442 | System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
443 | System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
444 | System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
445 | System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
446 | System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
447 | System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
448 |
449 |
--------------------------------------------------------------------------------
/Examples/DataGridView/Add-WFDataGridViewColumn/Add-WFDataGridViewColumn.psf:
--------------------------------------------------------------------------------
1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dqG3i31wYl3hjYxP0rZ958Z0n42RBecYC1xROae0d+loPdXhEY3cWKjkowUK
85 | DLPzIsou7m497ZgItXNv3+FUO0/t+Ei0onYkUQei07XngDtvbL3Ds+0cKbF1jDp33iTaa13AtkBj
86 | r3djezA+V/sD3NjZ60MybeLgwvV5x93PQDcDDbRC5wUAuy65r8UdsiLZkK5wuzt8Xki6gO5597qG
87 | lq832J6PtCL8oQUAN9v1C0n5IgActGLrCu75BsW6t8Fy9dyLY3X0aK4cx44dV0VF5ReePn3ae/zj
88 | j3do9PiZXjj+ejtO174L5kEuACzeaedoqe3fI1qy7oBis0rs2up+iMfOrWj709Ot81EFRGVq4rSF
89 | GvXa26qpqfX68g8I1pR3ZuuTTz7x/r1q9SY9P+RN71wLtj7csged1l799/vdWLtjaE9QvOas2OsF
90 | kAvtlx8cAKLtwulOvoaMtIP3UEyygp6+X6GN/yT/+67UZpsN7lm/SIcWXS8ldZPiW0tRt0sxlyty
91 | 7j9r4bs9FJ5giduWbajNi9dixeaVy2/lOD3W9D4NWJmtjKKzCl83Rk27v6juHZvpxg6DNH1fvtJz
92 | SrRzZl/9pcWbWhtfqfBDO/Ry91vVfU6K0kortOGD59Sxg13cB72slrfdpEv/8wo9NmatdqfVKjY5
93 | U9MGXK0W4/xs1nJSKQUWAo7a7MNmrDFWiPavfk9PNblalze6Uddcf63+1KSvxq2PUdxRm5HFHdTY
94 | 9terw7BRanX5XWry1Bwt37dGg3veoZa9X9bT996kqy/9s25uN0oz136sl9o+oKuvv0Z/+L8tbVYU
95 | qYi8Y4oMC7IAcKWeeCfUiouFntIa7Zj7gh5u1lrj7II3t/c9uveBFzUtoFyJebVKzLbCa0UossEx
96 | +z7auNrFeM+m9/X4td01IzRR818boIceeFMbc2sV42ZUdsGPSsnWnNee1O3XX23rfIOub/asevdo
97 | pkv6L9CB+BLFW7Hbs+kjdWv2V11x/Y267pan1LHTU7qjYx8NXZGk9FwLV1/pt8hmuGU6tH+5ej54
98 | vdrOiFZS/hnF7JmvTn176LGO7dWs7ZMasjrd9rPN7NeM0JUPvqB392YrOilREy0APPZOiM3OTyo5
99 | v8ZCgAsAJxS1ZZoe7thF/RbGK6O+TwtocUdL5T93kP76l+6aHJRrITFD66Y9p5uvaGT7sZEuueQu
100 | tR6xSoEFZ7R/+Vg9cfsf9b///Tf63SVX69r+87U72orjujfU9LpGusq8/LIbdUe397UlqULpRYma
101 | 1vdB3dv0ZS2M/UTJ2a7olivexi/R9mlKYY2FkHIFHlitIW0a6ekho/TAlXfq8cFbtWbTW+rSrY3G
102 | bClSSo67q5Wm6cMe1k3XXmPrdZNuav6sundvqisHrVJ4tm3fgVXq8shVum9sgLVdrhgbs53TO6tR
103 | i3Z6c2ue0guqtHDE3Xp4+ALtiLF1sP0SFrJXr/W6X5ddd4OuvfoK3fbISM2MPKHg1cPV+LE2GrYm
104 | zZazQJ2yQ8/ceKlajtzh3U1JiI3WeyMf1wOTttpM/zk1vbq1JgSeULKdX18cby782owoyi7eUfFx
105 | mj30CRufa71j5IprbtHtzy/QHgtWCflntW/Za2r39CN65eNy5VRF6PVW7fTMiA3yyzxm4d7Co+27
106 | Vo1e0IdHShR6eI9G9bIg2ucVdWtq583lf9N1Lfvr3TW79GqPVrr2huv0p183Vb/5gQqx/R95ZJ9e
107 | aXOD2g17T31b3qwrr7hU19zdS+8ctOPbAshXj72LWzferki5AHDEQportl8vmk73eKAVwc0WxNbt
108 | PKz1O0O+oXvcPe+K5YXacbpiHpFkAcD6dHds3FcAXQCIy7RJqi3nlj1f9/rD8Xlecc3IyNLJk6c0
109 | cNCren7wGxr6yiT16jdCU9/9yCvC69Zt0diJs+06VvaNdpyufddnUFS6ZloAiLUJ2aZ9dQEg3gKA
110 | K9beHYdzeoHIlnGfq3Gz94nTFmvkq5OVl1dghf+srctJL4wsWbpOzw8d7xV/F4LcMl9to04XQCLt
111 | OlgfAKItgFxov/ywAFBgJ7CbXVqCbcgoCwdBMUnya3WbCie9qtLp72nNHddpx6q52vruH1Sw7VI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V/pEO6mBjHF32iaLXD9GNl/9K/9riPe1KrNCRKH+N
126 | efoOjVgRrPf7t9VlTSZrS4mF5POPH2d6iR3H+Vr9ajs1atRPb/unKsKOkYP7lqlLkxt15+Atiq/4
127 | XP4rxngBYNSmCuXWhOvVB1qr65A18rPzJNFC08HNb+uBS/rrg2i7wEbuU/+7/lm/v2eYliWcVPSh
128 | NerT5Jf65b8/qBcXRyum2ALpc/fp9w+9rEUhRUpICdSgO/5dv7umi94LKldo4Ab1fuhKNe67RkHF
129 | Vd7bSF9Z54tY99aRK0yuGEanuQ+k5Vuxc19N+6ounM1ZtlXDX5moYSPG65VXJ33D4fa4e/6jpVsU
130 | bpOchtpxug+4RiXnezPw8JQC7wN1c5bvsQJsNaqB17t1cssMsgBw5EiMcnNz1eOZIZq/yk/rdoVq
131 | 3DuLNGLkBH322SdasmS13pg8x2b2Fd9ox+na9z4sH52pmUt2WZgv1+b90VqyPsC7O+hCgiv27nMC
132 | 3lfq4879mWBjYBOcHQfj9OKwCXp76kxVV1fqk7OntdvvgJ7pP0IfLbPttjF1t/CDLLR4X7s/p/uA
133 | q6c97u707QlO0NyV++y61XDNdvvlBwSAHl4AiM12bwO49+K+qXsfKzg2SRtb36OsIf2V92wfzbvh
134 | Gu3asEwbZzyo5W/dqiXjb9fCN27T/Dfu0KxRN2n9guEKT3C3mOveM/tZmVVtaTJMb3V/VI0efEf7
135 | qpI1vmMndRiwQgH297FNm6nvRD/tT9ymnpfeqH7z4hRZcNYLAIM7X6fOH6Uqs7JaG997Rs0fbqeJ
136 | e2uUWWLFKH6NOl3XToPmhSosv0wz+12iP/ztOt14W2PdcntTteq5WAcq0zR7SC+1sJnxutwzNgsq
137 | U2xOrZKTN6p7o44asjBUh7PC9UrLy9Vq3AGF2bomF59RqN8SdXzsGj32foyyiuyCXZOst9tbiGg7
138 | xQLB596MLXLNKF3RfJTmhBUpJj5SYzr/WXf2fkfTF23UpNcG6v7rblKnN3froF18447WKCXFX6/1
139 | bKNbr/ytftt8iCZuS7OZXpliMurHqkQxRwt1MChQc2ct0rue67TqQIrCrUC4g/nL11UoPGS/Xm57
140 | q3ovz5LVchWkH9ao59vrkVE7FVd4SqmloXqtxVPqNniN9lmRTcqtUnxGnj584Sb9rfc8BWfna+fy
141 | t/TkNX01K75WSdZHYslnOrR8mG5r2UqDV2cquyRXW9eu1/vn1mfavL3ySylT8tE0LXu9m664dqjW
142 | FmRp7isD1LrVVO2qtSDW5XF16jNXfgVH9PKtN6rD6O3yzzmruKQUTer6O/3mkht08+1uHz2ots8t
143 | 157KzxS/3QJAJwsAixOVVWiF+9x2RmeXKiR8ubpe8rCGrUtVVN4pZZRU6tD+LXp//lrNf2+0mjd7
144 | Qo+O32uB41Nl7Z2mux55Xq9+nKjEIisgmVVKtmMlKnSPZsxfrTkzp6rnEy11y6CtSk3doT73tVTj
145 | gWt1qOq4Ba0aHVw/WW1aNNZN11+qX/1bZ70baRfFkLVWxK6x4zDFxrBSicWf6sCyUXqq46N6bVu1
146 | 8qsOa/h9T+qZMdsUYOOelFetuJRUTe5/vS5/drlC0yqVUl6ijTNf01P3dtf0WCkvebN6teimHuP8
147 | FG7hIz67QgtevkXNhi7S3uRyBe2cogd+d7s6j1us6fNXatbyVXrlmWa6u9nTmh2arrfaNtGjfedo
148 | V9FpLR74kHqP6KN77xunhYeStW/nND1yQ38tOBim9/u01SXN3tG2shrFfXH81Hkkq0LRsWvU8cpW
149 | VpyPKDzfvS1TrdSCbK19b4QeumWk1pTKQtYYte/Y0sJOpfJq7Thv/oS6v7xOfjknlXTUZpJb31Hz
150 | K57TjJgyRYT5aUDby9RkQpC1c0LptVma9VxLPdR0mBZbEE63QJu8bYIaPTRYk/dkKNoCwJDml+ux
151 | ScHenbvMgmTNGzlAzZqM14aCY3a8fnWdL2bdDNTdsv+uABBl4X7oqCny9z9kRe+sd8v967rHAwOC
152 | NHjkZO8t0IbacZ4fANznLNyn5OsDQEOvPz8AHD4cqqNHj+r1N6fq5eHjNOKVCXppyFjNn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DZxzSoUyb1VgA
180 | 6DXbBYBqK9KnFeK3xALAreq7LEfp+cfsQuYCQAd16esCwBml5FZ4AeCqFqM1L6JEsXHher3nNWr3
181 | UbKyKj5RhhW8lPxKOzlKbaZVpRQLJIlW7Fzxjss/obTUDep66Q3qNStG4TbzjLP198Yqo0yx7sJZ
182 | elrpnifsollhF+b6sbTn7cIdl56qmc/eqN9f31TNW7TWAw+3VLNHntTDTe/QX29rpefWlqgidbWe
183 | uM6Khs2Ow63AJdgs033wbvUbD+myAUsUnpyqVaM769IbXtU6Cz2JNiuIK5Zit05Ukw7tvQCQXWRF
184 | utDWt359SmyWaCdMbN5JRYf4aUTfu/VAr+F6pvfj6r00W0crPlPS9sm669FB6tSpiW5/erA+2J+r
185 | lOLjiolP0KQ+V6rV2we9tzni3N0P11bBGcXu/EAtOlsAWJqso+7Wr21rTM5xZZbnaPVLrdWo+xL5
186 | ZRdp37qxuuVfb1X76UFKPCVVpe/TwB4d1XKcJfzqz5Tp954at35Boz9Osll3rSIOz1WLf79O9w9e
187 | q5AqqbwwVdNHdNLNz25QQk2u5g56Qre1GqzFKZ8q3+u3THHuPf39H6rl5QP0XqjNSkItADx8o15a
188 | b4Xcgl9C8WfyX/Gq2nV+VGP8Tqo0eoEeuryFun4QrKjyk3Zxs+MvM18LRjWxALBSYRkViss9pqzs
189 | cE18sb8efW6GJr/SSx27j9O6zM+92/9xOVVaNPxWPTB8iQ4kFWvvjAG67PLBWmH7I6/ijNIsEGdV
190 | fa6jlbaf8q2PfR/ooe6jNX7qa+oycKrm7M7U1mmPqeVrCzR+QBN1mpWsFJs5bXzvWd1y9WN6Pfi4
191 | Ci20uc8uecdRjh3TRXZs7Ryvm/7YRq/syrRgY+HFLuappUXavmi8Hr16gBblWwBY87o6dLIAsLVG
192 | hSci9dqDbdRv1BYdsFCTklepqB1v6+4rn9OMuApFhbkAcJ06zUlWcl6t0qpdAOipDm2mauNRe32+
193 | nQdbXAAYqin7sxSTGnguAKRaADihDBcAXumqxne6fXJKSUfrj/uLX3fX2P32wywXANyHWZMKvCL1
194 | daPsGjH+nfl6a+I0LV26SgsXLv+GS5es0kR7ftyUeVYAyxpsx+k+IX8kpcC76+Bmu+7rcXOX+1mw
195 | qlvmm4XTfTCuWK+8/p6mTZutJUtWatGiFV9zuZbZer02dpKmzVlj11Ordw205dp3b+Mdjsnyfogn
196 | Ma9KWy0ALF3nryS7fnpfwXUfHD33YTxX/N03vFwAGDx8vBYsWKbly9doytQZXiCa8uFyDR76uvW9
197 | WqtXrdeIV+w1a3Z7NdN9+yTMlg8712adFrTt+rI3OFHzVu33AsiF9ssPDAAV1pilZWu8IV2aDw6L
198 | shCQYOksRyHRMYpKTtOuA4c0ek2WFh2UJm6VXTCO6eX39yk2IdH7ZK8LAO5TyA21ebEbm2cz37i9
199 | GtGzif77L/+XHuozXmtsdpFmhTElapFa/vku/fmS36rtrECFZdpjNlOOCNquoXYx6WIB4GhtXQDo
200 | 0P4ZzYqQ0t1ycevU+YYmFgACFWIzMxcAHn5925cBwIpMWlGRVk/qq9svbaphGwt19DOp+IwUsuIl
201 | Nb1jgKbuOWr7K1SjH71SvT9KUER2jZKK3FsAS70A0G95jjIKjtuFLF6TXQDot0g7884q1S58katf
202 | 9QLA/CgrnPERer3HVWrzQZR3bLjbTe7AcrOspFQ76HeEal+CzRataBWckBJC3lWzX12rvovsGMl1
203 | t17PGy9bzi17vl+OpRVx6zs6aqO639hI3RakKqNayq36TDaBUnHWIQ1td6fu7DFfISU5er/7/bql
204 | 9SgtT/1cpZ9IOZFb1ObuX+s33eYpwo7TgHVT1fzaW9Vn5VHl2PNVlaWaP6ypfnN9c7260Qp6iXvP
205 | /2vr4/anFbRU264ZIx/V//z3X6txqx6afURKtbBwNH2r+tzdQr/73f/WgxNWyi/5hHdHJsaO88kW
206 | AFpPDvxKAIizQhJnAeDhbn00ZFOpjts+suZVWJKomW920ZV/baoJm/JtXxZq07QXdOe1o7TZxrD6
207 | 7Bn5Lxysq/52i9pOPaiEWil799u6+ZZeGrkjV0WffqLwreN19596a076ZyqzdmP9ZqjZNVfqjkEb
208 | FFVj+yF8sXc35pY2M7Qj9YTyT9v+sXHMilqsln/qoSkhOToctlaDLAAM3mCzY7twJZZIAStGq12n
209 | RzV2pxXFkhSNf+pO3dZ+khU5qeyslHFohR689Vf6S/+VirJtjbexTq6q1tY549Wl0VW68qYe6jvR
210 | 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
248 | TINfGmLjPlbj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fKrM0tO2nWe9cOSCxTfX4cu+XIGw
262 | HKOjZTbu9u+6/Vlh6/CJdxs/032GwD3u2rFj241Rtu2v+u1wbdXvn6zq+rGp191pObe8e633Z423
263 | 7XXPf66sstPKtHXNLjnmhZJ4O+G/GGvb1iQbn6SST2UZw1smp8J9luGscsqPf2197bH6MThnlhXA
264 | BHcs2MIZVXYsFNaNtXu9+5xIVsWntn7nwtf5/Zr5FXXjnFNm/dRvq70uzoKtO9byq87YceOOoy/H
265 | MsXOgWzbL0n1x6UdU+619euTb/vGffukfh28Mbb9nF4f0lzAsGM8z47RL8e3rq2kIptd2/6ob6ug
266 | 1tr6Yrm6Mcqrf97+rD+Ov7qtVee21dbLxqNuTO3x4tPKrnbb49b5mNLPnbPe8t6x785b2xfWlvdY
267 | wSnl2Pa7WeAX5569vu44qbZx+ERHXXveutcdIz8Hkyz8uB+d+cj9EI/NyrNLT9oxZtewH9Gj1seR
268 | 5HxvBu5udbvvzLu3ANxvV7jnGlrm72V26Qnr44QORWVo7sq9Sis+rl3ByVqyzt/OpRo7Z+2ct8e+
269 | oVv+/L/X//v8x7+P1r5bh92BcVq8PlDeV6ovsF9+cABILTzuzWoa1jVqsxE7m5Lce17fS2vPfULW
270 | lm24TUREvGj13hqs0g6bBS+yGelSK0rudviPqevD9bUrKMmCZbVisyq0eW+0Fq7e3+Dr/94uXRdg
271 | BT9A+8PSlWJ17ojNzNfvjLD+DzT4+r+vB7V4rb/358EjR5VsNbmh/eIe/0EBINcCQJr7BK0VbERE
272 | xO+jKzbuWyLuw3h7QlK1NyTtR9X14d73T8yxQneufxcC9odn/MP6PxST88X2uw+Guvft94Wm/8P6
273 | Pxyf7233+fvhfF0w+eEBoNgCgHsfGhER8XvqPj/m6kd6yQml/ch6fVhfrs/E/5/6Ty0+bv1+2b97
274 | +7z+ua+//u+t13+R6/+r++B83fr84ACQXuw+iFb7Dd2HZBAREfGnZUM1272d/70DQPfu3RsMAO5T
275 | 67klNaqqrlZFFSIiIv5UdLU5z32zxWr1+bXb/XaJCwB9+vT9fwsAeaU13m8V11hHiIiI+NPQ1eZ8
276 | q9E/agCotU6qrTNERET8aehqMwEAERHRxyQAICIi+qAEAERERB+UAICIiOiDEgAQERF9UAIAIiKi
277 | D0oAQERE9EF/MgGgqqpKx48fl+Pzzz9HRETEH6jjxIkTXk1tqNae708mAJw9e1ZhYWFq3bq1mjdv
278 | joiIiD9QV0P9/f29mtpQrT3fn0wAcKxdu1b/8R//oREjRmjw4MGIiIj4PR01apR+/etfa968eV5N
279 | bajWnu9PJgC4WxcuADRq1MhLLzt27EBERMTv6cGDB3Xbbbdp/vz5F18AWLduna677jpt375d69ev
280 | R0RExO/prl27dPPNN2vBggUEAERERF+RAICIiOiDEgAQERF9UAIAIiKiD0oAQERE9EEJAIiIiD4o
281 | AQAREdEHJQAgIiL6oAQAREREH5QAgIiI6IMSABAREX1QAgAiIqIPSgBARET0QQkAiIiIPigBABER
282 | 0QclACAiIvqgBABEREQflACAiIjogxIAEBERfVACACIiog9KAEBERPRBCQCIiIg+KAEAERHRByUA
283 | ICIi+qAEAERERB+UAICIiOiDEgAQERF9UAIAIiKiD0oAQERE9EEJAIiIiD4oAQAREdEHJQAgIiL6
284 | oAQAREREH5QAgIiI6IMSABAREX1QAgAiIqIPSgBARET0QQkAiIiIPigBABER0QclACAiIvqgBABE
285 | REQflACAiIjogxIAEBERfVACACIiog9KAEBERPRBCQCIiIg+KAEAERHRByUAICIi+qAEAERERB+U
286 | AICIiOiDEgAQERF9UAIAIiKiD0oAQERE9EEJAIiIiD4oAQAREdEHJQAgIiL6oAQAREREH5QAgIiI
287 | 6IMSABAREX1QAgAiIqIPSgBARET0QQkAiIiIPigBABER0QclACAiIvqgBABEREQflACAiIjogxIA
288 | EBERfVACACIiog9KAEBERPRBCQCIiIg+KAEAERHRByUAICIi+qAEAERERB+UAICIiOiDEgAQERF9
289 | UAIAIiKiD0oAQERE9EEJAIiIiD4oAQAREdEHJQAgIiL6oAQAREREH5QAgIiI6IMSABAREX1QAgAi
290 | IqIPSgBARET0QQkAiIiIPigBABER0QclACAiIvqgBABEREQflACAiIjogxIAEBERfVACACIiog9K
291 | AEBERPRBCQCIiIg+KAEAERHRByUAICIi+qAEAERERB+UAICIiOiDEgAQERF9UAIAIiKiD0oAQERE
292 | 9EEJAIiIiD4oAQAREdEHJQAgIiL6oAQAREREH5QAgIiI6IMSABAREX1QAgAiIqIPSgBARET0QQkA
293 | iIiIPigBABER0QclACAiIvqgBABEREQflACAiIjogxIAEBERfVACACIiog9KAEBERPRBCQCIiIg+
294 | KAEAERHRByUAICIi+qAEAERERB+UAICIiOiDEgAQERF9UAIAIiKiD0oAQERE9EEJAIiIiD4oAQAR
295 | EdEHJQAgIiL6oAQAREREH5QAgIiI6IMSABAREX1QAgAiIqIPSgBARET0QQkAiIiIPigBABER0Qcl
296 | ACAiIvqgBABEREQflACAiIjogxIAEBERfVACACIiog9KAEBERPRBCQCIiIg+KAEAERHRByUAICIi
297 | +qAEAERERB+UAICIiOiDEgAQERF9UAIAIiKiD0oAQERE9EEJAIiIiD4oAQAREdEHJQAgIiL6oAQA
298 | REREH5QAgIiI6IMSABAREX1QAgAiIqIPSgBARET0QQkAiIiIPigBABER0QclACAiIvqgBABEREQf
299 | lACAiIjogxIAEBERfVACACIiog9KAEBERPRBCQCIiIg+KAEAERHRByUAICIi+qAEAERERB+UAICI
300 | iOiDEgAQERF9UAIAIiKiD0oAQERE9EEJAIiIiD4oAQAREdEHJQAgIiL6oAQAREREH5QAgIiI6IMS
301 | ABAREX1QAgAiIqIPSgBARET0QQkAiIiIPigBABER0QclACAiIvqgBABEREQflACAiIjogxIAEBER
302 | fVACACIiog9KAEBERPRBCQCIiIg+KAEAERHRByUAICIi+qAEAERERB+UAICIiOiDXtQBYO3atWrU
303 | qJH279/vhQBERET8fgYEBOjWW2/V/PnzL64A4HAB4Ne//rXGjRun0aNHIyIi4vd0woQJ+sMf/qB5
304 | 8+Z5NbWhWnu+P5kAcPbsWQUHB+v+++/XPffcg4iIiD9QV0P37t2rTz75pMFae74/mQBQVVWlY8eO
305 | eSvtwgAiIiL+MF0NdbXU1dSGau35/mQCQL01NTWIiIj4X7Sh2tqQP7kAgIiIiD++BABEREQflACA
306 | iIjog/7kAoB7/+LEiRM6fvw4fk/deNXW1jY4noiIiA35kwoA7pOLeXl5OnDggKe/vz9+h26c9u3b
307 | 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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
359 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
360 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
361 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
362 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
363 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
364 | AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPi78Ytf/H9YnWE1LtHERgAAAABJRU5ErkJggg==
365 |
366 | 522, 261
367 | formWinFormPSAddWFDataGr
368 | WinFormPS - Add-WFDataGridViewColumn
369 | formWinFormPSAddWFDataGr_Load
370 |
371 | 103, 234
372 | textbox1
373 | 407, 20
374 | 2
375 |
376 |
377 | 12, 232
378 | buttonAddColumn
379 | 85, 23
380 | 1
381 | Add Column
382 | True
383 | buttonAddColumn_Click
384 |
385 |
386 | AutoSize
387 | 12, 12
388 | datagridview1
389 | 498, 214
390 | 0
391 |
392 |
393 |
419 | Param (
420 | [ValidateNotNull()]
421 | [Parameter(Mandatory = $true)]
422 | [System.Windows.Forms.DataGridView]$DataGridView,
423 | [ValidateNotNull()]
424 | [Parameter(Mandatory = $true)]
425 | $Item,
426 | [Parameter(Mandatory = $false)]
427 | [string]$DataMember
428 | )
429 | $DataGridView.SuspendLayout()
430 | $DataGridView.DataMember = $DataMember
431 |
432 | if ($Item -is [System.ComponentModel.IListSource]`
433 | -or $Item -is [System.ComponentModel.IBindingList] -or $Item -is [System.ComponentModel.IBindingListView])
434 | {
435 | $DataGridView.DataSource = $Item
436 | }
437 | else
438 | {
439 | $array = New-Object System.Collections.ArrayList
440 |
441 | if ($Item -is [System.Collections.IList])
442 | {
443 | $array.AddRange($Item)
444 | }
445 | else
446 | {
447 | $array.Add($Item)
448 | }
449 | $DataGridView.DataSource = $array
450 | }
451 |
452 | $DataGridView.ResumeLayout()
453 | }
454 | #endregion
455 |
456 | function Add-WFDataGridViewColumn
457 | {
458 | <#
459 | .SYNOPSIS
460 | This function add a column to a DataGridView
461 | .DESCRIPTION
462 | This function add a column to a DataGridView
463 | .EXAMPLE
464 | Add-WFDataGridViewColumn -DataGridView $datagridview1 -ColumnName $($textbox1.Text -split "," -replace '^\s+', '' -replace '\s+$', '')
465 | .EXAMPLE
466 | Add-WFDataGridViewColumn -DataGridView $datagridview1 -ColumnName "First Name","Last Name","SamAccountName","Description"
467 | .NOTES
468 | Francois-Xavier Cat
469 | www.lazywinadmin.com
470 | @lazywinadm
471 | github.com/lazywinadmin
472 | #>
473 | [CmdletBinding()]
474 | PARAM (
475 | [ValidateNotNull()]
476 | [Parameter(Mandatory = $true)]
477 | [System.Windows.Forms.DataGridView]$DataGridView,
478 |
479 | [String[]]$ColumnName
480 | )
481 | BEGIN
482 | {
483 | Add-Type -AssemblyName System.Windows.Forms
484 | }
485 | PROCESS
486 | {
487 | foreach ($Column in $ColumnName)
488 | {
489 |
490 | # Create Column object
491 | $NewColumn = New-Object -TypeName System.Windows.Forms.DataGridViewTextBoxColumn
492 | $NewColumn.Name = $Column
493 | $NewColumn.HeaderText = $Column
494 |
495 | # Add the Column to the Datagridview
496 | $DataGridView.Columns.Add($NewColumn)
497 | }
498 | }
499 | } #Add-WFDataGridViewColumn
500 |
501 |
502 | $buttonAddColumn_Click = {
503 | if ($textbox1.Text)
504 | {
505 | # Add the a new column (separated by a comma), additionally it will remove white spaces at the beginning and end
506 | Add-WFDataGridViewColumn -DataGridView $datagridview1 -ColumnName $($textbox1.Text -split "," -replace '^\s+', '' -replace '\s+$', '')
507 | }
508 | }
509 | ]]>
510 | 0
511 |
512 | mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
513 | System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
514 | System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
515 | System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
516 | System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
517 | System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
518 | System.DirectoryServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
519 | System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
520 | System.ServiceProcess, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
521 |
522 |
--------------------------------------------------------------------------------