@@ -454,9 +454,7 @@ $form.Text = "XFlags"
454454$form.MaximizeBox = $false
455455$form.MinimizeBox = $false
456456$form.StartPosition = " CenterScreen"
457- $form.FormBorderStyle = [System.Windows.Forms.FormBorderStyle ]::FixedSingle
458- $form.KeyPreview = $true
459- $form.BackColor = [System.Drawing.Color ]::FromArgb(44 , 44 , 44 )
457+ $form.FormBorderStyle = [System.Windows.Forms.FormBorderStyle ]::FixedSingle
460458$form.Add_KeyDown ({
461459 param ($sender , $e )
462460 if ($e.KeyCode -eq [System.Windows.Forms.Keys ]::F5) {
@@ -467,9 +465,7 @@ $form.Add_KeyDown({
467465$listBoxProcesses = New-Object System.Windows.Forms.ListBox
468466$listBoxProcesses.Location = New-Object System.Drawing.Point(10 , 28 )
469467$listBoxProcesses.Size = New-Object System.Drawing.Size(150 , 250 )
470- $listBoxProcesses.BorderStyle = [System.Windows.Forms.BorderStyle ]::FixedSingle
471- $listBoxProcesses.BackColor = [System.Drawing.Color ]::FromArgb(44 , 44 , 44 )
472- $listBoxProcesses.ForeColor = [System.Drawing.Color ]::White
468+ $listBoxProcesses.BorderStyle = [System.Windows.Forms.BorderStyle ]::FixedSingle
473469$form.Controls.Add ($listBoxProcesses )
474470$listBoxProcesses.add_SelectedIndexChanged ({
475471 # Obtener el proceso seleccionado
@@ -517,9 +513,6 @@ $rdbtnProcess.Text = "Process"
517513$rdbtnProcess.Size = New-Object System.Drawing.Size(70 , 20 )
518514$rdbtnProcess.Location = New-Object System.Drawing.Point(10 , 280 )
519515$rdbtnProcess.Checked = $true
520- $rdbtnProcess.UseVisualStyleBackColor = $false
521- $rdbtnProcess.BackColor = [System.Drawing.Color ]::Transparent
522- $rdbtnProcess.ForeColor = [System.Drawing.Color ]::White
523516$form.Controls.Add ($rdbtnProcess )
524517$rdbtnProcess.add_CheckedChanged ({
525518 Load- Processes- Ifeo
@@ -530,9 +523,6 @@ $rdbtnConfig = New-Object System.Windows.Forms.RadioButton
530523$rdbtnConfig.Text = " Config"
531524$rdbtnConfig.Size = New-Object System.Drawing.Size(60 , 20 )
532525$rdbtnConfig.Location = New-Object System.Drawing.Point(80 , 280 )
533- $rdbtnConfig.UseVisualStyleBackColor = $false
534- $rdbtnConfig.BackColor = [System.Drawing.Color ]::Transparent
535- $rdbtnConfig.ForeColor = [System.Drawing.Color ]::White
536526$form.Controls.Add ($rdbtnConfig )
537527$rdbtnConfig.add_CheckedChanged ({
538528 Load- Processes- Ifeo
@@ -554,15 +544,12 @@ $tab.Add_SelectedIndexChanged({
554544# Ifeo
555545$tabIfeo = New-Object System.Windows.Forms.TabPage
556546$tabIfeo.Text = " General"
557- $tabIfeo.BackColor = [System.Drawing.Color ]::FromArgb(44 , 44 , 44 )
558547
559548# PriorityClass
560549$labelCpuPriority = New-Object System.Windows.Forms.Label
561550$labelCpuPriority.Location = New-Object System.Drawing.Point(210 , 20 )
562551$labelCpuPriority.Size = New-Object System.Drawing.Size(80 , 13 )
563552$labelCpuPriority.Text = " PriorityClass:"
564- $labelCpuPriority.ForeColor = [System.Drawing.Color ]::White
565- $labelCpuPriority.BackColor = [System.Drawing.Color ]::Transparent
566553$tabIfeo.Controls.Add ($labelCpuPriority )
567554
568555$comboBoxCpuPriority = New-Object System.Windows.Forms.ComboBox
@@ -571,17 +558,13 @@ $comboBoxCpuPriority.Size = New-Object System.Drawing.Size(95, 23)
571558$comboBoxCpuPriority.Items.AddRange (@ (" Realtime (4)" , " High (3)" , " Above Normal (6)" , " Normal (2)" , " Below Normal (5)" , " Low (1)" , " default (delete)" ))
572559$comboBoxCpuPriority.Text = " default (delete)"
573560$comboBoxCpuPriority.DropDownStyle = [System.Windows.Forms.ComboBoxStyle ]::DropDownList
574- $comboBoxCpuPriority.ForeColor = [System.Drawing.Color ]::White
575- $comboBoxCpuPriority.BackColor = [System.Drawing.Color ]::FromArgb(66 , 66 , 66 )
576561$tabIfeo.Controls.Add ($comboBoxCpuPriority )
577562
578563# IoPriority
579564$labelIoPriority = New-Object System.Windows.Forms.Label
580565$labelIoPriority.Location = New-Object System.Drawing.Point(210 , 70 )
581566$labelIoPriority.Size = New-Object System.Drawing.Size(60 , 13 )
582567$labelIoPriority.Text = " IoPriority:"
583- $labelIoPriority.ForeColor = [System.Drawing.Color ]::White
584- $labelIoPriority.BackColor = [System.Drawing.Color ]::Transparent
585568$tabIfeo.Controls.Add ($labelIoPriority )
586569
587570$comboBoxIoPriority = New-Object System.Windows.Forms.ComboBox
@@ -591,17 +574,13 @@ $comboBoxIoPriority.Items.AddRange(@("Critical (4)", "High (3)", "Normal (2)", "
591574$comboBoxIoPriority.Text = " default (delete)"
592575$comboBoxIoPriority.DropDownStyle = [System.Windows.Forms.ComboBoxStyle ]::DropDownList
593576$comboBoxIoPriority.DropDownStyle = [System.Windows.Forms.ComboBoxStyle ]::DropDownList
594- $comboBoxIoPriority.ForeColor = [System.Drawing.Color ]::White
595- $comboBoxIoPriority.BackColor = [System.Drawing.Color ]::FromArgb(66 , 66 , 66 )
596577$tabIfeo.Controls.Add ($comboBoxIoPriority )
597578
598579# MemPriority
599580$labelMemPriority = New-Object System.Windows.Forms.Label
600581$labelMemPriority.Location = New-Object System.Drawing.Point(210 , 120 )
601582$labelMemPriority.Size = New-Object System.Drawing.Size(85 , 13 )
602583$labelMemPriority.Text = " PagePriority:"
603- $labelMemPriority.ForeColor = [System.Drawing.Color ]::White
604- $labelMemPriority.BackColor = [System.Drawing.Color ]::Transparent
605584$tabIfeo.Controls.Add ($labelMemPriority )
606585
607586$comboBoxPagePriority = New-Object System.Windows.Forms.ComboBox
@@ -611,17 +590,13 @@ $comboBoxPagePriority.Items.AddRange(@("Normal (5)", "Below Normal (4)", "Medium
611590$comboBoxPagePriority.Text = " default (delete)"
612591$comboBoxPagePriority.DropDownStyle = [System.Windows.Forms.ComboBoxStyle ]::DropDownList
613592$comboBoxPagePriority.DropDownStyle = [System.Windows.Forms.ComboBoxStyle ]::DropDownList
614- $comboBoxPagePriority.ForeColor = [System.Drawing.Color ]::White
615- $comboBoxPagePriority.BackColor = [System.Drawing.Color ]::FromArgb(66 , 66 , 66 )
616593$tabIfeo.Controls.Add ($comboBoxPagePriority )
617594
618595# LargePages
619596$chkbLargePages = New-Object System.Windows.Forms.CheckBox
620597$chkbLargePages.Location = New-Object System.Drawing.Point(210 , 172 )
621598$chkbLargePages.Size = New-Object System.Drawing.Size(105 , 20 )
622599$chkbLargePages.Text = " UseLargePages"
623- $chkbLargePages.ForeColor = [System.Drawing.Color ]::White
624- $chkbLargePages.BackColor = [System.Drawing.Color ]::Transparent
625600$tabIfeo.Controls.Add ($chkbLargePages )
626601$tooltip = New-Object System.Windows.Forms.ToolTip
627602$tooltip.SetToolTip ($chkbLargePages , " Enable Large Pages if possible" )
@@ -631,26 +606,18 @@ $labelDbgr = New-Object System.Windows.Forms.Label
631606$labelDbgr.Location = New-Object System.Drawing.Point(170 , 210 )
632607$labelDbgr.Size = New-Object System.Drawing.Size(70 , 13 )
633608$labelDbgr.Text = " Debugger:"
634- $labelDbgr.ForeColor = [System.Drawing.Color ]::White
635- $labelDbgr.BackColor = [System.Drawing.Color ]::Transparent
636609$tabIfeo.Controls.Add ($labelDbgr )
637610
638611$txtDbgr = New-Object System.Windows.Forms.TextBox
639612$txtDbgr.Location = New-Object System.Drawing.Point(170 , 228 )
640613$txtDbgr.Size = New-Object System.Drawing.Size(150 , 20 )
641614$txtDbgr.BorderStyle = [System.Windows.Forms.BorderStyle ]::FixedSingle
642- $txtDbgr.BackColor = [System.Drawing.Color ]::FromArgb(44 , 44 , 44 )
643- $txtDbgr.ForeColor = [System.Drawing.Color ]::White
644615$tabIfeo.Controls.Add ($txtDbgr )
645616
646617$btnSearchDbg = New-Object System.Windows.Forms.Button
647618$btnSearchDbg.Location = New-Object System.Drawing.Point(325 , 228 )
648619$btnSearchDbg.Size = New-Object System.Drawing.Size(25 , 20 )
649620$btnSearchDbg.Text = " ..."
650- $btnSearchDbg.FlatStyle = [System.Windows.Forms.FlatStyle ]::Flat
651- $btnSearchDbg.BackColor = [System.Drawing.Color ]::FromArgb(66 , 66 , 66 )
652- $btnSearchDbg.ForeColor = [System.Drawing.Color ]::White
653- $btnSearchDbg.FlatAppearance.BorderSize = 0
654621$tabIfeo.Controls.Add ($btnSearchDbg )
655622$btnSearchDbg.Add_Click ({
656623 # Crear el OpenFileDialog
@@ -676,10 +643,6 @@ $buttonSave = New-Object System.Windows.Forms.Button
676643$buttonSave.Location = New-Object System.Drawing.Point(230 , 260 )
677644$buttonSave.Size = New-Object System.Drawing.Size(50 , 20 )
678645$buttonSave.Text = " Save"
679- $buttonSave.FlatStyle = [System.Windows.Forms.FlatStyle ]::Flat
680- $buttonSave.BackColor = [System.Drawing.Color ]::FromArgb(66 , 66 , 66 )
681- $buttonSave.ForeColor = [System.Drawing.Color ]::White
682- $buttonSave.FlatAppearance.BorderSize = 0
683646$tabIfeo.Controls.Add ($buttonSave )
684647
685648# aplicar todos los cambios
@@ -725,15 +688,12 @@ $buttonSave.Add_Click({
725688# ## MitigationOptions
726689$tabMit = New-Object System.Windows.Forms.TabPage
727690$tabMit.Text = " MitigationOptions"
728- $tabMit.BackColor = [System.Drawing.Color ]::FromArgb(44 , 44 , 44 )
729691
730692# MitigationBitmask
731693$labelMit = New-Object System.Windows.Forms.Label
732694$labelMit.Location = New-Object System.Drawing.Point(180 , 10 )
733695$labelMit.Size = New-Object System.Drawing.Size(250 , 13 )
734696$labelMit.Text = " BitMask: 0x0"
735- $labelMit.ForeColor = [System.Drawing.Color ]::White
736- $labelMit.BackColor = [System.Drawing.Color ]::Transparent
737697$tabMit.Controls.Add ($labelMit )
738698
739699# Configuración de posición inicial y dimensiones del área visible
@@ -755,8 +715,6 @@ foreach ($option in $mitigationOptions) {
755715 $checkbox.ThreeState = $true
756716 $checkbox.Location = New-Object System.Drawing.Point($currentX , $currentY )
757717 $checkbox.Size = New-Object System.Drawing.Size(100 , 20 ) # Ajustar el tamaño del CheckBox
758- $checkbox.ForeColor = [System.Drawing.Color ]::White
759- $checkbox.BackColor = [System.Drawing.Color ]::Transparent
760718 $tabMit.Controls.Add ($checkbox )
761719 $checkbox.Add_Click ({
762720 switch ($checkbox.CheckState ) {
@@ -803,8 +761,6 @@ foreach ($option in $otherMitigationOptions){
803761 $width = ($option.Name ).Length + 60
804762 $checkbox.Location = New-Object System.Drawing.Point($currentX , 225 )
805763 $checkbox.Size = New-Object System.Drawing.Size($width , 20 ) # Ajustar el tamaño del CheckBox
806- $checkbox.ForeColor = [System.Drawing.Color ]::White
807- $checkbox.BackColor = [System.Drawing.Color ]::Transparent
808764 $tabMit.Controls.Add ($checkbox )
809765 $checkbox.Add_Click ({
810766 Update-MitigationMask
@@ -823,10 +779,6 @@ $btnResetMit = New-Object System.Windows.Forms.Button
823779$btnResetMit.Location = New-Object System.Drawing.Point(255 , 255 )
824780$btnResetMit.Size = New-Object System.Drawing.Size(90 , 20 )
825781$btnResetMit.Text = " ResetMask"
826- $btnResetMit.FlatStyle = [System.Windows.Forms.FlatStyle ]::Flat
827- $btnResetMit.BackColor = [System.Drawing.Color ]::FromArgb(66 , 66 , 66 )
828- $btnResetMit.ForeColor = [System.Drawing.Color ]::White
829- $btnResetMit.FlatAppearance.BorderSize = 0
830782$tabMit.Controls.Add ($btnResetMit )
831783$btnResetMit.Add_Click ({
832784 Reset-Checkboxes - parentControl $tabMit
@@ -838,26 +790,19 @@ $btnResetMit.Add_Click({
838790# ## GFlags
839791$tabGFlags = New-Object System.Windows.Forms.TabPage
840792$tabGFlags.Text = " Gflags"
841- $tabGFlags.BackColor = [System.Drawing.Color ]::FromArgb(44 , 44 , 44 )
842793
843794# GFlagBitmask
844795$labelGFlags = New-Object System.Windows.Forms.Label
845796$labelGFlags.Location = New-Object System.Drawing.Point(180 , 10 )
846797$labelGFlags.Size = New-Object System.Drawing.Size(200 , 13 )
847798$labelGFlags.Text = " BitMask: 0x0"
848- $labelGFlags.BackColor = [System.Drawing.Color ]::Transparent
849- $labelGFlags.ForeColor = [System.Drawing.Color ]::White
850799$tabGFlags.Controls.Add ($labelGFlags )
851800
852801# ResetMask
853802$btnResetFlags = New-Object System.Windows.Forms.Button
854803$btnResetFlags.Location = New-Object System.Drawing.Point(255 , 255 )
855804$btnResetFlags.Size = New-Object System.Drawing.Size(90 , 20 )
856805$btnResetFlags.Text = " ResetMask"
857- $btnResetFlags.FlatStyle = [System.Windows.Forms.FlatStyle ]::Flat
858- $btnResetFlags.BackColor = [System.Drawing.Color ]::FromArgb(66 , 66 , 66 )
859- $btnResetFlags.ForeColor = [System.Drawing.Color ]::White
860- $btnResetFlags.FlatAppearance.BorderSize = 0
861806$tabGFlags.Controls.Add ($btnResetFlags )
862807$btnResetFlags.Add_Click ({
863808 Reset-Checkboxes - parentControl $tabGFlags
@@ -884,8 +829,6 @@ foreach ($flag in $flags) {
884829 $checkbox.Text = $flag.Abbreviation
885830 $checkbox.Location = New-Object System.Drawing.Point($currentX , $currentY )
886831 $checkbox.Size = New-Object System.Drawing.Size(55 , 20 ) # Ajustar el tamaño del CheckBox
887- $checkbox.BackColor = [System.Drawing.Color ]::Transparent
888- $checkbox.ForeColor = [System.Drawing.Color ]::White
889832 $tabGFlags.Controls.Add ($checkbox )
890833
891834 $checkbox.Add_Click ({
0 commit comments