Moves UI initialization logic for the "Bring Your Own" applications section from the main UI script into the `FFUUI.Core` module.
This centralization cleans up the main script's `Loaded` event handler and improves code organization and maintainability.
Consolidates the scattered event handlers for the Applications tab checkboxes into a single, centralized function and a shared event handler. This new approach manages the visibility of all dependent UI panels based on the state of the checkboxes.
This refactoring simplifies the codebase, eliminates redundant logic, and ensures a more consistent and predictable user interface state.
Additionally, this change fixes bugs where clearing list views for Winget results and drivers did not properly update their "select all" header checkboxes.
Moves the initial state logic for the "Latest CU" and "Preview CU" checkboxes from the main UI script to the core initialization module.
This change centralizes UI default settings into the `Initialize-UIDefaults` function, improving code organization and maintainability.
Removes the logic for managing the visibility of Office installation options from the window's loaded event handler.
This change centralizes UI state management within dedicated event handlers, simplifying the initial UI setup.
Consolidates the logic for showing and hiding UI elements into dedicated functions, `Update-DriverDownloadPanelVisibility` and `Update-OfficePanelVisibility`.
This change simplifies the event handlers for the "Download Drivers" checkbox by using a single handler for both checked and unchecked states. It also moves the initial UI setup from the main script into the core initialization module, improving code organization and reducing duplication.
Extracts inline event handler logic for managing Apps Script Variables from the main UI script into new functions within the `FFUUI.Core.Applications` module.
This change improves code organization and maintainability by centralizing the logic for adding and removing variables. The event handlers are updated to call these new, dedicated functions.
Moves the interdependent state logic for the driver-related checkboxes from the main UI script into a new, centralized function within the core module.
This change simplifies the event handling by using a single handler for all related checkboxes, which improves code readability and maintainability. The new function is also called during initialization to ensure the UI reflects the correct state on startup.
Moves the 'Browse' button click event handlers from the main UI script into the core handlers module.
This change improves code organization and separation of concerns. The handlers are updated to be more self-contained by retrieving state from the event source rather than relying on a global state variable, which improves modularity.
Moves the event handling and business logic for the "Bring Your Own Applications" feature from the main UI script into dedicated core modules.
This change improves code organization and separation of concerns by centralizing application-related functions and their corresponding event handlers. The main UI script is now cleaner and primarily responsible for UI initialization, enhancing overall code maintainability.
Extracts the Winget app download logic from the main UI script into a new `Invoke-WingetDownload` function within the core Winget module.
This change decouples the UI event handling from the business logic, improving modularity and maintainability. It also introduces more robust error handling for the download process by wrapping the logic in a try/catch block.
Moves UI event handling logic from the main script into a dedicated core module to improve separation of concerns.
Introduces a new shared function, `Clear-ListViewContent`, to consolidate duplicated logic for clearing list views. This generic function handles user confirmation, data source clearing, and UI updates for multiple tabs, significantly reducing code redundancy.
Relocates the event handling logic for the "Applications" tab from the main UI script into the `FFUUI.Core.Handlers` module.
This improves code organization and modularity by centralizing UI logic. The handlers are also updated to use local state instead of a global variable.
Moves event handlers and initial state configuration for the USB drive creation settings from the main UI script into the core handler and initialization modules.
This change centralizes the UI logic, improving code organization and maintainability.
Updates the USB drive selection UI to align with other list views in the application. This change replaces the static "Select All" checkbox with a dynamic, selectable column that includes the checkbox in the header.
This refactoring provides a more consistent user experience and adds column sorting functionality to the USB drive list.
Additionally, the underlying shared function for creating selectable columns is improved to use the central UI state object for managing controls, removing the dependency on script-scoped variables for better encapsulation.
Moves the event handling logic for the USB drive selection controls from the main UI script to the `FFUUI.Core.Handlers` module.
This change improves code organization by centralizing UI logic. The handlers were also improved to correctly manage the "Select All" checkbox state.
Moves the click event handler for detecting USB drives from the main UI script to the dedicated core handlers module.
This change centralizes UI logic, improving code organization and maintainability.
Moves the event handling logic for the "Latest CU" and "Preview CU" checkboxes from the main UI script into the core handlers module.
This change centralizes UI event handling, improving code organization and maintainability. The new implementation is also more robust, accessing state via the window's `Tag` property rather than a global script variable.
Consolidates the state management for the "Install Apps" checkbox into a single, reusable function.
Previously, the logic to automatically check and disable "Install Apps" when selecting an update or installing Office was duplicated and scattered across multiple event handlers and files.
This change introduces a new core function that centralizes this behavior. A single event handler is now used for all relevant checkboxes (Updates and Office), simplifying the UI code, reducing redundancy, and making the logic more robust and maintainable. The initial state is also set correctly on startup.
Moves the event handling logic for the M365 Apps/Office options from the main UI script into the `FFUUI.Core.Handlers` module.
This change centralizes UI event handling, improving code organization and maintainability. It also decouples the handlers from the main script by using a local state object instead of a global script variable.
Refactors the driver selection UI to enhance stability and performance by changing how the underlying data source is managed. Creating and re-assigning a new list when data changes, rather than modifying the bound collection in-place, prevents UI inconsistency errors.
- Updates the model search to use the native WPF `CollectionView.Filter` for more efficient and reliable filtering.
- Fixes an issue where HTML entities were not decoded in Microsoft driver model names.
- Ensures selected drivers from one manufacturer are preserved when fetching models for another.
- Centralizes driver-related button event handlers into the core initialization module.
Relocates the click event handler for the driver download button from the main UI script to the `FFUUI.Core` module.
This change centralizes UI logic within the core module, improving code organization and maintainability. The handler is updated to use the local window state object instead of global script variables.
Moves the `TextChanged` event handler for the driver model filter from the UI script to the core `Register-EventHandlers` function.
This change centralizes the logic and makes the handler more generic by retrieving the UI state from the window's tag instead of relying on a global variable.
Moves the logic for downloading and preparing the Dell driver catalog from the main build scripts directly into the specific Dell driver download task.
This change encapsulates all Dell-specific logic within the `Save-DellDriversTask` function, making it self-sufficient. Each parallel task now manages its own dependency on the catalog file, which simplifies the main script's responsibilities.
Also includes minor code style formatting.
Centralizes the `btnGetModels` click event handler from the main UI script into the `FFUUI.Core` module to improve code organization and separation of concerns.
The handler is updated to use the local state object instead of a global script variable. The logic for updating the model list is also improved to preserve the collection's object reference, ensuring data binding stability.
Moves UI event handler registration logic from the main script to the `Register-EventHandlers` function in the `FFUUI.Core` module.
This change centralizes UI logic, improving code organization and modularity. The event handlers are also updated to access state via the window's tag, reducing reliance on script-scoped variables.
Moves the logic for the initial population of the Windows settings comboboxes from the UI's loaded event handler into the `Initialize-UIDefaults` function.
This change centralizes UI default value setup into a single location, improving code organization and maintainability.
Moves the VM Switch data population and event handler logic from the main UI script into the `FFUUI.Core.Initialize` module.
This change improves code organization by centralizing UI initialization and event registration into dedicated functions, making the main script cleaner.
It also simplifies module manifests by changing explicit function exports to a wildcard.
Renames the function for populating Windows settings UI controls to better reflect its purpose.
The `Get-` verb more accurately describes the function's action of retrieving information from the ISO file, as opposed to the previous `Initialize-` verb.
Extracts the logic for setting default UI control values from the main script into a new `Initialize-UIDefaults` function within the `FFUUI.Core` module.
This change cleans up the main UI script's window loaded event, improving code organization and separating UI setup from default value initialization.
Replaces `$window.FindName` with `$script:uiState.Controls` for accessing UI elements.
This change simplifies how UI controls are referenced, making the code easier to read and maintain.
Renames functions for better semantic clarity:
- `Refresh-WindowsSettingsCombos` becomes `Initialize-WindowsSettingsCombos` to better reflect its role in initial UI setup.
- `Filter-DriverModels` becomes `Search-DriverModels` to more accurately describe its use in user-driven model searches.
Enhances code readability in the UI script through consistent formatting of event handlers and multi-line script blocks.
Moves initialization logic for several list views (driver models, Winget results, app script variables) and the features grid into a new `Initialize-DynamicUIElements` function.
This centralizes the setup of these UI components within the `FFUUI.Core.Initialize` module, improving code structure.
Additionally:
- Updates sort event handlers in the new module to correctly retrieve UI state from the window's tag.
- Enhances `Invoke-ListViewSort` by initializing sort state flags if they are not already present, improving sorting stability.
Cleans up the driver selection UI script by removing comments that were redundant, self-explanatory, or no longer relevant.
This enhances code readability and maintainability without altering functionality.
Moves UI configuration loading and retrieval logic into a new `FFUUI.Core.Config` module.
Removes the `Set-UIValue` helper function from `BuildFFUVM_UI.ps1` and the `Get-UIConfig` function from `FFUUI.Core.psm1`.
This centralizes UI-related configuration handling for improved modularity.
Moves functions and static data related to Windows releases, versions, SKUs, and optional features from the main UI script and core module into a new, dedicated `FFUUI.Core.WindowsSettings` module.
This change enhances code organization and modularity by centralizing Windows-specific configuration and UI helper functions. The UI script is updated to reflect these changes, including passing state to the refactored `BuildFeaturesGrid` function.
Moves ListView manipulation, BYO application import/export, and copy task logic from the main UI script and core UI module into a new `FFUUI.Core.Applications` module.
This improves code organization and modularity for application-related features.
Extracts Winget-related functionalities, including search, list management, installation, and download tasks, from `BuildFFUVM_UI.ps1` and `FFUUI.Core.psm1`.
Consolidates these features into a new module, `FFUUI.Core.Winget.psm1`, to improve code organization and maintainability.
Relocates driver-specific download, parsing, and management logic from the main UI script and the FFUUI.Core module into new, dedicated modules for each manufacturer (Dell, HP, Lenovo, Microsoft). This improves modularity and code organization.
Additionally, centralizes common HTTP headers and user agent strings in the FFUUI.Core module, accessible via a new helper function.
- Created module manifest for FFU.Common with initial version 0.0.1.
- Created module manifest for FFUUI.Core with initial version 0.0.1.
- Implemented shared UI functions in FFUUI.Shared.psm1, including:
- Update-ListViewItemStatus: Updates the status of items in a ListView.
- Update-OverallProgress: Updates a progress bar and status label.
- Invoke-ProgressUpdate: Enqueues progress updates to the UI thread.
- Add-SortableColumn: Adds sortable columns to a ListView.
- Add-SelectableGridViewColumn: Adds a selectable column with a "Select All" checkbox.
- Update-SelectAllHeaderCheckBoxState: Updates the state of the header checkbox.
- Invoke-ListViewSort: Sorts ListView items based on specified properties.
- Show-ModernFolderPicker: Displays a modern folder picker dialog.
- Introduced the Initialize-UIControls function to streamline the assignment of UI control references to the centralized state object.
- Removed repetitive control assignments from the window loading event, enhancing maintainability and readability.
- Improved the overall structure of the UI initialization process for better consistency across the application.
Refactor functions to use a centralized state object
Modifies various functions to accept and utilize a `$State` parameter, replacing direct access to `$script:uiState` and module-scoped variables.
This change centralizes state management, improving code consistency and maintainability by passing necessary UI elements, data, and default configurations explicitly.