[PR #76] [MERGED] Refactor of dump procedure into smaller components #947

Closed
opened 2026-01-29 16:24:27 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/SabreTools/MPF/pull/76
Author: @Jakz
Created: 6/26/2018
Status: Merged
Merged: 6/27/2018
Merged by: @mnadareski

Base: masterHead: tasks_refactor


📝 Commits (10+)

  • d68e186 Split type combobox into system combobox and disc type combobox
  • ffb53dd updated fork to head
  • 21969f9 corrected indentation for xaml file
  • d296b9a fixed merge with head
  • 596e26e fixed format
  • 20243dc fixed issues for PR, added KnownSystem.CUSTOM
  • 5ba23b9 removed Updater.cs which ended by error in commit
  • 66d06f1 fixed GetOuptutName() for new drive/system combobox
  • b4400fb Merge branch 'master' of github.com:reignstumble/DICUI
  • 2bac147 Merge branch 'master' of github.com:reignstumble/DICUI

📊 Changes

6 files changed (+476 additions, -280 deletions)

View changed files

📝 DICUI.csproj (+1 -0)
📝 MainWindow.xaml (+12 -1)
📝 MainWindow.xaml.cs (+107 -268)
Tasks.cs (+302 -0)
📝 Utilities/Converters.cs (+52 -2)
📝 Utilities/Validators.cs (+2 -9)

📄 Description

This PR includes some refactors aimed to have a more modular code and be able to integrate the stdout of DIC process inside DICUI itself in the short future.

  • Tasks class has been created to implement all the dump single tasks
  • Result class has been created to managed a generic success/failure value with optional message and convertble to bool
  • extensions have been added for MediaType and KnownSystem enums to reduce the amount of static function calls around (and keep code more object oriented)
  • StartDumping has been split into many smaller chunks of code which are then invoked one after the other
  • EnsureDiscInformation has been split into EnsureCorrectInformationForSystemAndMediaType which takes care of checking system and media type
  • working proof of concept: cmb_MediaType combobox model now stores a List<MediaType?> instead that a List<KeyValuePair<string, MediaType>>, the display name is now rendered through a converter which is bound to the data template of the combobox itself. This simplifies the code a lot and it's extensible to KnownSystem too in the short term if we like it

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/SabreTools/MPF/pull/76 **Author:** [@Jakz](https://github.com/Jakz) **Created:** 6/26/2018 **Status:** ✅ Merged **Merged:** 6/27/2018 **Merged by:** [@mnadareski](https://github.com/mnadareski) **Base:** `master` ← **Head:** `tasks_refactor` --- ### 📝 Commits (10+) - [`d68e186`](https://github.com/SabreTools/MPF/commit/d68e1869f5889756a0017328fa9d173f5f204560) Split type combobox into system combobox and disc type combobox - [`ffb53dd`](https://github.com/SabreTools/MPF/commit/ffb53dde7a176aa046ce0df435ae830d4ee4d347) updated fork to head - [`21969f9`](https://github.com/SabreTools/MPF/commit/21969f951d4bcf5bf8e9d7746dc304a1c7270dcf) corrected indentation for xaml file - [`d296b9a`](https://github.com/SabreTools/MPF/commit/d296b9a92fe9899bcde4d90609dae4ddb78de55e) fixed merge with head - [`596e26e`](https://github.com/SabreTools/MPF/commit/596e26e8d25298e4d906592f27a46fe9ee79a8b1) fixed format - [`20243dc`](https://github.com/SabreTools/MPF/commit/20243dcec9883ce6d60faf9cb27f5d600584618b) fixed issues for PR, added KnownSystem.CUSTOM - [`5ba23b9`](https://github.com/SabreTools/MPF/commit/5ba23b9c22a94d7436d024a0ec4a8e226d27110b) removed Updater.cs which ended by error in commit - [`66d06f1`](https://github.com/SabreTools/MPF/commit/66d06f16aeed1910270c1cb72ec50446229951f9) fixed GetOuptutName() for new drive/system combobox - [`b4400fb`](https://github.com/SabreTools/MPF/commit/b4400fb6bb830563c87eac07aad28bb56da90366) Merge branch 'master' of github.com:reignstumble/DICUI - [`2bac147`](https://github.com/SabreTools/MPF/commit/2bac14716f6f7f73d40fec25bcef49254aa33c3f) Merge branch 'master' of github.com:reignstumble/DICUI ### 📊 Changes **6 files changed** (+476 additions, -280 deletions) <details> <summary>View changed files</summary> 📝 `DICUI.csproj` (+1 -0) 📝 `MainWindow.xaml` (+12 -1) 📝 `MainWindow.xaml.cs` (+107 -268) ➕ `Tasks.cs` (+302 -0) 📝 `Utilities/Converters.cs` (+52 -2) 📝 `Utilities/Validators.cs` (+2 -9) </details> ### 📄 Description This PR includes some refactors aimed to have a more modular code and be able to integrate the stdout of DIC process inside DICUI itself in the short future. - `Tasks` class has been created to implement all the dump single tasks - `Result` class has been created to managed a generic success/failure value with optional message and convertble to `bool` - extensions have been added for `MediaType` and `KnownSystem` enums to reduce the amount of static function calls around (and keep code more object oriented) - `StartDumping` has been split into many smaller chunks of code which are then invoked one after the other - `EnsureDiscInformation` has been split into `EnsureCorrectInformationForSystemAndMediaType` which takes care of checking system and media type - working proof of concept: `cmb_MediaType` combobox model now stores a `List<MediaType?>` instead that a `List<KeyValuePair<string, MediaType>>`, the display name is now rendered through a converter which is bound to the data template of the combobox itself. This simplifies the code a lot and it's extensible to KnownSystem too in the short term if we like it --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 16:24:27 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SabreTools/MPF#947