Correction de la façon de désactiver Bitlocker
Désactivation du délai écran noir sur secteur Suppression de unattend.xml qui reste par endroit avec le mot de passe admin Mise en place du numéro de version dans le pied de page à droite. Reste à finaliser le contrôle de mise à jour disponible.
This commit is contained in:
1 parent
5a121718d4
commit
a765701fed
8 files changed
+251
-21
No files matched your search
+85
-10
@@ -767,7 +767,8 @@ function New-DeployCenterDeploymentProgress {
|
||||
[Parameter(Mandatory=$true)][System.Drawing.Font]$SubtitleFont,
|
||||
[bool]$Windowed = $false,
|
||||
[AllowNull()][string]$IPv4,
|
||||
[AllowNull()][string]$VncPassword
|
||||
[AllowNull()][string]$VncPassword,
|
||||
[AllowNull()]$HardwareInfo
|
||||
)
|
||||
|
||||
$form = New-Object System.Windows.Forms.Form
|
||||
@@ -798,7 +799,26 @@ function New-DeployCenterDeploymentProgress {
|
||||
-LogoImage $LogoImage -ShowThemeSelector:$false -CloneLogo:$true)
|
||||
|
||||
$heading = New-Object System.Windows.Forms.Label
|
||||
$heading.Location = New-Object System.Drawing.Point(30, 95)
|
||||
$hardwareSummary = New-Object System.Windows.Forms.Label
|
||||
$hardwareSummary.Location = New-Object System.Drawing.Point(30, 91)
|
||||
$hardwareSummary.Size = New-Object System.Drawing.Size(($clientWidth - 60), 18)
|
||||
$hardwareSummary.BackColor = [System.Drawing.Color]::Transparent
|
||||
$hardwareSummary.ForeColor = $Theme.Secondary
|
||||
$hardwareSummary.Font = $FooterFont
|
||||
$hardwareSummary.AutoEllipsis = $true
|
||||
if ($null -ne $HardwareInfo) {
|
||||
$hardwareParts = @(
|
||||
([string]$HardwareInfo.Manufacturer).Trim(),
|
||||
([string]$HardwareInfo.Model).Trim(),
|
||||
((Get-DeployCenterText -Text 'Serial number:') + ' ' + ([string]$HardwareInfo.SerialNumber).Trim()),
|
||||
([string]$HardwareInfo.Firmware).Trim(),
|
||||
([string]$HardwareInfo.Architecture).Trim()
|
||||
) | Where-Object { -not [string]::IsNullOrWhiteSpace($_) }
|
||||
$hardwareSummary.Text = $hardwareParts -join ' | '
|
||||
}
|
||||
$form.Controls.Add($hardwareSummary)
|
||||
|
||||
$heading.Location = New-Object System.Drawing.Point(30, 112)
|
||||
$heading.Size = New-Object System.Drawing.Size(($clientWidth - 60), 22)
|
||||
$heading.Text = Get-DeployCenterText -Text 'Deployment steps'
|
||||
$heading.ForeColor = $Theme.Text
|
||||
@@ -807,9 +827,9 @@ function New-DeployCenterDeploymentProgress {
|
||||
$form.Controls.Add($heading)
|
||||
|
||||
$list = New-Object System.Windows.Forms.Panel
|
||||
$list.Location = New-Object System.Drawing.Point(12, 120)
|
||||
$list.Location = New-Object System.Drawing.Point(12, 137)
|
||||
$footerHeight = 26
|
||||
$list.Size = New-Object System.Drawing.Size(($clientWidth - 24), ($clientHeight - 120 - $footerHeight - 12))
|
||||
$list.Size = New-Object System.Drawing.Size(($clientWidth - 24), ($clientHeight - 137 - $footerHeight - 12))
|
||||
$list.Anchor = [System.Windows.Forms.AnchorStyles]::Top -bor [System.Windows.Forms.AnchorStyles]::Left -bor [System.Windows.Forms.AnchorStyles]::Right -bor [System.Windows.Forms.AnchorStyles]::Bottom
|
||||
$list.AutoScroll = $true
|
||||
$list.BackColor = $Theme.Background
|
||||
@@ -904,7 +924,7 @@ function New-DeployCenterDeploymentProgress {
|
||||
Form = $form
|
||||
Theme = $Theme
|
||||
ListPanel = $list
|
||||
HeaderHeight = 120
|
||||
HeaderHeight = 137
|
||||
FooterHeight = $footerHeight
|
||||
Steps = $rows
|
||||
CurrentIndex = -1
|
||||
@@ -1101,16 +1121,56 @@ function Add-SessionFooter {
|
||||
[AllowNull()][string]$IPv4,
|
||||
[AllowNull()][string]$VncPassword,
|
||||
[bool]$ShowFooter = $true,
|
||||
[bool]$ShowPassword = $true
|
||||
[bool]$ShowPassword = $true,
|
||||
[bool]$ShowVersion = $false,
|
||||
[string]$ApplicationVersion = ''
|
||||
)
|
||||
if (-not $ShowFooter) { return }
|
||||
|
||||
$footerText = if ($IPv4) { (Get-DeployCenterText -Text 'Deployment IP:') + " $IPv4" } else { Get-DeployCenterText -Text 'Deployment IP unavailable' }
|
||||
if ($ShowPassword -and -not [string]::IsNullOrWhiteSpace($VncPassword)) {
|
||||
$footerText += " | " + (Get-DeployCenterText -Text 'VNC password:') + " $VncPassword"
|
||||
}
|
||||
|
||||
if ($ShowVersion) {
|
||||
$footerPanel = New-Object System.Windows.Forms.Panel
|
||||
$footerPanel.Name = 'DeployCenterFooterPanel'
|
||||
$footerPanel.Height = 26
|
||||
$footerPanel.Dock = [System.Windows.Forms.DockStyle]::Bottom
|
||||
$footerPanel.BackColor = $Theme.PanelAlt
|
||||
|
||||
$footer = New-Object System.Windows.Forms.Label
|
||||
$footer.Name = 'DeployCenterSessionFooter'
|
||||
$footer.Text = $footerText
|
||||
$footer.Dock = [System.Windows.Forms.DockStyle]::Fill
|
||||
$footer.TextAlign = [System.Drawing.ContentAlignment]::MiddleLeft
|
||||
$footer.Padding = New-Object System.Windows.Forms.Padding(12, 0, 0, 0)
|
||||
$footer.BackColor = $Theme.PanelAlt
|
||||
$footer.ForeColor = $Theme.Secondary
|
||||
$footer.Font = $Font
|
||||
|
||||
$versionFooter = New-Object System.Windows.Forms.Label
|
||||
$versionFooter.Name = 'DeployCenterVersionFooter'
|
||||
$versionFooter.Text = (Get-DeployCenterText -Text 'Current version:') + " $ApplicationVersion"
|
||||
$versionFooter.Tag = $false
|
||||
$versionFooter.Width = 310
|
||||
$versionFooter.Dock = [System.Windows.Forms.DockStyle]::Right
|
||||
$versionFooter.TextAlign = [System.Drawing.ContentAlignment]::MiddleRight
|
||||
$versionFooter.Padding = New-Object System.Windows.Forms.Padding(0, 0, 12, 0)
|
||||
$versionFooter.BackColor = $Theme.PanelAlt
|
||||
$versionFooter.ForeColor = $Theme.Secondary
|
||||
$versionFooter.Font = $Font
|
||||
|
||||
$footerPanel.Controls.Add($footer)
|
||||
$footerPanel.Controls.Add($versionFooter)
|
||||
$TargetForm.Controls.Add($footerPanel)
|
||||
$footerPanel.BringToFront()
|
||||
return [pscustomobject]@{ Footer = $footer; VersionLabel = $versionFooter; Panel = $footerPanel }
|
||||
}
|
||||
|
||||
$footer = New-Object System.Windows.Forms.Label
|
||||
$footer.Name = 'DeployCenterSessionFooter'
|
||||
$footer.Text = if ($IPv4) { (Get-DeployCenterText -Text 'Deployment IP:') + " $IPv4" } else { Get-DeployCenterText -Text 'Deployment IP unavailable' }
|
||||
if ($ShowPassword -and -not [string]::IsNullOrWhiteSpace($VncPassword)) {
|
||||
$footer.Text += " | " + (Get-DeployCenterText -Text 'VNC password:') + " $VncPassword"
|
||||
}
|
||||
$footer.Text = $footerText
|
||||
$footer.Height = 26
|
||||
$footer.Dock = [System.Windows.Forms.DockStyle]::Bottom
|
||||
$footer.TextAlign = [System.Drawing.ContentAlignment]::MiddleLeft
|
||||
@@ -1251,6 +1311,11 @@ function Set-ControlTheme {
|
||||
$Control.ForeColor = $script:Theme.Text
|
||||
$Control.Invalidate()
|
||||
}
|
||||
elseif ($Control -is [System.Windows.Forms.Panel]) {
|
||||
if ($Control.Name -eq 'DeployCenterFooterPanel') {
|
||||
$Control.BackColor = $script:Theme.PanelAlt
|
||||
}
|
||||
}
|
||||
elseif ($Control -is [System.Windows.Forms.Label]) {
|
||||
$Control.ForeColor = $script:Theme.Text
|
||||
if ($Control.Name -eq 'lblSelectedWindows') {
|
||||
@@ -1265,6 +1330,11 @@ function Set-ControlTheme {
|
||||
$Control.ForeColor = $script:Theme.Secondary
|
||||
$Control.Invalidate()
|
||||
}
|
||||
if ($Control.Name -eq 'DeployCenterVersionFooter') {
|
||||
$Control.BackColor = $script:Theme.PanelAlt
|
||||
$Control.ForeColor = if ($Control.Tag) { [System.Drawing.ColorTranslator]::FromHtml([string]$script:Theme.Danger) } else { $script:Theme.Secondary }
|
||||
$Control.Invalidate()
|
||||
}
|
||||
}
|
||||
elseif ($Control -is [System.Windows.Forms.ListView]) {
|
||||
$Control.BackColor = $script:Theme.PanelAlt
|
||||
@@ -1321,6 +1391,11 @@ function Set-DeployCenterTheme {
|
||||
$footer.ForeColor = $script:Theme.Secondary
|
||||
$footer.Invalidate()
|
||||
}
|
||||
foreach ($versionFooter in $script:form.Controls.Find('DeployCenterVersionFooter', $true)) {
|
||||
$versionFooter.BackColor = $script:Theme.PanelAlt
|
||||
$versionFooter.ForeColor = if ($versionFooter.Tag) { [System.Drawing.ColorTranslator]::FromHtml([string]$script:Theme.Danger) } else { $script:Theme.Secondary }
|
||||
$versionFooter.Invalidate()
|
||||
}
|
||||
$script:cmbTheme.BackColor = $script:Theme.Panel
|
||||
$script:cmbTheme.ForeColor = $script:Theme.Text
|
||||
$script:cmbTheme.Invalidate()
|
||||
|
||||
Reference in new issue
Block a user