209 lines
7.7 KiB
PowerShell
209 lines
7.7 KiB
PowerShell
#------------------------------------------------------------------------
|
|
# Source File Information (DO NOT MODIFY)
|
|
# Source ID: 676f8db7-35c7-452d-b353-a4b40f26243a
|
|
# Source File: Form-Template.psf
|
|
#------------------------------------------------------------------------
|
|
#region File Recovery Data (DO NOT MODIFY)
|
|
<#RecoveryData:
|
|
RAUAAB+LCAAAAAAABAC9VNtKwzAYvhd8h5Dr2oPd3AZtYXTuxtNwQ72TrP07o2lSknSzPr3p2g1x
|
|
QkHGKJSk+Q7/KQ0eIRFrkNWEaILMQlHBQ3xpezg6P0MoeJB0RTlhU8rgnuQQTYXMLxaQF4xosAuV
|
|
Bc4BpmEu3yHRSFcFhHheKQ25/Ux5KjbKrkWat4X+OrLQUxtKz3brx0JxyXQpIeRQakmYhWblktHk
|
|
BqqF+AAeLgcD0k/6V97I74E7HGHETSghzoyeh1HyRlkqDQ7HgmspmGoSNIHOpChA6qoljEst5glh
|
|
MKE58DoIA72ykOcHzg7aRb0TKWBTKq47OTGjwPWcfhnCwDU+/nDYSaqrjKNtap3YBXxqvG3bIfR6
|
|
bbxb3K0gaav5Wq8DZ3vaNNNputlsxkpBbooPaqfTfqmiXCVCMro8QgMDZ6/626UZmVN4HH0sux3r
|
|
m3gaI0k2lK/+4+X6WT8bZJ6X9l3ik26vl5ydJKdYSDi+0X7bjHzg/PxrRt9OzyrdRAUAAA==#>
|
|
#endregion
|
|
|
|
<#
|
|
.NOTES
|
|
--------------------------------------------------------------------------------
|
|
Code generated by: SAPIEN Technologies, Inc., PowerShell Studio 2017 v5.4.141
|
|
Generated on: 8/29/2017 11:53 AM
|
|
Generated by: Haidey2
|
|
--------------------------------------------------------------------------------
|
|
.DESCRIPTION
|
|
GUI script generated by PowerShell Studio 2017
|
|
#>
|
|
|
|
|
|
#----------------------------------------------
|
|
#region Application Functions
|
|
#----------------------------------------------
|
|
|
|
#endregion Application Functions
|
|
|
|
#----------------------------------------------
|
|
# Generated Form Function
|
|
#----------------------------------------------
|
|
function Show-Form-Template_psf {
|
|
|
|
#----------------------------------------------
|
|
#region Import the Assemblies
|
|
#----------------------------------------------
|
|
[void][reflection.assembly]::Load('System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
|
|
[void][reflection.assembly]::Load('System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089')
|
|
[void][reflection.assembly]::Load('System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a')
|
|
#endregion Import Assemblies
|
|
|
|
#----------------------------------------------
|
|
#region Generated Form Objects
|
|
#----------------------------------------------
|
|
[System.Windows.Forms.Application]::EnableVisualStyles()
|
|
$form1 = New-Object 'System.Windows.Forms.Form'
|
|
$InitialFormWindowState = New-Object 'System.Windows.Forms.FormWindowState'
|
|
|
|
$PanelEventLogs_Events = New-Object 'System.Windows.Forms.Panel'
|
|
$PanelEventLogs_Filter = New-Object 'System.Windows.Forms.Panel'
|
|
|
|
|
|
$Text_ELogs_ServerName = New-Object 'System.Windows.Forms.TextBox'
|
|
$Text_ELogs_EventID = New-Object 'System.Windows.Forms.TextBox'
|
|
$Text_Elogs_DaysBack = New-Object 'System.Windows.Forms.TextBox'
|
|
|
|
$Button_ELogs_Connect = New-Object 'System.Windows.Forms.Button'
|
|
|
|
#endregion Generated Form Objects
|
|
|
|
#----------------------------------------------
|
|
# User Generated Script
|
|
#----------------------------------------------
|
|
|
|
$form1_Load={
|
|
#TODO: Initialize Form Controls here
|
|
|
|
}
|
|
|
|
# --End User Generated Script--
|
|
#----------------------------------------------
|
|
#region Generated Events
|
|
#----------------------------------------------
|
|
|
|
$Form_StateCorrection_Load=
|
|
{
|
|
#Correct the initial state of the form to prevent the .Net maximized form issue
|
|
$form1.WindowState = $InitialFormWindowState
|
|
}
|
|
|
|
$Form_Cleanup_FormClosed=
|
|
{
|
|
#Remove all event handlers from the controls
|
|
try
|
|
{
|
|
$form1.remove_Load($form1_Load)
|
|
$form1.remove_Load($Form_StateCorrection_Load)
|
|
$form1.remove_FormClosed($Form_Cleanup_FormClosed)
|
|
|
|
$PanelEventLogs_Events.remove_Paint($PanelEventLogs_Events_Paint)
|
|
$PanelEventLogs_Filter.remove_Paint($PanelEventLogs_Filter_Paint)
|
|
|
|
$Text_Elogs_DaysBack.remove_TextChanged($Text_Elogs_DaysBack_TextChanged)
|
|
$Text_ELogs_ServerName.remove_TextChanged($Text_ELogs_ServerName_TextChanged)
|
|
$Text_ELogs_EventID.remove_TextChanged($Text_ELogs_EventID_TextChanged)
|
|
|
|
|
|
|
|
}
|
|
catch { Out-Null <# Prevent PSScriptAnalyzer warning #> }
|
|
}
|
|
|
|
|
|
$PanelEventLogs_Events_Paint=[System.Windows.Forms.PaintEventHandler]{ <#Event Argument: $_ = [System.Windows.Forms.PaintEventArgs]#> }
|
|
$PanelEventLogs_Filter_Paint=[System.Windows.Forms.PaintEventHandler]{ }
|
|
|
|
$Text_ELogs_ServerName_TextChanged={}
|
|
$Text_Elogs_DaysBack_TextChanged={}
|
|
|
|
#endregion Generated Events
|
|
|
|
#----------------------------------------------
|
|
#region Generated Form Code
|
|
#----------------------------------------------
|
|
#
|
|
# form1
|
|
#
|
|
$form1.Controls.Add($PanelEventLogs_Events)
|
|
$form1.Controls.Add($PanelEventLogs_Filter)
|
|
|
|
|
|
|
|
|
|
$form1.AutoScaleDimensions = '6, 13'
|
|
$form1.AutoScaleMode = 'Font'
|
|
$form1.ClientSize = '1200, 780'
|
|
$form1.Name = 'form1'
|
|
$form1.Text = 'Form'
|
|
$form1.add_Load($form1_Load)
|
|
#endregion Generated Form Code
|
|
|
|
#----------------------------------------------
|
|
|
|
$PanelEventLogs_Events.Controls.Add($Text_ELogs_ServerName)
|
|
$PanelEventLogs_Events.Controls.Add($Button_ELogs_Connect)
|
|
$PanelEventLogs_Events.Controls.Add($Button_ELogs_View)
|
|
$PanelEventLogs_Events.Controls.Add($Combobox_EventLogs_LogsList)
|
|
$PanelEventLogs_Events.Controls.Add($VCenterUserPassword)
|
|
$PanelEventLogs_Events.Controls.Add($CheckBoxUseWindowsLogin)
|
|
$PanelEventLogs_Events.Controls.Add($labelVCenterUserName)
|
|
$PanelEventLogs_Events.Controls.Add($labelVCenterPassword)
|
|
$PanelEventLogs_Events.BackColor = '153,153,153'
|
|
$PanelEventLogs_Events.Location = '6, 6'
|
|
$PanelEventLogs_Events.Name = 'panelEventLogs_Events'
|
|
$PanelEventLogs_Events.Size = '598, 56'
|
|
$PanelEventLogs_Events.TabIndex = 0
|
|
$PanelEventLogs_Events.add_Paint($PanelEventLogs_Events_Paint)
|
|
|
|
$PanelEventLogs_Filter.Controls.Add($Combobox_ELogsFilter_Level)
|
|
$PanelEventLogs_Filter.Controls.Add($Text_ELogs_EventID)
|
|
$PanelEventLogs_Filter.Controls.Add($Text_Elogs_DaysBack)
|
|
$PanelEventLogs_Filter.Controls.Add($label_ELogs_Level)
|
|
$PanelEventLogs_Filter.Controls.Add($label_ELogs_EventID)
|
|
$PanelEventLogs_Filter.Controls.Add($label_ELogs_DaysBack)
|
|
$PanelEventLogs_Filter.BackColor = '255,255,212'
|
|
$PanelEventLogs_Filter.Location = '6, 62'
|
|
$PanelEventLogs_Filter.Name = 'PanelEventLogs_Filter'
|
|
$PanelEventLogs_Filter.Size = '598, 56'
|
|
$PanelEventLogs_Filter.BorderStyle = 'FixedSingle'
|
|
$PanelEventLogs_Filter.TabIndex = 0
|
|
$PanelEventLogs_Filter.add_Paint($PanelEventLogs_Filter_Paint)
|
|
|
|
#
|
|
# $Text_ELogs_ServerName
|
|
#
|
|
$Text_ELogs_ServerName.Location = '8, 26'
|
|
$Text_ELogs_ServerName.Name = '$Text_ELogs_ServerName'
|
|
$Text_ELogs_ServerName.Size = '100, 20'
|
|
$Text_ELogs_ServerName.text = "l2012"
|
|
$Text_ELogs_ServerName.TabIndex = 6
|
|
$Text_ELogs_ServerName.add_TextChanged($Text_ELogs_ServerName_TextChanged)
|
|
#
|
|
#
|
|
# Text_ELogs_EventID
|
|
#
|
|
$Text_ELogs_EventID.Location = '115, 26'
|
|
$Text_ELogs_EventID.Name = 'Text_ELogs_EventID'
|
|
$Text_ELogs_EventID.Size = '40, 20'
|
|
$Text_ELogs_EventID.TabIndex = 7
|
|
$Text_ELogs_EventID.add_TextChanged($Text_ELogs_EventID_TextChanged)
|
|
#
|
|
# Text_Elogs_DaysBack
|
|
#
|
|
$Text_Elogs_DaysBack.Location = '175, 26'
|
|
$Text_Elogs_DaysBack.Name = 'Text_Elogs_DaysBack'
|
|
$Text_Elogs_DaysBack.Size = '40, 20'
|
|
$Text_Elogs_DaysBack.TabIndex = 7
|
|
$Text_Elogs_DaysBack.add_TextChanged($Text_Elogs_DaysBack_TextChanged)
|
|
#
|
|
#Save the initial state of the form
|
|
$InitialFormWindowState = $form1.WindowState
|
|
#Init the OnLoad event to correct the initial state of the form
|
|
$form1.add_Load($Form_StateCorrection_Load)
|
|
#Clean up the control events
|
|
$form1.add_FormClosed($Form_Cleanup_FormClosed)
|
|
#Show the Form
|
|
return $form1.ShowDialog()
|
|
|
|
} #End Function
|
|
|
|
#Call the form
|
|
Show-Form-Template_psf | Out-Null
|