mirror of
https://github.com/SabreTools/MPF.git
synced 2026-02-09 13:47:44 +00:00
[PR #76] [MERGED] Refactor of dump procedure into smaller components #947
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
master← Head:tasks_refactor📝 Commits (10+)
d68e186Split type combobox into system combobox and disc type comboboxffb53ddupdated fork to head21969f9corrected indentation for xaml filed296b9afixed merge with head596e26efixed format20243dcfixed issues for PR, added KnownSystem.CUSTOM5ba23b9removed Updater.cs which ended by error in commit66d06f1fixed GetOuptutName() for new drive/system comboboxb4400fbMerge branch 'master' of github.com:reignstumble/DICUI2bac147Merge 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.
Tasksclass has been created to implement all the dump single tasksResultclass has been created to managed a generic success/failure value with optional message and convertble toboolMediaTypeandKnownSystemenums to reduce the amount of static function calls around (and keep code more object oriented)StartDumpinghas been split into many smaller chunks of code which are then invoked one after the otherEnsureDiscInformationhas been split intoEnsureCorrectInformationForSystemAndMediaTypewhich takes care of checking system and media typecmb_MediaTypecombobox model now stores aList<MediaType?>instead that aList<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.