refactor(gui): Add a function to get all the colors

- Used colors should be accessible through this function
main
Plínio Larrubia 2 years ago committed by Plínio Larrubia
parent 20f911b1ab
commit d50e60afe4
No known key found for this signature in database
GPG Key ID: 057B0A87CB137C69

@ -1,4 +1,4 @@
# Learned from: https://docs.microsoft.com/en-us/powershell/scripting/samples/creating-a-custom-input-box?view=powershell-7.1
# Learned from: https://docs.microsoft.com/en-us/powershell/scripting/samples/creating-a-custom-input-box?view=powershell-7.1
# Adapted majorly from https://github.com/ChrisTitusTech/win10script and https://github.com/Sycnex/Windows10Debloater
# Take Ownership tweak from: https://www.howtogeek.com/howto/windows-vista/add-take-ownership-to-explorer-right-click-menu-in-vista/
@ -28,6 +28,7 @@ function Main() {
Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"set-console-style.psm1" -Force
Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"start-logging.psm1" -Force
Import-Module -DisableNameChecking $PSScriptRoot\src\lib\"title-templates.psm1" -Force
Import-Module -DisableNameChecking $PSScriptRoot\src\lib\ui\"get-default-color.psm1" -Force
Import-Module -DisableNameChecking $PSScriptRoot\src\lib\ui\"get-screen-resolution.psm1" -Force
Import-Module -DisableNameChecking $PSScriptRoot\src\lib\ui\"new-layout-page.psm1" -Force
Import-Module -DisableNameChecking $PSScriptRoot\src\lib\ui\"show-message-dialog.psm1" -Force
@ -108,21 +109,9 @@ function Show-GUI() {
Add-Type -AssemblyName System.Drawing
[System.Windows.Forms.Application]::EnableVisualStyles() # Rounded Buttons :3
$Colors, $BrandColors = Get-DefaultColor # Load the Colors used in this script
Set-UIFont # Load the Layout Font
# <===== PERSONAL COLORS =====>
$WarningYellow = "#EED202"
$White = "#FFFFFF"
$WinBlue = "#08ABF7"
$WinDark = "#252525"
# Miscellaneous colors
$AmdRyzenPrimaryColor = "#E4700D"
$IntelPrimaryColor = "#0071C5"
$NVIDIAPrimaryColor = "#76B900"
# <===== Specific Layout =====>
$LayoutT1 = New-LayoutPage -NumOfPanels 3 -PanelHeight 960
@ -131,7 +120,7 @@ function Show-GUI() {
# <===== UI =====>
# Main Window:
$Form = New-Form -Width $LayoutT1.FormWidth -Height $LayoutT1.FormHeight -Text "Win Debloat Tools (LeDragoX) | $(Get-SystemSpec)" -BackColor "$WinDark" -Maximize $false # Loading the specs takes longer time to load the GUI
$Form = New-Form -Width $LayoutT1.FormWidth -Height $LayoutT1.FormHeight -Text "Win Debloat Tools (LeDragoX) | $(Get-SystemSpec)" -BackColor $BrandColors.Win.Dark -Maximize $false # Loading the specs takes longer time to load the GUI
$Form = New-FormIcon -Form $Form -ImageLocation "$PSScriptRoot\src\assets\script-icon-32px.png"
@ -139,8 +128,8 @@ function Show-GUI() {
$TabSystemTweaks = New-TabPage -Name "Tab1" -Text "System Tweaks"
$TabSoftwareInstall = New-TabPage -Name "Tab2" -Text "Software Install"
$TlSystemTweaks = New-Label -Text "System Tweaks" -Width $LayoutT1.TotalWidth -Height $LayoutT1.TitleLabelHeight -LocationX 0 -LocationY $TitleLabelY -FontSize $LayoutT1.Heading[0] -FontStyle "Bold" -ForeColor $WinBlue
$ClSystemTweaks = New-Label -Text "$CurrentFileName v$CurrentFileLastModified" -Width $LayoutT1.TotalWidth -Height $LayoutT1.CaptionLabelHeight -LocationX 0 -FontSize $LayoutT1.Heading[1] -ElementBefore $TlSystemTweaks -MarginTop $LayoutT1.DistanceBetweenElements -ForeColor $White
$TlSystemTweaks = New-Label -Text "System Tweaks" -Width $LayoutT1.TotalWidth -Height $LayoutT1.TitleLabelHeight -LocationX 0 -LocationY $TitleLabelY -FontSize $LayoutT1.Heading[0] -FontStyle "Bold" -ForeColor $Colors.Cyan
$ClSystemTweaks = New-Label -Text "$CurrentFileName v$CurrentFileLastModified" -Width $LayoutT1.TotalWidth -Height $LayoutT1.CaptionLabelHeight -LocationX 0 -FontSize $LayoutT1.Heading[1] -ElementBefore $TlSystemTweaks -MarginTop $LayoutT1.DistanceBetweenElements -ForeColor $Colors.White
# ==> Tab 1
$CurrentPanelIndex = 0
@ -170,11 +159,11 @@ function Show-GUI() {
# ==> T1 Panel 2
$ClDebloatTools = New-Label -Text "System Debloat Tools" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.CaptionLabelHeight -LocationX $LayoutT1.PanelElementX -LocationY 0 -FontSize $LayoutT1.Heading[2] -FontStyle 'Bold'
$ApplyTweaks = New-Button -Text "Apply Tweaks" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.ButtonHeight -LocationX $LayoutT1.PanelElementX -ElementBefore $ClDebloatTools -FontSize $LayoutT1.Heading[3] -FontStyle 'Bold' -ForeColor $WinBlue
$UndoTweaks = New-Button -Text "Undo Tweaks" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.ButtonHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $ApplyTweaks -MarginTop $LayoutT1.DistanceBetweenElements -ForeColor $WarningYellow
$RemoveMSEdge = New-Button -Text "Remove Microsoft Edge" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.ButtonHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $UndoTweaks -MarginTop $LayoutT1.DistanceBetweenElements -ForeColor $WarningYellow
$RemoveOneDrive = New-Button -Text "Remove OneDrive" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.ButtonHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $RemoveMSEdge -MarginTop $LayoutT1.DistanceBetweenElements -ForeColor $WarningYellow
$RemoveXbox = New-Button -Text "Remove Xbox" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.ButtonHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $RemoveOneDrive -MarginTop $LayoutT1.DistanceBetweenElements -ForeColor $WarningYellow
$ApplyTweaks = New-Button -Text "Apply Tweaks" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.ButtonHeight -LocationX $LayoutT1.PanelElementX -ElementBefore $ClDebloatTools -FontSize $LayoutT1.Heading[3] -FontStyle 'Bold' -ForeColor $Colors.Cyan
$UndoTweaks = New-Button -Text "Undo Tweaks" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.ButtonHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $ApplyTweaks -MarginTop $LayoutT1.DistanceBetweenElements -ForeColor $Colors.WarningYellow
$RemoveMSEdge = New-Button -Text "Remove Microsoft Edge" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.ButtonHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $UndoTweaks -MarginTop $LayoutT1.DistanceBetweenElements -ForeColor $Colors.WarningYellow
$RemoveOneDrive = New-Button -Text "Remove OneDrive" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.ButtonHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $RemoveMSEdge -MarginTop $LayoutT1.DistanceBetweenElements -ForeColor $Colors.WarningYellow
$RemoveXbox = New-Button -Text "Remove Xbox" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.ButtonHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $RemoveOneDrive -MarginTop $LayoutT1.DistanceBetweenElements -ForeColor $Colors.WarningYellow
$PictureBox1 = New-PictureBox -ImageLocation "$PSScriptRoot\src\assets\script-image.png" -Width $LayoutT1.PanelElementWidth -Height (($LayoutT1.ButtonHeight * 4) + ($LayoutT1.DistanceBetweenElements * 4)) -LocationX $LayoutT1.PanelElementX -ElementBefore $RemoveXbox -MarginTop $LayoutT1.DistanceBetweenElements -SizeMode 'Zoom'
$ClInstallSystemApps = New-Label -Text "Install System Apps" -Width $LayoutT1.PanelWidth -Height $LayoutT1.CaptionLabelHeight -LocationX 0 -FontSize $LayoutT1.Heading[2] -FontStyle 'Bold' -ElementBefore $PictureBox1
@ -216,8 +205,8 @@ function Show-GUI() {
$CbFastShutdownPCShortcut = New-CheckBox -Text "Enable Fast Shutdown shortcut" -Width $LayoutT1.PanelElementWidth -Height $LayoutT1.CheckBoxHeight -LocationX $LayoutT1.PanelElementX -FontSize $LayoutT1.Heading[3] -ElementBefore $CbTakeOwnership
# ==> Tab 2
$TlSoftwareInstall = New-Label -Text "Software Install" -Width $LayoutT2.TotalWidth -Height $LayoutT2.TitleLabelHeight -LocationX 0 -LocationY $TitleLabelY -FontSize $LayoutT2.Heading[0] -FontStyle "Bold" -ForeColor $WinBlue
$ClSoftwareInstall = New-Label -Text "Package Managers: Winget and Chocolatey" -Width $LayoutT2.TotalWidth -Height $LayoutT2.CaptionLabelHeight -LocationX 0 -FontSize $LayoutT1.Heading[1] -ElementBefore $TlSoftwareInstall -MarginTop $LayoutT2.DistanceBetweenElements -ForeColor $White
$TlSoftwareInstall = New-Label -Text "Software Install" -Width $LayoutT2.TotalWidth -Height $LayoutT2.TitleLabelHeight -LocationX 0 -LocationY $TitleLabelY -FontSize $LayoutT2.Heading[0] -FontStyle "Bold" -ForeColor $Colors.Cyan
$ClSoftwareInstall = New-Label -Text "Package Managers: Winget and Chocolatey" -Width $LayoutT2.TotalWidth -Height $LayoutT2.CaptionLabelHeight -LocationX 0 -FontSize $LayoutT1.Heading[1] -ElementBefore $TlSoftwareInstall -MarginTop $LayoutT2.DistanceBetweenElements -ForeColor $Colors.White
$CurrentPanelIndex = 0
$T2Panel1 = New-Panel -Width $LayoutT2.PanelWidth -Height $LayoutT2.PanelHeight -LocationX ($LayoutT2.PanelWidth * $CurrentPanelIndex) -ElementBefore $ClSoftwareInstall
@ -229,12 +218,12 @@ function Show-GUI() {
$T2Panel4 = New-Panel -Width $LayoutT2.PanelWidth -Height $LayoutT2.PanelHeight -LocationX ($LayoutT2.PanelWidth * $CurrentPanelIndex) -ElementBefore $ClSoftwareInstall
# ==> T2 Panel 1
$UpgradeAll = New-Button -Text "Upgrade All Softwares" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.ButtonHeight -LocationX $LayoutT2.PanelElementX -LocationY 0 -FontSize $LayoutT2.Heading[3] -FontStyle 'Bold' -ForeColor $WinBlue
$UpgradeAll = New-Button -Text "Upgrade All Softwares" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.ButtonHeight -LocationX $LayoutT2.PanelElementX -LocationY 0 -FontSize $LayoutT2.Heading[3] -FontStyle 'Bold' -ForeColor $Colors.Cyan
$ClCpuGpuDrivers = New-Label -Text "CPU/GPU Drivers" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CaptionLabelHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[2] -FontStyle 'Bold' -ElementBefore $UpgradeAll
$InstallAmdRyzenChipsetDriver = New-CheckBox -Text "AMD Ryzen Chipset Driver" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $ClCpuGpuDrivers -ForeColor $AmdRyzenPrimaryColor
$InstallIntelDSA = New-CheckBox -Text "Intel® DSA" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $InstallAmdRyzenChipsetDriver -ForeColor $IntelPrimaryColor
$InstallNvidiaGeForceExperience = New-CheckBox -Text "NVIDIA GeForce Experience" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $InstallIntelDSA -ForeColor $NVIDIAPrimaryColor
$InstallAmdRyzenChipsetDriver = New-CheckBox -Text "AMD Ryzen Chipset Driver" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $ClCpuGpuDrivers -ForeColor $BrandColors.AMD.Ryzen
$InstallIntelDSA = New-CheckBox -Text "Intel® DSA" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $InstallAmdRyzenChipsetDriver -ForeColor $BrandColors.Intel
$InstallNvidiaGeForceExperience = New-CheckBox -Text "NVIDIA GeForce Experience" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $InstallIntelDSA -ForeColor $BrandColors.NVIDIA
$InstallNVCleanstall = New-CheckBox -Text "NVCleanstall" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $InstallNvidiaGeForceExperience
$ClApplicationRequirements = New-Label -Text "Application Requirements" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CaptionLabelHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[2] -FontStyle 'Bold' -ElementBefore $InstallNVCleanstall
@ -389,8 +378,8 @@ function Show-GUI() {
$InstallVSCodium = New-CheckBox -Text "VS Codium" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $InstallVSCode
$ClWsl = New-Label -Text "Windows Subsystem For Linux" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CaptionLabelHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[2] -FontStyle 'Bold' -ElementBefore $InstallVSCodium
$InstallWSL = New-CheckBox -Text "Install WSL" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $ClWsl -ForeColor $WinBlue
$InstallArchWSL = New-CheckBox -Text "ArchWSL (x64)" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $InstallWSL -ForeColor $WinBlue
$InstallWSL = New-CheckBox -Text "Install WSL" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $ClWsl -ForeColor $Colors.Cyan
$InstallArchWSL = New-CheckBox -Text "ArchWSL (x64)" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $InstallWSL -ForeColor $Colors.Cyan
$InstallDebian = New-CheckBox -Text "Debian GNU/Linux" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $InstallArchWSL
$InstallKaliLinux = New-CheckBox -Text "Kali Linux Rolling" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $InstallDebian
$InstallOpenSuse = New-CheckBox -Text "Open SUSE 42" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $InstallKaliLinux
@ -402,8 +391,8 @@ function Show-GUI() {
$ClDevelopment = New-Label -Text "⌨ Development on Windows" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CaptionLabelHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[2] -FontStyle 'Bold' -ElementBefore $InstallUbuntu20Lts
$InstallWindowsTerminal = New-CheckBox -Text "Windows Terminal" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $ClDevelopment
$InstallNerdFonts = New-CheckBox -Text "Install Nerd Fonts" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $InstallWindowsTerminal -ForeColor $WinBlue
$InstallGitGnupgSshSetup = New-CheckBox -Text "Git + GnuPG + SSH (Setup)" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $InstallNerdFonts -ForeColor $WinBlue
$InstallNerdFonts = New-CheckBox -Text "Install Nerd Fonts" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $InstallWindowsTerminal -ForeColor $Colors.Cyan
$InstallGitGnupgSshSetup = New-CheckBox -Text "Git + GnuPG + SSH (Setup)" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $InstallNerdFonts -ForeColor $Colors.Cyan
$InstallAdb = New-CheckBox -Text "Android Debug Bridge (ADB)" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $InstallGitGnupgSshSetup
$InstallAndroidStudio = New-CheckBox -Text "Android Studio" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $InstallAdb
$InstallDockerDesktop = New-CheckBox -Text "Docker Desktop" -Width $LayoutT2.PanelElementWidth -Height $LayoutT2.CheckBoxHeight -LocationX $LayoutT2.PanelElementX -FontSize $LayoutT2.Heading[3] -ElementBefore $InstallAndroidStudio
@ -1561,12 +1550,12 @@ function Show-GUI() {
$Script:UninstallSwitch = $false
$InstallSelected.Text = "Install Selected"
$UninstallMode.Text = "[OFF] Uninstall Mode"
$UninstallMode.ForeColor = $White
$UninstallMode.ForeColor = $Colors.White
} Else {
$Script:UninstallSwitch = $true
$InstallSelected.Text = "Uninstall Selected"
$UninstallMode.Text = "[ON] Uninstall Mode"
$UninstallMode.ForeColor = $WarningYellow
$UninstallMode.ForeColor = $Colors.WarningYellow
}
})

@ -0,0 +1,19 @@
function Get-DefaultColor() {
$Colors = @{
Cyan = "#25F7D8"
DarkGray = "#2C2C2C"
Green = "#55EE00"
LightGreen = "#9CFF75"
WarningYellow = "#EED202"
White = "#FEFEFE"
}
$BrandColors = @{
AMD = @{ Ryzen = "#E4700D" }
Intel = "#0071C5"
NVIDIA = "#76B900"
Win = @{ Blue = "#08ABF7"; Dark = "#252525" }
}
return $Colors, $BrandColors
}

@ -1,4 +1,5 @@
Import-Module -DisableNameChecking $PSScriptRoot\..\"title-templates.psm1"
Import-Module -DisableNameChecking $PSScriptRoot\"get-default-color.psm1"
# Adapted from: https://stackoverflow.com/a/35965782
# Adapted from: https://www.osdeploy.com/modules/pshot/technical/resolution-scale-and-dpi
@ -8,6 +9,7 @@ Import-Module -DisableNameChecking $PSScriptRoot\..\"title-templates.psm1"
Add-Type -AssemblyName System.Windows.Forms
Add-Type -AssemblyName System.Drawing
[System.Windows.Forms.Application]::EnableVisualStyles() # Rounded Buttons :3 (Win 11)
$Colors, $BrandColors = Get-DefaultColor # Load the Colors used in this script
function Set-UIFont() {
[CmdletBinding()] param ()
@ -107,7 +109,7 @@ function New-Form() {
[Int] $Width,
[Int] $Height,
[String] $Text,
[String] $BackColor = "#252525", # Windows Dark
[String] $BackColor = $BrandColors.Win.Dark,
[Bool] $Minimize = $true,
[Bool] $Maximize = $true,
[ValidateSet('FixedSingle', 'FixedSingle', 'Fixed3D', 'FixedDialog', 'Sizable', 'FixedToolWindow', 'SizableToolWindow')]
@ -158,8 +160,8 @@ function New-TabControl() {
[Int] $Height,
[Int] $LocationX,
[Int] $LocationY,
[String] $ForeColor = "#FFFFFF", # White
[String] $BackColor = "#252525" # Windows Dark
[String] $ForeColor = $BrandColors.White,
[String] $BackColor = $BrandColors.WinDark
)
$FormTabControl = New-object System.Windows.Forms.TabControl
@ -177,8 +179,8 @@ function New-TabPage() {
param (
[String] $Name,
[String] $Text,
[String] $ForeColor = "#FFFFFF", # White
[String] $BackColor = "#252525" # Windows Dark
[String] $ForeColor = $Colors.White,
[String] $BackColor = $BrandColors.Win.Dark
)
$FormTabPage = New-object System.Windows.Forms.TabPage
@ -239,7 +241,7 @@ function New-Label() {
[Int] $FontSize,
[ValidateSet('Bold', 'Italic', 'Regular', 'Strikeout', 'Underline')]
[String] $FontStyle = "Regular",
[String] $ForeColor = "#55EE00", # Green
[String] $ForeColor = "#9CFF75", # Light Green
[ValidateSet('TopLeft', 'TopCenter', 'TopRight', 'MiddleLeft', 'MiddleCenter', 'MiddleRight', 'BottomLeft', 'BottomCenter', 'BottomRight')]
[String] $TextAlign = "MiddleCenter"
)
@ -277,8 +279,8 @@ function New-Button() {
[Int] $FontSize,
[ValidateSet('Bold', 'Italic', 'Regular', 'Strikeout', 'Underline')]
[String] $FontStyle = "Regular",
[String] $ForeColor = "#FFFFFF", # White
[String] $BackColor = "#2C2C2C", # Dark Gray
[String] $ForeColor = $Colors.White,
[String] $BackColor = $Colors.DarkGray,
[ValidateSet('TopLeft', 'TopCenter', 'TopRight', 'MiddleLeft', 'MiddleCenter', 'MiddleRight', 'BottomLeft', 'BottomCenter', 'BottomRight')]
[String] $TextAlign = "MiddleCenter",
[ValidateSet('Flat', 'Popup', 'Standard', 'System')]
@ -322,8 +324,8 @@ function New-CheckBox() {
[Int] $FontSize,
[ValidateSet('Bold', 'Italic', 'Regular', 'Strikeout', 'Underline')]
[String] $FontStyle = "Italic",
[String] $ForeColor = "#FFFFFF", # White
[String] $BackColor = "#2C2C2C", # Dark Gray
[String] $ForeColor = $Colors.White,
[String] $BackColor = $Colors.DarkGray,
[ValidateSet('TopLeft', 'TopCenter', 'TopRight', 'MiddleLeft', 'MiddleCenter', 'MiddleRight', 'BottomLeft', 'BottomCenter', 'BottomRight')]
[String] $TextAlign = "MiddleLeft"
)

Loading…
Cancel
Save