mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-24 11:55:31 +00:00
[01] Refactoring UI code (#2274)
* Update Documentation for 'Get-TabXaml' Function * Add More checks for Passed Parameters for 'Get-TabXaml' Function & A One Line change * Make 'Get-TabXaml' Function do Proper Indentation to the Generated XML String & Add more Theming Options * Re-formatting for a few lines in 'Get-TabXaml' Function * Improve UI a bit * Fix Buttons for Config Tab * Add optional 'ButtonWidth' Field to Config Json Files that use 'Button' Type * Simple Code Formatting in 'inputXML.xaml' File * Make naming More Clear to the Developers Rename the name of an element from 'CheckboxFilterClear' to 'SearchBarClearButton' and renamed style from 'ClearButtonStyle' to 'SearchBarClearButtonStyle' * Rename 'FontFamilyHeading' to 'HeaderFontFamily' to match conventions & Make new Theming Property called 'SearchBarClearButtonFontSize' * Remove Un-necessary 'ToString' Convertion in 'Get-TabXaml' Function * Make naming More Clear to the Developers again Rename the name of an element from 'CheckboxFilter' to 'SearchBar'.. although after some realization.. the naming might make sense at first, because it filters only the checkboxes.. but CheckBoxFilter is less "Intutive" when saying it compared to "SearchBar".. _This's my own opinion, and it can reverted easily with git if needed._ * Remove Un-necessary Attributes in 'Get-TabXaml' Private Function * Improve UI a bit * Improve UI a bit * Re-order some tweaks & Update their Content Fields to be more descriptive * Remove the changing 'Off' & 'On' TextBlock next to Toggle Button/Checkbox Removed it as it only takes up space in the right side of the Toggle Button/Checkbox, as well as making it difficult to correctly align it when change from/to 'On' & 'Off' Text, * Some changes to the Generated Toggle Button/Checkbox in 'Get-TabXaml' Private Function Increase the Side Margins of Toggle Button/Checkbox, as well as Change its side to be on the Left hand-side of the Label, rather then the Right hand-side.
This commit is contained in:
parent
b47036630c
commit
6b73f71876
@ -184,90 +184,104 @@
|
||||
"category": "Features",
|
||||
"panel": "1",
|
||||
"Order": "a060_",
|
||||
"Type": "150"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFPanelAutologin": {
|
||||
"Content": "Set Up Autologin",
|
||||
"category": "Fixes",
|
||||
"Order": "a040_",
|
||||
"panel": "1",
|
||||
"Type": "300"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFFixesUpdate": {
|
||||
"Content": "Reset Windows Update",
|
||||
"category": "Fixes",
|
||||
"panel": "1",
|
||||
"Order": "a041_",
|
||||
"Type": "300"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFFixesNetwork": {
|
||||
"Content": "Reset Network",
|
||||
"category": "Fixes",
|
||||
"Order": "a042_",
|
||||
"panel": "1",
|
||||
"Type": "300"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFPanelDISM": {
|
||||
"Content": "System Corruption Scan",
|
||||
"category": "Fixes",
|
||||
"panel": "1",
|
||||
"Order": "a043_",
|
||||
"Type": "300"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFFixesWinget": {
|
||||
"Content": "WinGet Reinstall",
|
||||
"category": "Fixes",
|
||||
"panel": "1",
|
||||
"Order": "a044_",
|
||||
"Type": "300"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFRunAdobeCCCleanerTool": {
|
||||
"Content": "Remove Adobe Creative Cloud",
|
||||
"category": "Fixes",
|
||||
"panel": "1",
|
||||
"Order": "a045_",
|
||||
"Type": "300"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFPanelnetwork": {
|
||||
"Content": "Network Connections",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "200"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFPanelcontrol": {
|
||||
"Content": "Control Panel",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "200"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFPanelpower": {
|
||||
"Content": "Power Panel",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "200"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFPanelregion": {
|
||||
"Content": "Region",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "200"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFPanelsound": {
|
||||
"Content": "Sound Settings",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "200"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFPanelsystem": {
|
||||
"Content": "System Properties",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "200"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFPaneluser": {
|
||||
"Content": "User Accounts",
|
||||
"category": "Legacy Windows Panels",
|
||||
"panel": "2",
|
||||
"Type": "200"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,30 @@
|
||||
{
|
||||
"Classic": {
|
||||
"CustomDialogFontSize": "12",
|
||||
"CustomDialogFontSizeHeader": "14",
|
||||
"CustomDialogIconSize": "25",
|
||||
"CustomDialogWidth": "400",
|
||||
"CustomDialogHeight": "200",
|
||||
|
||||
"FontSize": "12",
|
||||
"FontFamily": "Arial",
|
||||
"FontSizeHeading": "14",
|
||||
"HeaderFontFamily": "Consolas, Monaco",
|
||||
|
||||
"CheckBoxBulletDecoratorFontSize": "14",
|
||||
"CheckBoxMargin": "15,0,0,2",
|
||||
|
||||
"TabButtonFontSize": "14",
|
||||
"TabButtonWidth": "100",
|
||||
"TabButtonHeight": "25",
|
||||
"TabRowHeightInPixels": "50",
|
||||
"IconFontSize": "14",
|
||||
"IconButtonSize": "35",
|
||||
"WinUtilIconSize": "Auto",
|
||||
"SettingsIconFontSize": "18",
|
||||
|
||||
"MicroWinLogoSize": "10",
|
||||
|
||||
"ComboBoxBackgroundColor": "#FFFFFF",
|
||||
"LabelboxForegroundColor": "#000000",
|
||||
"MainForegroundColor": "#000000",
|
||||
@ -9,6 +34,18 @@
|
||||
"LinkHoverForegroundColor": "#000000",
|
||||
"GroupBorderBackgroundColor": "#000000",
|
||||
"ComboBoxForegroundColor": "#000000",
|
||||
|
||||
"ButtonFontSize": "12",
|
||||
"ButtonFontFamily": "Arial",
|
||||
"ButtonWidth": "200",
|
||||
"ButtonHeight": "25",
|
||||
"ConfigTabButtonFontSize": "16",
|
||||
|
||||
"SearchBarWidth": "200",
|
||||
"SearchBarHeight": "25",
|
||||
"SearchBarTextBoxFontSize": "16",
|
||||
"SearchBarClearButtonFontSize": "14",
|
||||
|
||||
"ButtonInstallBackgroundColor": "#FFFFFF",
|
||||
"ButtonTweaksBackgroundColor": "#FFFFFF",
|
||||
"ButtonConfigBackgroundColor": "#FFFFFF",
|
||||
@ -24,74 +61,148 @@
|
||||
"ButtonBackgroundSelectedColor": "#F0F0F0",
|
||||
"ButtonForegroundColor": "#000000",
|
||||
"ToggleButtonOnColor": "#2e77ff",
|
||||
|
||||
"ButtonBorderThickness": "1",
|
||||
"ButtonMargin": "1",
|
||||
"ButtonCornerRadius": "2",
|
||||
"ToggleButtonHeight": "25",
|
||||
"BorderColor": "#000000",
|
||||
"BorderOpacity": "0.2",
|
||||
"ShadowPulse": "Forever"
|
||||
},
|
||||
"Matrix": {
|
||||
"ComboBoxBackgroundColor": "#000000",
|
||||
"LabelboxForegroundColor": "#FFEE58",
|
||||
"MainForegroundColor": "#9CCC65",
|
||||
"MainBackgroundColor": "#000000",
|
||||
"LabelBackgroundColor": "#000000",
|
||||
"LinkForegroundColor": "#add8e6",
|
||||
"LinkHoverForegroundColor": "#FFFFFF",
|
||||
"ComboBoxForegroundColor": "#FFEE58",
|
||||
"ButtonInstallBackgroundColor": "#222222",
|
||||
"ButtonTweaksBackgroundColor": "#333333",
|
||||
"ButtonConfigBackgroundColor": "#444444",
|
||||
"ButtonUpdatesBackgroundColor": "#555555",
|
||||
"ButtonInstallForegroundColor": "#FFFFFF",
|
||||
"ButtonTweaksForegroundColor": "#FFFFFF",
|
||||
"ButtonConfigForegroundColor": "#FFFFFF",
|
||||
"ButtonUpdatesForegroundColor": "#FFFFFF",
|
||||
"ButtonBackgroundColor": "#000019",
|
||||
"ButtonBackgroundPressedColor": "#FFFFFF",
|
||||
"ButtonBackgroundMouseoverColor": "#A55A64",
|
||||
"ButtonBackgroundSelectedColor": "#FF5733",
|
||||
"ButtonForegroundColor": "#9CCC65",
|
||||
"ToggleButtonOnColor": "#2e77ff",
|
||||
"ButtonBorderThickness": "1",
|
||||
"ButtonMargin": "1",
|
||||
"ButtonCornerRadius": "2",
|
||||
"ToggleButtonHeight": "25",
|
||||
"BorderColor": "#FFAC1C",
|
||||
"BorderOpacity": "0.8",
|
||||
"ShadowPulse": "0:0:3"
|
||||
"CustomDialogFontSize": "12",
|
||||
"CustomDialogFontSizeHeader": "14",
|
||||
"CustomDialogIconSize": "25",
|
||||
"CustomDialogWidth": "400",
|
||||
"CustomDialogHeight": "200",
|
||||
|
||||
"FontSize": "12",
|
||||
"FontFamily": "Arial",
|
||||
"FontSizeHeading": "14",
|
||||
"HeaderFontFamily": "Consolas, Monaco",
|
||||
|
||||
"CheckBoxBulletDecoratorFontSize": "14",
|
||||
"CheckBoxMargin": "15,0,0,2",
|
||||
|
||||
"TabButtonFontSize": "14",
|
||||
"TabButtonWidth": "100",
|
||||
"TabButtonHeight": "25",
|
||||
"TabRowHeightInPixels": "50",
|
||||
"IconFontSize": "14",
|
||||
"IconButtonSize": "35",
|
||||
"WinUtilIconSize": "Auto",
|
||||
"SettingsIconFontSize": "18",
|
||||
|
||||
"MicroWinLogoSize": "10",
|
||||
|
||||
"ComboBoxBackgroundColor": "#000000",
|
||||
"LabelboxForegroundColor": "#FFEE58",
|
||||
"MainForegroundColor": "#9CCC65",
|
||||
"MainBackgroundColor": "#000000",
|
||||
"LabelBackgroundColor": "#000000",
|
||||
"LinkForegroundColor": "#add8e6",
|
||||
"LinkHoverForegroundColor": "#FFFFFF",
|
||||
"ComboBoxForegroundColor": "#FFEE58",
|
||||
|
||||
"ButtonFontSize": "12",
|
||||
"ButtonFontFamily": "Arial",
|
||||
"ButtonWidth": "200",
|
||||
"ButtonHeight": "25",
|
||||
"ConfigTabButtonFontSize": "16",
|
||||
|
||||
"SearchBarWidth": "200",
|
||||
"SearchBarHeight": "25",
|
||||
"SearchBarTextBoxFontSize": "16",
|
||||
"SearchBarClearButtonFontSize": "14",
|
||||
|
||||
"ButtonInstallBackgroundColor": "#222222",
|
||||
"ButtonTweaksBackgroundColor": "#333333",
|
||||
"ButtonConfigBackgroundColor": "#444444",
|
||||
"ButtonUpdatesBackgroundColor": "#555555",
|
||||
"ButtonInstallForegroundColor": "#FFFFFF",
|
||||
"ButtonTweaksForegroundColor": "#FFFFFF",
|
||||
"ButtonConfigForegroundColor": "#FFFFFF",
|
||||
"ButtonUpdatesForegroundColor": "#FFFFFF",
|
||||
"ButtonBackgroundColor": "#000019",
|
||||
"ButtonBackgroundPressedColor": "#FFFFFF",
|
||||
"ButtonBackgroundMouseoverColor": "#A55A64",
|
||||
"ButtonBackgroundSelectedColor": "#FF5733",
|
||||
"ButtonForegroundColor": "#9CCC65",
|
||||
"ToggleButtonOnColor": "#2e77ff",
|
||||
|
||||
"ButtonBorderThickness": "1",
|
||||
"ButtonMargin": "1",
|
||||
"ButtonCornerRadius": "2",
|
||||
"BorderColor": "#FFAC1C",
|
||||
"BorderOpacity": "0.8",
|
||||
"ShadowPulse": "0:0:3"
|
||||
},
|
||||
"Dark": {
|
||||
"ComboBoxBackgroundColor": "#000000",
|
||||
"LabelboxForegroundColor": "#FFEE58",
|
||||
"MainForegroundColor": "#9CCC65",
|
||||
"MainBackgroundColor": "#000000",
|
||||
"LabelBackgroundColor": "#000000",
|
||||
"LinkForegroundColor": "#add8e6",
|
||||
"LinkHoverForegroundColor": "#FFFFFF",
|
||||
"ComboBoxForegroundColor": "#FFEE58",
|
||||
"ButtonInstallBackgroundColor": "#222222",
|
||||
"ButtonTweaksBackgroundColor": "#333333",
|
||||
"ButtonConfigBackgroundColor": "#444444",
|
||||
"ButtonUpdatesBackgroundColor": "#555555",
|
||||
"ButtonInstallForegroundColor": "#FFFFFF",
|
||||
"ButtonTweaksForegroundColor": "#FFFFFF",
|
||||
"ButtonConfigForegroundColor": "#FFFFFF",
|
||||
"ButtonUpdatesForegroundColor": "#FFFFFF",
|
||||
"ButtonBackgroundColor": "#000019",
|
||||
"ButtonBackgroundPressedColor": "#9CCC65",
|
||||
"ButtonBackgroundMouseoverColor": "#FF5733",
|
||||
"ButtonBackgroundSelectedColor": "#FF5733",
|
||||
"ButtonForegroundColor": "#9CCC65",
|
||||
"ToggleButtonOnColor": "#2e77ff",
|
||||
"ButtonBorderThickness": "1",
|
||||
"ButtonMargin": "1",
|
||||
"ButtonCornerRadius": "2",
|
||||
"ToggleButtonHeight": "25",
|
||||
"BorderColor": "#FFAC1C",
|
||||
"BorderOpacity": "0.2",
|
||||
"ShadowPulse": "Forever"
|
||||
"CustomDialogFontSize": "12",
|
||||
"CustomDialogFontSizeHeader": "14",
|
||||
"CustomDialogIconSize": "25",
|
||||
"CustomDialogWidth": "400",
|
||||
"CustomDialogHeight": "200",
|
||||
|
||||
"FontSize": "12",
|
||||
"FontFamily": "Arial",
|
||||
"FontSizeHeading": "14",
|
||||
"HeaderFontFamily": "Consolas, Monaco",
|
||||
|
||||
"CheckBoxBulletDecoratorFontSize": "14",
|
||||
"CheckBoxMargin": "15,0,0,2",
|
||||
|
||||
"TabButtonFontSize": "14",
|
||||
"TabButtonWidth": "100",
|
||||
"TabButtonHeight": "25",
|
||||
"TabRowHeightInPixels": "50",
|
||||
"IconFontSize": "14",
|
||||
"IconButtonSize": "35",
|
||||
"WinUtilIconSize": "Auto",
|
||||
"SettingsIconFontSize": "18",
|
||||
|
||||
"MicroWinLogoSize": "10",
|
||||
|
||||
"ComboBoxBackgroundColor": "#000000",
|
||||
"LabelboxForegroundColor": "#FFEE58",
|
||||
"MainForegroundColor": "#9CCC65",
|
||||
"MainBackgroundColor": "#000000",
|
||||
"LabelBackgroundColor": "#000000",
|
||||
"LinkForegroundColor": "#add8e6",
|
||||
"LinkHoverForegroundColor": "#FFFFFF",
|
||||
"ComboBoxForegroundColor": "#FFEE58",
|
||||
|
||||
"ButtonFontSize": "12",
|
||||
"ButtonFontFamily": "Arial",
|
||||
"ButtonWidth": "200",
|
||||
"ButtonHeight": "25",
|
||||
"ConfigTabButtonFontSize": "16",
|
||||
|
||||
"SearchBarWidth": "200",
|
||||
"SearchBarHeight": "25",
|
||||
"SearchBarTextBoxFontSize": "16",
|
||||
"SearchBarClearButtonFontSize": "14",
|
||||
|
||||
"ButtonInstallBackgroundColor": "#222222",
|
||||
"ButtonTweaksBackgroundColor": "#333333",
|
||||
"ButtonConfigBackgroundColor": "#444444",
|
||||
"ButtonUpdatesBackgroundColor": "#555555",
|
||||
"ButtonInstallForegroundColor": "#FFFFFF",
|
||||
"ButtonTweaksForegroundColor": "#FFFFFF",
|
||||
"ButtonConfigForegroundColor": "#FFFFFF",
|
||||
"ButtonUpdatesForegroundColor": "#FFFFFF",
|
||||
"ButtonBackgroundColor": "#000019",
|
||||
"ButtonBackgroundPressedColor": "#9CCC65",
|
||||
"ButtonBackgroundMouseoverColor": "#FF5733",
|
||||
"ButtonBackgroundSelectedColor": "#FF5733",
|
||||
"ButtonForegroundColor": "#9CCC65",
|
||||
"ToggleButtonOnColor": "#2e77ff",
|
||||
|
||||
"ButtonBorderThickness": "1",
|
||||
"ButtonMargin": "1",
|
||||
"ButtonCornerRadius": "2",
|
||||
"BorderColor": "#FFAC1C",
|
||||
"BorderOpacity": "0.2",
|
||||
"ShadowPulse": "Forever"
|
||||
}
|
||||
}
|
@ -2983,35 +2983,75 @@
|
||||
]
|
||||
},
|
||||
"WPFToggleDarkMode": {
|
||||
"Content": "Dark Theme",
|
||||
"Content": "Enable Dark Theme for Windows",
|
||||
"Description": "Enable/Disable Dark Mode.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a060_",
|
||||
"Order": "a100_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleBingSearch": {
|
||||
"Content": "Bing Search in Start Menu",
|
||||
"Content": "Enable Bing Search in Start Menu",
|
||||
"Description": "If enable then includes web search results from Bing in your Start Menu search.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a061_",
|
||||
"Order": "a101_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleNumLock": {
|
||||
"Content": "NumLock on Startup",
|
||||
"Content": "Enable NumLock on Startup",
|
||||
"Description": "Toggle the Num Lock key state when your computer starts.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a062_",
|
||||
"Order": "a102_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleVerboseLogon": {
|
||||
"Content": "Verbose Logon Messages",
|
||||
"Content": "Enable Verbose Messages During Logon",
|
||||
"Description": "Show detailed messages during the login process for troubleshooting and diagnostics.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a063_",
|
||||
"Order": "a103_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleSnapWindow": {
|
||||
"Content": "Enable Snap Window",
|
||||
"Description": "If enabled you can align windows by dragging them. | Relogin Required",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a104_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleSnapFlyout": {
|
||||
"Content": "Enable Snap Assist Flyout",
|
||||
"Description": "If enabled then Snap preview is disabled when maximize button is hovered.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a105_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleSnapSuggestion": {
|
||||
"Content": "Enable Snap Assist Suggestion",
|
||||
"Description": "If enabled then you will get suggestions to snap other applications in the left over spaces.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a106_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleMouseAcceleration": {
|
||||
"Content": "Enable Mouse Acceleration",
|
||||
"Description": "If Enabled then Cursor movement is affected by the speed of your physical mouse movements.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a107_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleStickyKeys": {
|
||||
"Content": "Enable Sticky Keys",
|
||||
"Description": "If Enabled then Sticky Keys is activated - Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a108_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleShowExt": {
|
||||
@ -3019,55 +3059,31 @@
|
||||
"Description": "If enabled then File extensions (e.g., .txt, .jpg) are visible.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a064_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleSnapWindow": {
|
||||
"Content": "Snap Window",
|
||||
"Description": "If enabled you can align windows by dragging them. | Relogin Required",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a065_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleSnapFlyout": {
|
||||
"Content": "Snap Assist Flyout",
|
||||
"Description": "If enabled then Snap preview is disabled when maximize button is hovered.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a066_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleSnapSuggestion": {
|
||||
"Content": "Snap Assist Suggestion",
|
||||
"Description": "If enabled then you will get suggestions to snap other applications in the left over spaces.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a067_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleMouseAcceleration": {
|
||||
"Content": "Mouse Acceleration",
|
||||
"Description": "If Enabled then Cursor movement is affected by the speed of your physical mouse movements.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a068_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleStickyKeys": {
|
||||
"Content": "Sticky Keys",
|
||||
"Description": "If Enabled then Sticky Keys is activated - Sticky keys is an accessibility feature of some graphical user interfaces which assists users who have physical disabilities or help users reduce repetitive strain injury.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a070_",
|
||||
"Order": "a200_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleTaskbarSearch": {
|
||||
"Content": "Taskbar Search",
|
||||
"Content": "Show Search Button in Taskbar",
|
||||
"Description": "If Enabled Search Button will be on the taskbar.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a068_",
|
||||
"Order": "a201_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleTaskView": {
|
||||
"Content": "Show Task View Button in Taskbar",
|
||||
"Description": "If Enabled then Task View Button in Taskbar will be shown.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a202_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFToggleTaskbarWidgets": {
|
||||
"Content": "Show Widgets Button in Taskbar",
|
||||
"Description": "If Enabled then Widgets Button in Taskbar will be shown.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a203_",
|
||||
"Type": "Toggle"
|
||||
},
|
||||
"WPFOOSUbutton": {
|
||||
@ -3075,15 +3091,7 @@
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a039_",
|
||||
"Type": "220"
|
||||
},
|
||||
"WPFToggleTaskbarWidgets": {
|
||||
"Content": "Taskbar Widgets",
|
||||
"Description": "If Enabled then Widgets Icon in Taskbar will be shown.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a069_",
|
||||
"Type": "Toggle"
|
||||
"Type": "Button"
|
||||
},
|
||||
"WPFchangedns": {
|
||||
"Content": "DNS",
|
||||
@ -3098,42 +3106,37 @@
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a041_",
|
||||
"Type": "160"
|
||||
"Type": "Button"
|
||||
},
|
||||
"WPFUndoall": {
|
||||
"Content": "Undo Selected Tweaks",
|
||||
"category": "z__Advanced Tweaks - CAUTION",
|
||||
"panel": "1",
|
||||
"Order": "a042_",
|
||||
"Type": "160"
|
||||
"Type": "Button"
|
||||
},
|
||||
"WPFAddUltPerf": {
|
||||
"Content": "Add and Activate Ultimate Performance Profile",
|
||||
"category": "Performance Plans",
|
||||
"panel": "2",
|
||||
"Order": "a080_",
|
||||
"Type": "300"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFRemoveUltPerf": {
|
||||
"Content": "Remove Ultimate Performance Profile",
|
||||
"category": "Performance Plans",
|
||||
"panel": "2",
|
||||
"Order": "a081_",
|
||||
"Type": "300"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
},
|
||||
"WPFWinUtilShortcut": {
|
||||
"Content": "Create WinUtil Shortcut",
|
||||
"category": "Shortcuts",
|
||||
"panel": "2",
|
||||
"Order": "a082_",
|
||||
"Type": "300"
|
||||
},
|
||||
"WPFToggleTaskView": {
|
||||
"Content": "Task View",
|
||||
"Description": "If Enabled then Task View Icon in Taskbar will be shown.",
|
||||
"category": "Customize Preferences",
|
||||
"panel": "2",
|
||||
"Order": "a069_",
|
||||
"Type": "Toggle"
|
||||
"Type": "Button",
|
||||
"ButtonWidth": "300"
|
||||
}
|
||||
}
|
||||
|
@ -6,8 +6,10 @@ function Get-TabXaml {
|
||||
It takes the tabname and the number of columns to display the applications in as input and returns the XAML for the tab as output
|
||||
.PARAMETER tabname
|
||||
The name of the tab to generate XAML for
|
||||
Note: the 'tabname' parameter must equal one of the json files found in $sync.configs variable
|
||||
Otherwise, it'll throw an exception
|
||||
.PARAMETER columncount
|
||||
The number of columns to display the applications in
|
||||
The number of columns to display the applications in, default is 0
|
||||
.OUTPUTS
|
||||
The XAML for the tab
|
||||
.EXAMPLE
|
||||
@ -15,10 +17,20 @@ function Get-TabXaml {
|
||||
#>
|
||||
|
||||
|
||||
param( [Parameter(Mandatory=$true)]
|
||||
$tabname,
|
||||
$columncount = 0
|
||||
param(
|
||||
[Parameter(Mandatory, position=0)]
|
||||
[string]$tabname,
|
||||
|
||||
[Parameter(position=1)]
|
||||
[ValidateRange(0,10)] # 10 panels as max number is more then enough
|
||||
[int]$columncount = 0
|
||||
)
|
||||
|
||||
# Validate tabname
|
||||
if ($sync.configs.$tabname -eq $null) {
|
||||
throw "Invalid parameter passed, can't find '$tabname' in '`$sync.configs' variable, please double check any calls to 'Get-TabXaml' function."
|
||||
}
|
||||
|
||||
$organizedData = @{}
|
||||
# Iterate through JSON data and organize by panel and category
|
||||
foreach ($appName in $sync.configs.$tabname.PSObject.Properties.Name) {
|
||||
@ -39,6 +51,7 @@ function Get-TabXaml {
|
||||
ComboItems = $appInfo.ComboItems
|
||||
# Checked is the property to set startup checked status of checkbox (Default is false)
|
||||
Checked = $appInfo.Checked
|
||||
ButtonWidth = $appInfo.ButtonWidth
|
||||
}
|
||||
|
||||
if (-not $organizedData.ContainsKey($appObject.panel)) {
|
||||
@ -53,7 +66,22 @@ function Get-TabXaml {
|
||||
# Add Order property to keep the original order of tweaks and features
|
||||
$organizedData[$appObject.panel][$appInfo.Category]["$($appInfo.order)$appName"] = $appObject
|
||||
}
|
||||
$panelcount=0
|
||||
|
||||
# Same tab amount in last line of 'inputXML.xaml' file
|
||||
# TODO: Get the base repeat (amount) of tabs from last line (or even lines)
|
||||
# so it can dynamicly react to whatever is before this generated XML string.
|
||||
# .. may be solve this even before calling this function, and pass the result as a parameter?
|
||||
$tab_repeat = 7
|
||||
$spaces_per_tab = 4 # The convenction used across the code base
|
||||
$tab_as_spaces = $(" " * $spaces_per_tab)
|
||||
$precal_indent = $($tab_as_spaces * $tab_repeat)
|
||||
$precal_indent_p1 = $($tab_as_spaces * ($tab_repeat + 1))
|
||||
$precal_indent_p2 = $($tab_as_spaces * ($tab_repeat + 2))
|
||||
$precal_indent_m1 = $($tab_as_spaces * ($tab_repeat - 1))
|
||||
$precal_indent_m2 = $($tab_as_spaces * ($tab_repeat - 2))
|
||||
|
||||
# Calculate the needed number of panels
|
||||
$panelcount = 0
|
||||
$paneltotal = $organizedData.Keys.Count
|
||||
if ($columncount -gt 0) {
|
||||
$appcount = $sync.configs.$tabname.PSObject.Properties.Name.count + $organizedData["0"].Keys.count
|
||||
@ -61,19 +89,27 @@ function Get-TabXaml {
|
||||
$paneltotal = $columncount
|
||||
}
|
||||
# add ColumnDefinitions to evenly draw colums
|
||||
$blockXml="<Grid.ColumnDefinitions>`r`n"+("<ColumnDefinition Width=""*""/>`r`n"*($paneltotal))+"</Grid.ColumnDefinitions>`r`n"
|
||||
# Iterate through organizedData by panel, category, and application
|
||||
$blockXml = "<Grid.ColumnDefinitions>"
|
||||
$blockXml += $("`r`n" + " " * ($spaces_per_tab * $tab_repeat) +
|
||||
"<ColumnDefinition Width=""*""/>") * $paneltotal
|
||||
$blockXml += $("`r`n" + " " * ($spaces_per_tab * ($tab_repeat - 1))) +
|
||||
"</Grid.ColumnDefinitions>" + "`r`n"
|
||||
|
||||
# Iterate through 'organizedData' by panel, category, and application
|
||||
$count = 0
|
||||
foreach ($panel in ($organizedData.Keys | Sort-Object)) {
|
||||
$blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`r`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`r`n"
|
||||
$blockXml += $precal_indent_m1 + "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">" + "`r`n"
|
||||
$blockXml += $precal_indent + "<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">" + "`r`n"
|
||||
$panelcount++
|
||||
foreach ($category in ($organizedData[$panel].Keys | Sort-Object)) {
|
||||
$count++
|
||||
if ($columncount -gt 0) {
|
||||
$panelcount2 = [Int](($count)/$maxcount-0.5)
|
||||
if ($panelcount -eq $panelcount2 ) {
|
||||
$blockXml +="`r`n</StackPanel>`r`n</Border>`r`n"
|
||||
$blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`r`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`r`n"
|
||||
$blockXml += $precal_indent_p2 + "</StackPanel>" + "`r`n"
|
||||
$blockXml += $precal_indent_p1 + "</Border>" + "`r`n"
|
||||
$blockXml += $precal_indent_p1 + "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">" + "`r`n"
|
||||
$blockXml += $precal_indent_p2 + "<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">" + "`r`n"
|
||||
$panelcount++
|
||||
}
|
||||
}
|
||||
@ -83,49 +119,99 @@ function Get-TabXaml {
|
||||
|
||||
$categorycontent = $($category -replace '^.__', '')
|
||||
$categoryname = Get-WPFObjectName -type "Label" -name $categorycontent
|
||||
$blockXml += "<Label Name=""$categoryname"" Content=""$categorycontent"" FontSize=""16""/>`r`n"
|
||||
$blockXml += $("`r`n" + " " * ($spaces_per_tab * $tab_repeat)) +
|
||||
"<Label Name=""$categoryname"" Content=""$categorycontent""" + " " +
|
||||
"FontSize=""{FontSizeHeading}"" FontFamily=""{HeaderFontFamily}""/>" + "`r`n" + "`r`n"
|
||||
$sortedApps = $organizedData[$panel][$category].Keys | Sort-Object
|
||||
foreach ($appName in $sortedApps) {
|
||||
$count++
|
||||
|
||||
if ($columncount -gt 0) {
|
||||
$panelcount2 = [Int](($count)/$maxcount-0.5)
|
||||
# Verify the indentation actually works...
|
||||
if ($panelcount -eq $panelcount2 ) {
|
||||
$blockXml +="`r`n</StackPanel>`r`n</Border>`r`n"
|
||||
$blockXml += "<Border Grid.Row=""1"" Grid.Column=""$panelcount"">`r`n<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">`r`n"
|
||||
$blockXml += $precal_indent_m1 +
|
||||
"</StackPanel>" + "`r`n"
|
||||
$blockXml += $precal_indent_m2 +
|
||||
"</Border>" + "`r`n"
|
||||
$blockXml += $precal_indent_m2 +
|
||||
"<Border Grid.Row=""1"" Grid.Column=""$panelcount"">" + "`r`n"
|
||||
$blockXml += $precal_indent_m1 +
|
||||
"<StackPanel Background=""{MainBackgroundColor}"" SnapsToDevicePixels=""True"">" + "`r`n"
|
||||
$panelcount++
|
||||
}
|
||||
}
|
||||
|
||||
$appInfo = $organizedData[$panel][$category][$appName]
|
||||
if ("Toggle" -eq $appInfo.Type) {
|
||||
$blockXml += "<DockPanel LastChildFill=`"True`">`r`n<Label Content=`"$($appInfo.Content)`" ToolTip=`"$($appInfo.Description)`" HorizontalAlignment=`"Left`"/>`r`n"
|
||||
$blockXml += "<CheckBox Name=`"$($appInfo.Name)`" Style=`"{StaticResource ColorfulToggleSwitchStyle}`" Margin=`"2.5,0`" HorizontalAlignment=`"Right`"/>`r`n</DockPanel>`r`n"
|
||||
} elseif ("Combobox" -eq $appInfo.Type) {
|
||||
$blockXml += "<StackPanel Orientation=`"Horizontal`" Margin=`"0,5,0,0`">`r`n<Label Content=`"$($appInfo.Content)`" HorizontalAlignment=`"Left`" VerticalAlignment=`"Center`"/>`r`n"
|
||||
$blockXml += "<ComboBox Name=`"$($appInfo.Name)`" Height=`"32`" Width=`"186`" HorizontalAlignment=`"Left`" VerticalAlignment=`"Center`" Margin=`"5,5`">`r`n"
|
||||
$addfirst="IsSelected=`"True`""
|
||||
foreach ($comboitem in ($appInfo.ComboItems -split " ")) {
|
||||
$blockXml += "<ComboBoxItem $addfirst Content=`"$comboitem`"/>`r`n"
|
||||
$addfirst=""
|
||||
switch ($appInfo.Type) {
|
||||
"Toggle" {
|
||||
$blockXml += $precal_indent_m1 +
|
||||
"<DockPanel LastChildFill=""True"">" + "`r`n"
|
||||
$blockXml += $precal_indent +
|
||||
"<CheckBox Name=""$($appInfo.Name)"" Style=""{StaticResource ColorfulToggleSwitchStyle}"" Margin=""4,0""" + " " +
|
||||
"HorizontalAlignment=""Right"" FontSize=""{FontSize}""/>" + "`r`n"
|
||||
$blockXml += $precal_indent +
|
||||
"<Label Content=""$($appInfo.Content)"" ToolTip=""$($appInfo.Description)""" + " " +
|
||||
"HorizontalAlignment=""Left"" FontSize=""{FontSize}""/>" + "`r`n"
|
||||
$blockXml += $precal_indent_m1 +
|
||||
"</DockPanel>" + "`r`n"
|
||||
}
|
||||
$blockXml += "</ComboBox>`r`n</StackPanel>"
|
||||
# If it is a digit, type is button and button length is digits
|
||||
} elseif ($appInfo.Type -match "^[\d\.]+$") {
|
||||
$blockXml += "<Button Name=`"$($appInfo.Name)`" Content=`"$($appInfo.Content)`" HorizontalAlignment = `"Left`" Width=`"$($appInfo.Type)`" Margin=`"5`" Padding=`"20,5`" />`r`n"
|
||||
# else it is a checkbox
|
||||
} else {
|
||||
$checkedStatus = If ($null -eq $appInfo.Checked) {""} Else {"IsChecked=`"$($appInfo.Checked)`" "}
|
||||
if ($null -eq $appInfo.Link)
|
||||
{
|
||||
$blockXml += "<CheckBox Name=`"$($appInfo.Name)`" Content=`"$($appInfo.Content)`" $($checkedStatus)Margin=`"5,0`" ToolTip=`"$($appInfo.Description)`"/>`r`n"
|
||||
|
||||
"Combobox" {
|
||||
$blockXml += $precal_indent_m1 +
|
||||
"<StackPanel Orientation=""Horizontal"" Margin=""0,5,0,0"">" + "`r`n"
|
||||
$blockXml += $precal_indent + "<Label Content=""$($appInfo.Content)"" HorizontalAlignment=""Left""" + " " +
|
||||
"VerticalAlignment=""Center"" FontSize=""{FontSize}""/>" + "`r`n"
|
||||
$blockXml += $precal_indent +
|
||||
"<ComboBox Name=""$($appInfo.Name)"" Height=""32"" Width=""186"" HorizontalAlignment=""Left""" + " " +
|
||||
"VerticalAlignment=""Center"" Margin=""5,5"" FontSize=""{FontSize}"">" + "`r`n"
|
||||
|
||||
$addfirst="IsSelected=""True"""
|
||||
foreach ($comboitem in ($appInfo.ComboItems -split " ")) {
|
||||
$blockXml += $precal_indent_p1 +
|
||||
"<ComboBoxItem $addfirst Content=""$comboitem"" FontSize=""{FontSize}""/>" + "`r`n"
|
||||
$addfirst=""
|
||||
}
|
||||
|
||||
$blockXml += $precal_indent_p1 + "</ComboBox>" + "`r`n"
|
||||
$blockXml += $precal_indent + "</StackPanel>" + "`r`n"
|
||||
}
|
||||
else
|
||||
{
|
||||
$blockXml += "<StackPanel Orientation=""Horizontal"">`r`n<CheckBox Name=""$($appInfo.Name)"" Content=""$($appInfo.Content)"" $($checkedStatus)ToolTip=""$($appInfo.Description)"" Margin=""0,0,2,0""/><TextBlock Name=""$($appInfo.Name)Link"" Style=""{StaticResource HoverTextBlockStyle}"" Text=""(?)"" ToolTip=""$($appInfo.Link)"" />`r`n</StackPanel>`r`n"
|
||||
|
||||
"Button" {
|
||||
if ($appInfo.ButtonWidth -ne $null) {
|
||||
$ButtonWidthStr = "Width=""$($appInfo.ButtonWidth)"""
|
||||
}
|
||||
$blockXml += $precal_indent +
|
||||
"<Button Name=""$($appInfo.Name)"" Content=""$($appInfo.Content)""" + " " +
|
||||
"HorizontalAlignment=""Left"" Margin=""5"" Padding=""20,5"" $($ButtonWidthStr)/>" + "`r`n"
|
||||
}
|
||||
|
||||
# else it is a checkbox
|
||||
default {
|
||||
$checkedStatus = If ($appInfo.Checked -eq $null) {""} Else {" IsChecked=""$($appInfo.Checked)"""}
|
||||
if ($appInfo.Link -eq $null) {
|
||||
$blockXml += $precal_indent +
|
||||
"<CheckBox Name=""$($appInfo.Name)"" Content=""$($appInfo.Content)""$($checkedStatus) Margin=""5,0""" + " " +
|
||||
"ToolTip=""$($appInfo.Description)""/>" + "`r`n"
|
||||
} else {
|
||||
$blockXml += $precal_indent +
|
||||
"<StackPanel Orientation=""Horizontal"">" + "`r`n"
|
||||
$blockXml += $precal_indent_p1 +
|
||||
"<CheckBox Name=""$($appInfo.Name)"" Content=""$($appInfo.Content)""$($checkedStatus)" + " " +
|
||||
"ToolTip=""$($appInfo.Description)"" Margin=""0,0,2,0""/>" + "`r`n"
|
||||
$blockXml += $precal_indent_p1 +
|
||||
"<TextBlock Name=""$($appInfo.Name)Link"" Style=""{StaticResource HoverTextBlockStyle}"" Text=""(?)""" + " " +
|
||||
"ToolTip=""$($appInfo.Link)""/>" + "`r`n"
|
||||
$blockXml += $precal_indent +
|
||||
"</StackPanel>" + "`r`n"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$blockXml +="`r`n</StackPanel>`r`n</Border>`r`n"
|
||||
|
||||
$blockXml += $precal_indent_p1 + "</StackPanel>" + "`r`n"
|
||||
$blockXml += $precal_indent + "</Border>" + "`r`n"
|
||||
}
|
||||
return ($blockXml)
|
||||
}
|
||||
|
@ -15,6 +15,15 @@ function Show-CustomDialog {
|
||||
.PARAMETER Height
|
||||
The height of the custom dialog window.
|
||||
|
||||
.PARAMETER FontSize
|
||||
The Font Size for text shown inside the custom dialog window.
|
||||
|
||||
.PARAMETER HeaderFontSize
|
||||
The Font Size for the Header of the custom dialog window.
|
||||
|
||||
.PARAMETER IconSize
|
||||
The Size to use for Icon inside the custom dialog window.
|
||||
|
||||
.EXAMPLE
|
||||
Show-CustomDialog -Message "This is a custom dialog with a message and an image above." -Width 300 -Height 200
|
||||
|
||||
@ -22,7 +31,10 @@ function Show-CustomDialog {
|
||||
param(
|
||||
[string]$Message,
|
||||
[int]$Width = 300,
|
||||
[int]$Height = 200
|
||||
[int]$Height = 200,
|
||||
[int]$FontSize = 10,
|
||||
[int]$HeaderFontSize = 14,
|
||||
[int]$IconSize = 25
|
||||
)
|
||||
|
||||
Add-Type -AssemblyName PresentationFramework
|
||||
@ -48,6 +60,7 @@ function Show-CustomDialog {
|
||||
$dialog.Foreground = $foregroundColor
|
||||
$dialog.Background = $backgroundColor
|
||||
$dialog.FontFamily = $font
|
||||
$dialog.FontSize = $FontSize
|
||||
|
||||
# Create a Border for the green edge with rounded corners
|
||||
$border = New-Object Windows.Controls.Border
|
||||
@ -111,8 +124,8 @@ function Show-CustomDialog {
|
||||
[Windows.Controls.Grid]::SetRow($stackPanel, 0) # Set the row to the second row (0-based index)
|
||||
|
||||
$viewbox = New-Object Windows.Controls.Viewbox
|
||||
$viewbox.Width = 25
|
||||
$viewbox.Height = 25
|
||||
$viewbox.Width = $IconSize
|
||||
$viewbox.Height = $IconSize
|
||||
|
||||
# Combine the paths into a single string
|
||||
# $cttLogoPath = @"
|
||||
@ -174,7 +187,7 @@ $cttLogoPath = @"
|
||||
# Add "Winutil" text
|
||||
$winutilTextBlock = New-Object Windows.Controls.TextBlock
|
||||
$winutilTextBlock.Text = "Winutil"
|
||||
$winutilTextBlock.FontSize = 18 # Adjust font size as needed
|
||||
$winutilTextBlock.FontSize = $HeaderFontSize
|
||||
$winutilTextBlock.Foreground = $foregroundColor
|
||||
$winutilTextBlock.Margin = New-Object Windows.Thickness(10, 5, 10, 5) # Add margins around the text block
|
||||
$stackPanel.Children.Add($winutilTextBlock)
|
||||
@ -242,6 +255,7 @@ $cttLogoPath = @"
|
||||
# Add OK button
|
||||
$okButton = New-Object Windows.Controls.Button
|
||||
$okButton.Content = "OK"
|
||||
$okButton.FontSize = $FontSize
|
||||
$okButton.Width = 80
|
||||
$okButton.Height = 30
|
||||
$okButton.HorizontalAlignment = [Windows.HorizontalAlignment]::Center
|
||||
|
@ -70,15 +70,16 @@ $inputXML = Set-WinUtilUITheme -inputXML $inputXML -themeName $ctttheme
|
||||
|
||||
# Read the XAML file
|
||||
$reader = (New-Object System.Xml.XmlNodeReader $xaml)
|
||||
try { $sync["Form"] = [Windows.Markup.XamlReader]::Load( $reader ) }
|
||||
catch [System.Management.Automation.MethodInvocationException] {
|
||||
try {
|
||||
$sync["Form"] = [Windows.Markup.XamlReader]::Load( $reader )
|
||||
} catch [System.Management.Automation.MethodInvocationException] {
|
||||
Write-Warning "We ran into a problem with the XAML code. Check the syntax for this control..."
|
||||
Write-Host $error[0].Exception.Message -ForegroundColor Red
|
||||
|
||||
If ($error[0].Exception.Message -like "*button*") {
|
||||
write-warning "Ensure your <button in the `$inputXML does NOT have a Click=ButtonClick property. PS can't handle this`n`n`n`n"
|
||||
}
|
||||
}
|
||||
catch {
|
||||
} catch {
|
||||
Write-Host "Unable to load Windows.Markup.XamlReader. Double-check syntax and ensure .net is installed."
|
||||
}
|
||||
|
||||
@ -163,9 +164,9 @@ $sync["Form"].Add_Closing({
|
||||
})
|
||||
|
||||
# Attach the event handler to the Click event
|
||||
$sync.CheckboxFilterClear.Add_Click({
|
||||
$sync.CheckboxFilter.Text = ""
|
||||
$sync.CheckboxFilterClear.Visibility = "Collapsed"
|
||||
$sync.SearchBarClearButton.Add_Click({
|
||||
$sync.SearchBar.Text = ""
|
||||
$sync.SearchBarClearButton.Visibility = "Collapsed"
|
||||
})
|
||||
|
||||
# add some shortcuts for people that don't like clicking
|
||||
@ -176,9 +177,9 @@ $commonKeyEvents = {
|
||||
|
||||
if ($_.Key -eq "Escape")
|
||||
{
|
||||
$sync.CheckboxFilter.SelectAll()
|
||||
$sync.CheckboxFilter.Text = ""
|
||||
$sync.CheckboxFilterClear.Visibility = "Collapsed"
|
||||
$sync.SearchBar.SelectAll()
|
||||
$sync.SearchBar.Text = ""
|
||||
$sync.SearchBarClearButton.Visibility = "Collapsed"
|
||||
return
|
||||
}
|
||||
|
||||
@ -209,11 +210,11 @@ $commonKeyEvents = {
|
||||
}
|
||||
# shortcut for the filter box
|
||||
if ($_.Key -eq "F" -and $_.KeyboardDevice.Modifiers -eq "Ctrl") {
|
||||
if ($sync.CheckboxFilter.Text -eq "Ctrl-F to filter") {
|
||||
$sync.CheckboxFilter.SelectAll()
|
||||
$sync.CheckboxFilter.Text = ""
|
||||
if ($sync.SearchBar.Text -eq "Ctrl-F to filter") {
|
||||
$sync.SearchBar.SelectAll()
|
||||
$sync.SearchBar.Text = ""
|
||||
}
|
||||
$sync.CheckboxFilter.Focus()
|
||||
$sync.SearchBar.Focus()
|
||||
}
|
||||
}
|
||||
|
||||
@ -400,13 +401,13 @@ $labels = @{}
|
||||
|
||||
$allCategories = $checkBoxes.Name | ForEach-Object {$sync.configs.applications.$_} | Select-Object -Unique -ExpandProperty category
|
||||
|
||||
$sync["CheckboxFilter"].Add_TextChanged({
|
||||
$sync["SearchBar"].Add_TextChanged({
|
||||
|
||||
if ($sync.CheckboxFilter.Text -ne "") {
|
||||
$sync.CheckboxFilterClear.Visibility = "Visible"
|
||||
if ($sync.SearchBar.Text -ne "") {
|
||||
$sync.SearchBarClearButton.Visibility = "Visible"
|
||||
}
|
||||
else {
|
||||
$sync.CheckboxFilterClear.Visibility = "Collapsed"
|
||||
$sync.SearchBarClearButton.Visibility = "Collapsed"
|
||||
}
|
||||
|
||||
$activeApplications = @()
|
||||
@ -417,7 +418,7 @@ $sync["CheckboxFilter"].Add_TextChanged({
|
||||
continue
|
||||
}
|
||||
|
||||
$textToSearch = $sync.CheckboxFilter.Text.ToLower()
|
||||
$textToSearch = $sync.SearchBar.Text.ToLower()
|
||||
$checkBoxName = $CheckBox.Key
|
||||
$textBlockName = $checkBoxName + "Link"
|
||||
|
||||
@ -497,7 +498,12 @@ MicroWin : <a href="https://github.com/KonTy">@KonTy</a>
|
||||
GitHub : <a href="https://github.com/ChrisTitusTech/winutil">ChrisTitusTech/winutil</a>
|
||||
Version : <a href="https://github.com/ChrisTitusTech/winutil/releases/tag/$($sync.version)">$($sync.version)</a>
|
||||
"@
|
||||
Show-CustomDialog -Message $authorInfo -Width 400
|
||||
$FontSize = $sync.configs.themes.$ctttheme.CustomDialogFontSize
|
||||
$HeaderFontSize = $sync.configs.themes.$ctttheme.CustomDialogFontSizeHeader
|
||||
$IconSize = $sync.configs.themes.$ctttheme.CustomDialogIconSize
|
||||
$Width = $sync.configs.themes.$ctttheme.CustomDialogWidth
|
||||
$Height = $sync.configs.themes.$ctttheme.CustomDialogHeight
|
||||
Show-CustomDialog -Message $authorInfo -Width $Width -Height $Height -FontSize $FontSize -HeaderFontSize $HeaderFontSize -IconSize $IconSize
|
||||
})
|
||||
$sync["Form"].ShowDialog() | out-null
|
||||
Stop-Transcript
|
||||
|
@ -49,6 +49,8 @@
|
||||
<Style TargetType="Button" x:Key="HoverButtonStyle">
|
||||
<Setter Property="Foreground" Value="{MainForegroundColor}" />
|
||||
<Setter Property="FontWeight" Value="Normal" />
|
||||
<Setter Property="FontSize" Value="{ButtonFontSize}" />
|
||||
<Setter Property="TextElement.FontFamily" Value="{ButtonFontFamily}"/>
|
||||
<Setter Property="Background" Value="{MainBackgroundColor}" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
@ -144,7 +146,7 @@
|
||||
<TextBlock Text="{TemplateBinding SelectionBoxItem}"
|
||||
Foreground="{TemplateBinding Foreground}"
|
||||
Background="Transparent"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" Margin="2"
|
||||
HorizontalAlignment="Center" VerticalAlignment="Center" Margin="2"
|
||||
/>
|
||||
</ToggleButton>
|
||||
<Popup x:Name="Popup"
|
||||
@ -175,6 +177,7 @@
|
||||
|
||||
<!-- TextBlock template -->
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="FontSize" Value="{FontSize}"/>
|
||||
<Setter Property="Foreground" Value="{LabelboxForegroundColor}"/>
|
||||
<Setter Property="Background" Value="{LabelBackgroundColor}"/>
|
||||
</Style>
|
||||
@ -197,7 +200,9 @@
|
||||
BorderBrush="{ButtonBackgroundColor}"
|
||||
BorderThickness="{ButtonBorderThickness}"
|
||||
CornerRadius="{ButtonCornerRadius}">
|
||||
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"
|
||||
<ContentPresenter
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Margin="10,2,10,2"/>
|
||||
</Border>
|
||||
</Grid>
|
||||
@ -237,7 +242,9 @@
|
||||
<Setter Property="Margin" Value="{ButtonMargin}"/>
|
||||
<Setter Property="Foreground" Value="{ButtonForegroundColor}"/>
|
||||
<Setter Property="Background" Value="{ButtonBackgroundColor}"/>
|
||||
<Setter Property="Height" Value="{ToggleButtonHeight}"/>
|
||||
<Setter Property="Height" Value="{ButtonHeight}"/>
|
||||
<Setter Property="Width" Value="{ButtonWidth}"/>
|
||||
<Setter Property="FontSize" Value="{ButtonFontSize}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="Button">
|
||||
@ -266,12 +273,12 @@
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
</Style>
|
||||
<Style x:Key="ClearButtonStyle" TargetType="Button">
|
||||
<Style x:Key="SearchBarClearButtonStyle" TargetType="Button">
|
||||
<Setter Property="FontFamily" Value="Arial"/>
|
||||
<Setter Property="FontSize" Value="14"/>
|
||||
<Setter Property="FontSize" Value="{SearchBarClearButtonFontSize}"/>
|
||||
<Setter Property="Content" Value="X"/>
|
||||
<Setter Property="Height" Value="14"/>
|
||||
<Setter Property="Width" Value="14"/>
|
||||
<Setter Property="Height" Value="{SearchBarClearButtonFontSize}"/>
|
||||
<Setter Property="Width" Value="{SearchBarClearButtonFontSize}"/>
|
||||
<Setter Property="Background" Value="Transparent"/>
|
||||
<Setter Property="Foreground" Value="{MainForegroundColor}"/>
|
||||
<Setter Property="Padding" Value="0"/>
|
||||
@ -290,22 +297,22 @@
|
||||
<Style TargetType="CheckBox">
|
||||
<Setter Property="Foreground" Value="{MainForegroundColor}"/>
|
||||
<Setter Property="Background" Value="{MainBackgroundColor}"/>
|
||||
<!-- <Setter Property="FontSize" Value="15" /> -->
|
||||
<!-- <Setter Property="TextElement.FontFamily" Value="Consolas, sans-serif"/> -->
|
||||
<Setter Property="Template">
|
||||
<Setter Property="FontSize" Value="{FontSize}" />
|
||||
<Setter Property="TextElement.FontFamily" Value="{FontFamily}"/>
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="CheckBox">
|
||||
<Grid Background="{TemplateBinding Background}" Margin="6,0,0,0">
|
||||
<Grid Background="{TemplateBinding Background}" Margin="{CheckBoxMargin}">
|
||||
<BulletDecorator Background="Transparent">
|
||||
<BulletDecorator.Bullet>
|
||||
<Grid Width="16" Height="16">
|
||||
<Grid Width="{CheckBoxBulletDecoratorFontSize}" Height="{CheckBoxBulletDecoratorFontSize}">
|
||||
<Border x:Name="Border"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
Background="{ButtonBackgroundColor}"
|
||||
BorderThickness="1"
|
||||
Width="14"
|
||||
Height="14"
|
||||
Margin="1"
|
||||
Width="{Binding Path={CheckBoxBulletDecoratorFontSize}-2}"
|
||||
Height="{Binding Path={CheckBoxBulletDecoratorFontSize}-2}"
|
||||
Margin="2"
|
||||
SnapsToDevicePixels="True"/>
|
||||
<Path x:Name="CheckMark"
|
||||
Stroke="{TemplateBinding Foreground}"
|
||||
@ -414,19 +421,6 @@
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<TextBlock Grid.Column="0" x:Name="txtToggle" VerticalAlignment="Center" FontWeight="DemiBold" Foreground="{MainForegroundColor}" FontSize="12">
|
||||
<TextBlock.Style>
|
||||
<Style TargetType="TextBlock">
|
||||
<Setter Property="Text" Value="Off"/>
|
||||
<Setter Property="Margin" Value="4,0,4,0"/>
|
||||
<Style.Triggers>
|
||||
<DataTrigger Binding="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=IsChecked}" Value="True">
|
||||
<Setter Property="Text" Value="On"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
</TextBlock>
|
||||
|
||||
<Border Grid.Column="1" x:Name="Border" CornerRadius="8"
|
||||
BorderThickness="1"
|
||||
@ -547,6 +541,7 @@
|
||||
<Setter Property="BorderBrush" Value="{MainForegroundColor}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="Foreground" Value="{MainForegroundColor}"/>
|
||||
<Setter Property="FontSize" Value="{FontSize}"/>
|
||||
<Setter Property="Padding" Value="5"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Stretch"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
@ -586,51 +581,51 @@
|
||||
</Window.Resources>
|
||||
<Grid Background="{MainBackgroundColor}" ShowGridLines="False" Name="WPFMainGrid" Width="Auto" Height="Auto" HorizontalAlignment="Stretch">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="50px"/>
|
||||
<RowDefinition Height="{TabRowHeightInPixels}px"/>
|
||||
<RowDefinition Height=".9*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<DockPanel HorizontalAlignment="Stretch" Background="{MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Row="0" Width="Auto">
|
||||
<Image Height="{ToggleButtonHeight}" Width="{ToggleButtonHeight}" Name="WPFIcon"
|
||||
<Image Height="{WinUtilIconSize}" Width="{WinUtilIconSize}" Name="WPFIcon"
|
||||
SnapsToDevicePixels="True" Source="https://christitus.com/images/logo-full.png" Margin="10"/>
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{ToggleButtonHeight}" Width="100"
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{TabButtonHeight}" Width="{TabButtonWidth}"
|
||||
Background="{ButtonInstallBackgroundColor}" Foreground="white" FontWeight="Bold" Name="WPFTab1BT">
|
||||
<ToggleButton.Content>
|
||||
<TextBlock Background="Transparent" Foreground="{ButtonInstallForegroundColor}" >
|
||||
<TextBlock FontSize="{TabButtonFontSize}" Background="Transparent" Foreground="{ButtonInstallForegroundColor}" >
|
||||
<Underline>I</Underline>nstall
|
||||
</TextBlock>
|
||||
</ToggleButton.Content>
|
||||
</ToggleButton>
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{ToggleButtonHeight}" Width="100"
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{TabButtonHeight}" Width="{TabButtonWidth}"
|
||||
Background="{ButtonTweaksBackgroundColor}" Foreground="{ButtonTweaksForegroundColor}" FontWeight="Bold" Name="WPFTab2BT">
|
||||
<ToggleButton.Content>
|
||||
<TextBlock Background="Transparent" Foreground="{ButtonTweaksForegroundColor}">
|
||||
<TextBlock FontSize="{TabButtonFontSize}" Background="Transparent" Foreground="{ButtonTweaksForegroundColor}">
|
||||
<Underline>T</Underline>weaks
|
||||
</TextBlock>
|
||||
</ToggleButton.Content>
|
||||
</ToggleButton>
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{ToggleButtonHeight}" Width="100"
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{TabButtonHeight}" Width="{TabButtonWidth}"
|
||||
Background="{ButtonConfigBackgroundColor}" Foreground="{ButtonConfigForegroundColor}" FontWeight="Bold" Name="WPFTab3BT">
|
||||
<ToggleButton.Content>
|
||||
<TextBlock Background="Transparent" Foreground="{ButtonConfigForegroundColor}">
|
||||
<TextBlock FontSize="{TabButtonFontSize}" Background="Transparent" Foreground="{ButtonConfigForegroundColor}">
|
||||
<Underline>C</Underline>onfig
|
||||
</TextBlock>
|
||||
</ToggleButton.Content>
|
||||
</ToggleButton>
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{ToggleButtonHeight}" Width="100"
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{TabButtonHeight}" Width="{TabButtonWidth}"
|
||||
Background="{ButtonUpdatesBackgroundColor}" Foreground="{ButtonUpdatesForegroundColor}" FontWeight="Bold" Name="WPFTab4BT">
|
||||
<ToggleButton.Content>
|
||||
<TextBlock Background="Transparent" Foreground="{ButtonUpdatesForegroundColor}">
|
||||
<TextBlock FontSize="{TabButtonFontSize}" Background="Transparent" Foreground="{ButtonUpdatesForegroundColor}">
|
||||
<Underline>U</Underline>pdates
|
||||
</TextBlock>
|
||||
</ToggleButton.Content>
|
||||
</ToggleButton>
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{ToggleButtonHeight}" Width="100"
|
||||
<ToggleButton HorizontalAlignment="Left" Height="{TabButtonHeight}" Width="{TabButtonWidth}"
|
||||
Background="{ButtonUpdatesBackgroundColor}" Foreground="{ButtonUpdatesForegroundColor}" FontWeight="Bold" Name="WPFTab5BT">
|
||||
<ToggleButton.Content>
|
||||
<TextBlock Background="Transparent" Foreground="{ButtonUpdatesForegroundColor}">
|
||||
<TextBlock FontSize="{TabButtonFontSize}" Background="Transparent" Foreground="{ButtonUpdatesForegroundColor}">
|
||||
<Underline>M</Underline>icroWin
|
||||
</TextBlock>
|
||||
</ToggleButton.Content>
|
||||
@ -642,13 +637,23 @@
|
||||
<ColumnDefinition Width="50px"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
|
||||
<!--
|
||||
TODO:
|
||||
Make this SearchBar TextBox Position itself and still
|
||||
house the Magnifying Glass Character in place,
|
||||
even if that Magnifying Icon changed its Size,
|
||||
it should be positioned relative to the SearchBar.
|
||||
Consider using a Math Solver, will help in making
|
||||
development of these things much easier
|
||||
-->
|
||||
<TextBox
|
||||
Grid.Column="0"
|
||||
Width="200"
|
||||
FontSize="14"
|
||||
Width="{SearchBarWidth}"
|
||||
Height="{SearchBarHeight}"
|
||||
FontSize="{SearchBarTextBoxFontSize}"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
Height="25" Margin="10,0,0,0" BorderThickness="1" Padding="22,2,2,2"
|
||||
Name="CheckboxFilter"
|
||||
Margin="10,0,0,0" BorderThickness="1" Padding="22,2,2,2"
|
||||
Name="SearchBar"
|
||||
Foreground="{MainForegroundColor}" Background="{MainBackgroundColor}"
|
||||
ToolTip="Press Ctrl-F and type app name to filter application list below. Press Esc to reset the filter">
|
||||
</TextBox>
|
||||
@ -656,11 +661,19 @@
|
||||
Grid.Column="0"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
FontSize="14" Margin="16,0,0,0"></TextBlock>
|
||||
FontSize="{IconFontSize}"
|
||||
Margin="16,0,0,0"></TextBlock>
|
||||
<!--
|
||||
TODO:
|
||||
Make this ClearButton Positioning react to
|
||||
SearchBar Width Value changing, so it'll look correct.
|
||||
Consider using a Math Solver, will help in making
|
||||
development of these things much easier
|
||||
-->
|
||||
<Button Grid.Column="0"
|
||||
VerticalAlignment="Center" HorizontalAlignment="Left"
|
||||
Name="CheckboxFilterClear"
|
||||
Style="{StaticResource ClearButtonStyle}"
|
||||
Name="SearchBarClearButton"
|
||||
Style="{StaticResource SearchBarClearButtonStyle}"
|
||||
Margin="193,0,0,0" Visibility="Collapsed"/>
|
||||
|
||||
<Button Name="SettingsButton"
|
||||
@ -668,8 +681,8 @@
|
||||
Grid.Column="1" BorderBrush="Transparent"
|
||||
Background="{MainBackgroundColor}"
|
||||
Foreground="{MainForegroundColor}"
|
||||
FontSize="18"
|
||||
Width="35" Height="35"
|
||||
FontSize="{SettingsIconFontSize}"
|
||||
Width="{IconButtonSize}" Height="{IconButtonSize}"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||
Margin="0,5,5,0"
|
||||
FontFamily="Segoe MDL2 Assets"
|
||||
@ -680,10 +693,10 @@
|
||||
HorizontalAlignment="Right" VerticalAlignment="Top">
|
||||
<Border Background="{MainBackgroundColor}" BorderBrush="{MainForegroundColor}" BorderThickness="1" CornerRadius="0" Margin="0">
|
||||
<StackPanel Background="{MainBackgroundColor}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<MenuItem Header="Import" Name="ImportMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
<MenuItem Header="Export" Name="ExportMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
<MenuItem FontSize="{ButtonFontSize}" Header="Import" Name="ImportMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
<MenuItem FontSize="{ButtonFontSize}" Header="Export" Name="ExportMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
<Separator/>
|
||||
<MenuItem Header="About" Name="AboutMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
<MenuItem FontSize="{ButtonFontSize}" Header="About" Name="AboutMenuItem" Foreground="{MainForegroundColor}"/>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
</Popup>
|
||||
@ -693,11 +706,11 @@
|
||||
Content="×" BorderThickness="0"
|
||||
BorderBrush="Transparent"
|
||||
Background="{MainBackgroundColor}"
|
||||
Width="35" Height="35"
|
||||
Width="{IconButtonSize}" Height="{IconButtonSize}"
|
||||
HorizontalAlignment="Right" VerticalAlignment="Top"
|
||||
Margin="0,5,5,0"
|
||||
FontFamily="Arial"
|
||||
Foreground="{MainForegroundColor}" FontSize="18" Name="WPFCloseButton" />
|
||||
Foreground="{MainForegroundColor}" FontSize="{IconFontSize}" Name="WPFCloseButton" />
|
||||
</Grid>
|
||||
|
||||
</DockPanel>
|
||||
@ -733,17 +746,17 @@
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<Grid Background="Transparent">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="55"/>
|
||||
<RowDefinition Height="45px"/>
|
||||
<RowDefinition Height=".70*"/>
|
||||
<RowDefinition Height=".10*"/>
|
||||
</Grid.RowDefinitions>
|
||||
{{InstallPanel_tweaks}}
|
||||
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="10">
|
||||
<Label Content="Recommended Selections:" FontSize="14" VerticalAlignment="Center"/>
|
||||
<Button Name="WPFstandard" Content=" Standard " Margin="1"/>
|
||||
<Button Name="WPFminimal" Content=" Minimal " Margin="1"/>
|
||||
<Button Name="WPFclear" Content=" Clear " Margin="1"/>
|
||||
<Button Name="WPFGetInstalledTweaks" Content=" Get Installed " Margin="1"/>
|
||||
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" HorizontalAlignment="Left" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="2" Margin="5">
|
||||
<Label Content="Recommended Selections:" FontSize="{FontSize}" VerticalAlignment="Center" Margin="2"/>
|
||||
<Button Name="WPFstandard" Content=" Standard " Margin="2"/>
|
||||
<Button Name="WPFminimal" Content=" Minimal " Margin="2"/>
|
||||
<Button Name="WPFclear" Content=" Clear " Margin="2"/>
|
||||
<Button Name="WPFGetInstalledTweaks" Content=" Get Installed " Margin="2"/>
|
||||
</StackPanel>
|
||||
<Border Grid.ColumnSpan="2" Grid.Row="2" Grid.Column="0">
|
||||
<StackPanel Background="{MainBackgroundColor}" Orientation="Horizontal" HorizontalAlignment="Left">
|
||||
@ -774,19 +787,19 @@
|
||||
</Grid.ColumnDefinitions>
|
||||
<Border Grid.Row="0" Grid.Column="0">
|
||||
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True">
|
||||
<Button Name="WPFUpdatesdefault" FontSize="16" Content="Default (Out of Box) Settings" Margin="20,4,20,10" Padding="10"/>
|
||||
<Button Name="WPFUpdatesdefault" FontSize="{ConfigTabButtonFontSize}" Height="Auto" Width="Auto" Content="Default (Out of Box) Settings" Margin="20,4,20,10" Padding="10"/>
|
||||
<TextBlock Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300">This is the default settings that come with Windows. <LineBreak/><LineBreak/> No modifications are made and will remove any custom windows update settings.<LineBreak/><LineBreak/>Note: If you still encounter update errors, reset all updates in the config tab. That will restore ALL Microsoft Update Services from their servers and reinstall them to default settings.</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Grid.Row="0" Grid.Column="1">
|
||||
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True">
|
||||
<Button Name="WPFUpdatessecurity" FontSize="16" Content="Security (Recommended) Settings" Margin="20,4,20,10" Padding="10"/>
|
||||
<Button Name="WPFUpdatessecurity" FontSize="{ConfigTabButtonFontSize}" Height="Auto" Width="Auto" Content="Security (Recommended) Settings" Margin="20,4,20,10" Padding="10"/>
|
||||
<TextBlock Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300">This is my recommended setting I use on all computers.<LineBreak/><LineBreak/> It will delay feature updates by 2 years and will install security updates 4 days after release.<LineBreak/><LineBreak/>Feature Updates: Adds features and often bugs to systems when they are released. You want to delay these as long as possible.<LineBreak/><LineBreak/>Security Updates: Typically these are pressing security flaws that need to be patched quickly. You only want to delay these a couple of days just to see if they are safe and don't break other systems. You don't want to go without these for ANY extended periods of time.</TextBlock>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
<Border Grid.Row="0" Grid.Column="2">
|
||||
<StackPanel Background="{MainBackgroundColor}" SnapsToDevicePixels="True">
|
||||
<Button Name="WPFUpdatesdisable" FontSize="16" Content="Disable ALL Updates (NOT RECOMMENDED!)" Margin="20,4,20,10" Padding="10,10,10,10"/>
|
||||
<Button Name="WPFUpdatesdisable" FontSize="{ConfigTabButtonFontSize}" Height="Auto" Width="Auto" Content="Disable ALL Updates (NOT RECOMMENDED!)" Margin="20,4,20,10" Padding="10,10,10,10"/>
|
||||
<TextBlock Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300">This completely disables ALL Windows Updates and is NOT RECOMMENDED.<LineBreak/><LineBreak/> However, it can be suitable if you use your system for a select purpose and do not actively browse the internet. <LineBreak/><LineBreak/>Note: Your system will be easier to hack and infect without security updates.</TextBlock>
|
||||
<TextBlock Text=" " Margin="20,0,20,0" Padding="10" TextWrapping="WrapWithOverflow" MaxWidth="300"/>
|
||||
</StackPanel>
|
||||
@ -794,7 +807,7 @@
|
||||
</Grid>
|
||||
</ScrollViewer>
|
||||
</TabItem>
|
||||
<TabItem Header="MicroWin" Visibility="Collapsed" Name="WPFTab5" Width="Auto" Height="Auto">
|
||||
<TabItem Header="MicroWin" Visibility="Collapsed" Name="WPFTab5">
|
||||
<ScrollViewer VerticalScrollBarVisibility="Auto">
|
||||
<Grid Width="Auto" Height="Auto">
|
||||
<Grid.ColumnDefinitions>
|
||||
@ -809,12 +822,12 @@
|
||||
HorizontalAlignment="Stretch">
|
||||
<StackPanel Name="MicrowinMain" Background="{MainBackgroundColor}" SnapsToDevicePixels="True" Grid.Column="0" Grid.Row="0">
|
||||
<StackPanel Background="Transparent" SnapsToDevicePixels="True" Margin="1">
|
||||
<CheckBox x:Name="WPFMicrowinDownloadFromGitHub" Content="Download oscdimg.exe from CTT Github repo" IsChecked="False" Margin="1" />
|
||||
<CheckBox x:Name="WPFMicrowinDownloadFromGitHub" Content="Download oscdimg.exe from CTT Github repo" IsChecked="False" Margin="-10,1,1,1" />
|
||||
<TextBlock Margin="5" Padding="1" TextWrapping="Wrap" Foreground="{ComboBoxForegroundColor}">
|
||||
Choose a Windows ISO file that you've downloaded <LineBreak/>
|
||||
Check the status in the console
|
||||
</TextBlock>
|
||||
<CheckBox x:Name="WPFMicrowinISOScratchDir" Content="Use ISO directory for ScratchDir " IsChecked="False" Margin="1"
|
||||
<CheckBox x:Name="WPFMicrowinISOScratchDir" Content="Use ISO directory for ScratchDir " IsChecked="False" Margin="-10,1,1,1"
|
||||
ToolTip="Use ISO directory for ScratchDir " />
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
@ -831,6 +844,8 @@
|
||||
Foreground="{LabelboxForegroundColor}">
|
||||
</TextBox>
|
||||
<Button Name="MicrowinScratchDirBT"
|
||||
Width="Auto"
|
||||
Height="Auto"
|
||||
Grid.Column="1"
|
||||
Margin="2"
|
||||
Padding="1" VerticalAlignment="Center">
|
||||
@ -859,12 +874,12 @@
|
||||
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">Choose Windows SKU</TextBlock>
|
||||
<ComboBox x:Name = "MicrowinWindowsFlavors" Margin="1" />
|
||||
<TextBlock Margin="6" Padding="1" TextWrapping="Wrap">Choose Windows features you want to remove from the ISO</TextBlock>
|
||||
<CheckBox Name="WPFMicrowinKeepProvisionedPackages" Content="Keep Provisioned Packages" Margin="5,0" ToolTip="Do not remove Microsoft Provisioned packages from the ISO."/>
|
||||
<CheckBox Name="WPFMicrowinKeepAppxPackages" Content="Keep Appx Packages" Margin="5,0" ToolTip="Do not remove Microsoft Appx packages from the ISO."/>
|
||||
<CheckBox Name="WPFMicrowinKeepDefender" Content="Keep Defender" Margin="5,0" IsChecked="True" ToolTip="Do not remove Microsoft Antivirus from the ISO."/>
|
||||
<CheckBox Name="WPFMicrowinKeepEdge" Content="Keep Edge" Margin="5,0" IsChecked="True" ToolTip="Do not remove Microsoft Edge from the ISO."/>
|
||||
<CheckBox Name="WPFMicrowinKeepProvisionedPackages" Content="Keep Provisioned Packages" Margin="-10,5,0,0" ToolTip="Do not remove Microsoft Provisioned packages from the ISO."/>
|
||||
<CheckBox Name="WPFMicrowinKeepAppxPackages" Content="Keep Appx Packages" Margin="-10,5,0,0" ToolTip="Do not remove Microsoft Appx packages from the ISO."/>
|
||||
<CheckBox Name="WPFMicrowinKeepDefender" Content="Keep Defender" Margin="-10,5,0,0" IsChecked="True" ToolTip="Do not remove Microsoft Antivirus from the ISO."/>
|
||||
<CheckBox Name="WPFMicrowinKeepEdge" Content="Keep Edge" Margin="-10,5,0,0" IsChecked="True" ToolTip="Do not remove Microsoft Edge from the ISO."/>
|
||||
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
||||
<CheckBox Name="MicrowinInjectDrivers" Content="Inject drivers (I KNOW WHAT I'M DOING)" Margin="5,0" IsChecked="False" ToolTip="Path to unpacked drivers all sys and inf files for devices that need drivers"/>
|
||||
<CheckBox Name="MicrowinInjectDrivers" Content="Inject drivers (I KNOW WHAT I'M DOING)" Margin="-10,5,0,0" IsChecked="False" ToolTip="Path to unpacked drivers all sys and inf files for devices that need drivers"/>
|
||||
<TextBox Name="MicrowinDriverLocation" Background="Transparent" BorderThickness="1" BorderBrush="{MainForegroundColor}"
|
||||
Margin="6"
|
||||
Text=""
|
||||
@ -873,9 +888,9 @@
|
||||
Foreground="{LabelboxForegroundColor}"
|
||||
ToolTip="Path to unpacked drivers all sys and inf files for devices that need drivers"
|
||||
/>
|
||||
<CheckBox Name="MicrowinImportDrivers" Content="Import drivers from current system" Margin="5,0" IsChecked="False" ToolTip="Export all third-party drivers from your system and inject them to the MicroWin image"/>
|
||||
<CheckBox Name="MicrowinImportDrivers" Content="Import drivers from current system" Margin="-10,5,0,0" IsChecked="False" ToolTip="Export all third-party drivers from your system and inject them to the MicroWin image"/>
|
||||
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
||||
<CheckBox Name="WPFMicrowinCopyToUsb" Content="Copy to Ventoy" Margin="5,0" IsChecked="False" ToolTip="Copy to USB disk with a label Ventoy"/>
|
||||
<CheckBox Name="WPFMicrowinCopyToUsb" Content="Copy to Ventoy" Margin="-10,5,0,0" IsChecked="False" ToolTip="Copy to USB disk with a label Ventoy"/>
|
||||
<Rectangle Fill="{MainForegroundColor}" Height="2" HorizontalAlignment="Stretch" Margin="0,10,0,10"/>
|
||||
<Button Name="WPFMicrowin" Content="Start the process" Margin="2" Padding="15"/>
|
||||
</StackPanel>
|
||||
@ -896,7 +911,7 @@
|
||||
<Grid Name = "BusyMessage" Visibility="Collapsed">
|
||||
<TextBlock Name = "BusyText" Text="NBusy" Padding="22,2,1,1" />
|
||||
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Left" FontFamily="Segoe MDL2 Assets"
|
||||
FontSize="14" Margin="16,0,0,0"></TextBlock>
|
||||
FontSize="{IconFontSize}" Margin="16,0,0,0"></TextBlock>
|
||||
</Grid>
|
||||
|
||||
<TextBlock x:Name = "asciiTextBlock"
|
||||
@ -906,7 +921,7 @@
|
||||
VerticalAlignment = "Top"
|
||||
Height = "Auto"
|
||||
Width = "Auto"
|
||||
FontSize = "10"
|
||||
FontSize = "{MicroWinLogoSize}"
|
||||
FontFamily = "Courier New"
|
||||
>
|
||||
/\/\ (_) ___ _ __ ___ / / /\ \ \(_) _ __
|
||||
|
Loading…
Reference in New Issue
Block a user