Atualizacao Pilot_Install
This commit is contained in:
@@ -311,54 +311,6 @@ function Disable-UACAndNotifications {
|
||||
}
|
||||
}
|
||||
|
||||
# GUI
|
||||
$form = New-Object System.Windows.Forms.Form
|
||||
$form.Text = "Pilot Installer"
|
||||
$form.Size = New-Object System.Drawing.Size(820, 560)
|
||||
$form.StartPosition = "CenterScreen"
|
||||
|
||||
$buttonsPanel = New-Object System.Windows.Forms.FlowLayoutPanel
|
||||
$buttonsPanel.Location = New-Object System.Drawing.Point(10, 10)
|
||||
$buttonsPanel.Size = New-Object System.Drawing.Size(780, 80)
|
||||
$buttonsPanel.AutoSize = $false
|
||||
$buttonsPanel.WrapContents = $true
|
||||
$buttonsPanel.FlowDirection = [System.Windows.Forms.FlowDirection]::LeftToRight
|
||||
$buttonsPanel.Padding = New-Object System.Windows.Forms.Padding(0)
|
||||
$buttonsPanel.Margin = New-Object System.Windows.Forms.Padding(0)
|
||||
|
||||
$form.Controls.Add($buttonsPanel)
|
||||
|
||||
$buttons = @(
|
||||
@{ Text = "Install Portrait CabTab"; Action = { Initialize-SystemConfiguration; Upgrade-PortraitCabTab } },
|
||||
@{ Text = "Install Dual"; Action = { Initialize-SystemConfiguration; Install-Pilot -Mode "Dual" } },
|
||||
@{ Text = "Install Dual Rua"; Action = { Initialize-SystemConfiguration; Install-Pilot -Mode "DualR" } },
|
||||
@{ Text = "Install Botoneira"; Action = { Initialize-SystemConfiguration; Install-Pilot -Mode "Botoneira" } },
|
||||
@{ Text = "Exit"; Action = { $form.Close() } }
|
||||
)
|
||||
|
||||
foreach ($btn in $buttons) {
|
||||
$button = New-Object System.Windows.Forms.Button
|
||||
$button.Text = $btn.Text
|
||||
$button.Size = New-Object System.Drawing.Size(180, 30)
|
||||
$button.Margin = New-Object System.Windows.Forms.Padding(5)
|
||||
$button.Add_Click($btn.Action)
|
||||
$buttonsPanel.Controls.Add($button)
|
||||
}
|
||||
|
||||
$outputBox = New-Object System.Windows.Forms.TextBox
|
||||
$outputBox.Multiline = $true
|
||||
$outputBox.ScrollBars = "Vertical"
|
||||
$outputBox.ReadOnly = $true
|
||||
$outputBox.Size = New-Object System.Drawing.Size(780, 420)
|
||||
$outputBox.Location = New-Object System.Drawing.Point(10, 100)
|
||||
$outputBox.Font = New-Object System.Drawing.Font("Consolas",10)
|
||||
$outputBox.Name = "OutputTextBox"
|
||||
|
||||
$form.Controls.Add($outputBox)
|
||||
$form.Topmost = $true
|
||||
$form.ShowDialog()
|
||||
|
||||
|
||||
function Upgrade-PortraitCabTab {
|
||||
Initialize-SystemConfiguration
|
||||
|
||||
@@ -416,3 +368,53 @@ function Upgrade-PortraitCabTab {
|
||||
taskkill /IM explorer.exe /F
|
||||
net start PilotGameAgent
|
||||
}
|
||||
|
||||
# GUI
|
||||
$form = New-Object System.Windows.Forms.Form
|
||||
$form.Text = "Pilot Installer"
|
||||
$form.Size = New-Object System.Drawing.Size(820, 560)
|
||||
$form.StartPosition = "CenterScreen"
|
||||
|
||||
$buttonsPanel = New-Object System.Windows.Forms.FlowLayoutPanel
|
||||
$buttonsPanel.Location = New-Object System.Drawing.Point(10, 10)
|
||||
$buttonsPanel.Size = New-Object System.Drawing.Size(780, 80)
|
||||
$buttonsPanel.AutoSize = $false
|
||||
$buttonsPanel.WrapContents = $true
|
||||
$buttonsPanel.FlowDirection = [System.Windows.Forms.FlowDirection]::LeftToRight
|
||||
$buttonsPanel.Padding = New-Object System.Windows.Forms.Padding(0)
|
||||
$buttonsPanel.Margin = New-Object System.Windows.Forms.Padding(0)
|
||||
|
||||
$form.Controls.Add($buttonsPanel)
|
||||
|
||||
$buttons = @(
|
||||
@{ Text = "Install Portrait CabTab"; Action = { Initialize-SystemConfiguration; Upgrade-PortraitCabTab } },
|
||||
@{ Text = "Install Dual"; Action = { Initialize-SystemConfiguration; Install-Pilot -Mode "Dual" } },
|
||||
@{ Text = "Install Dual Rua"; Action = { Initialize-SystemConfiguration; Install-Pilot -Mode "DualR" } },
|
||||
@{ Text = "Install Botoneira"; Action = { Initialize-SystemConfiguration; Install-Pilot -Mode "Botoneira" } },
|
||||
@{ Text = "Exit"; Action = { $form.Close() } }
|
||||
)
|
||||
|
||||
foreach ($btn in $buttons) {
|
||||
$button = New-Object System.Windows.Forms.Button
|
||||
$button.Text = $btn.Text
|
||||
$button.Size = New-Object System.Drawing.Size(180, 30)
|
||||
$button.Margin = New-Object System.Windows.Forms.Padding(5)
|
||||
$button.Add_Click($btn.Action)
|
||||
$buttonsPanel.Controls.Add($button)
|
||||
}
|
||||
|
||||
$outputBox = New-Object System.Windows.Forms.TextBox
|
||||
$outputBox.Multiline = $true
|
||||
$outputBox.ScrollBars = "Vertical"
|
||||
$outputBox.ReadOnly = $true
|
||||
$outputBox.Size = New-Object System.Drawing.Size(780, 420)
|
||||
$outputBox.Location = New-Object System.Drawing.Point(10, 100)
|
||||
$outputBox.Font = New-Object System.Drawing.Font("Consolas",10)
|
||||
$outputBox.Name = "OutputTextBox"
|
||||
|
||||
$form.Controls.Add($outputBox)
|
||||
$form.Topmost = $true
|
||||
$form.ShowDialog()
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user