[PR #84] [MERGED] Refactor of ComboBox underlying types #955

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

📋 Pull Request Information

Original PR: https://github.com/SabreTools/MPF/pull/84
Author: @Jakz
Created: 7/5/2018
Status: Merged
Merged: 7/5/2018
Merged by: @mnadareski

Base: masterHead: combobox_enhancements


📝 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

17 files changed (+334 additions, -468 deletions)

View changed files

📝 DICUI.Test/DICUI.Test.csproj (+1 -0)
📝 DICUI.Test/DumpEnvironmentTest.cs (+10 -9)
📝 DICUI.Test/Utilities/ConvertersTest.cs (+36 -1)
DICUI.Test/Utilities/DriveTest.cs (+21 -0)
📝 DICUI.Test/Utilities/KnownSystemExtensionsTest.cs (+49 -1)
📝 DICUI.Test/Utilities/ValidatorsTest.cs (+1 -1)
📝 DICUI/DICUI.csproj (+0 -2)
📝 DICUI/Data/Constants.cs (+28 -2)
📝 DICUI/Data/Enumerations.cs (+21 -1)
DICUI/External/IOrderedDictionary.cs (+0 -10)
DICUI/External/OrderedDictionary.cs (+0 -330)
📝 DICUI/MainWindow.xaml (+14 -2)
📝 DICUI/MainWindow.xaml.cs (+54 -51)
📝 DICUI/Tasks.cs (+8 -7)
📝 DICUI/Utilities/Converters.cs (+56 -0)
📝 DICUI/Utilities/DumpInformation.cs (+2 -2)
📝 DICUI/Utilities/Validators.cs (+33 -49)

📄 Description

This PR is aimed to solve how ComboBox were populated. The old approach used tuples to just wrap together values but without any semantic.

This has been refactored:

  • added KnownSystemCategory enum
  • added KnownSystem special marker values to split KnownSystems into categories
  • added KnownSystemComboBoxItem which can hold a KnownSystem or a KnownSystemCategory
  • rewrote system population function (and split the actual population for the UI only, with headers)
  • adjusted ComboBox bindings to use this new approach
  • added Drive class to store letter, volume label and isFloppy flag
  • adjusted drives ComboBox to use this new object
  • modified DumpEnvironment to use Drive instead that separated attributes
  • removed OrderedDictionary (not needed anymore and hopefully we won't need it again)

DICUI is now 100% KeyValuePair/Tuple free! :)


🔄 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/84 **Author:** [@Jakz](https://github.com/Jakz) **Created:** 7/5/2018 **Status:** ✅ Merged **Merged:** 7/5/2018 **Merged by:** [@mnadareski](https://github.com/mnadareski) **Base:** `master` ← **Head:** `combobox_enhancements` --- ### 📝 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 **17 files changed** (+334 additions, -468 deletions) <details> <summary>View changed files</summary> 📝 `DICUI.Test/DICUI.Test.csproj` (+1 -0) 📝 `DICUI.Test/DumpEnvironmentTest.cs` (+10 -9) 📝 `DICUI.Test/Utilities/ConvertersTest.cs` (+36 -1) ➕ `DICUI.Test/Utilities/DriveTest.cs` (+21 -0) 📝 `DICUI.Test/Utilities/KnownSystemExtensionsTest.cs` (+49 -1) 📝 `DICUI.Test/Utilities/ValidatorsTest.cs` (+1 -1) 📝 `DICUI/DICUI.csproj` (+0 -2) 📝 `DICUI/Data/Constants.cs` (+28 -2) 📝 `DICUI/Data/Enumerations.cs` (+21 -1) ➖ `DICUI/External/IOrderedDictionary.cs` (+0 -10) ➖ `DICUI/External/OrderedDictionary.cs` (+0 -330) 📝 `DICUI/MainWindow.xaml` (+14 -2) 📝 `DICUI/MainWindow.xaml.cs` (+54 -51) 📝 `DICUI/Tasks.cs` (+8 -7) 📝 `DICUI/Utilities/Converters.cs` (+56 -0) 📝 `DICUI/Utilities/DumpInformation.cs` (+2 -2) 📝 `DICUI/Utilities/Validators.cs` (+33 -49) </details> ### 📄 Description This PR is aimed to solve how ComboBox were populated. The old approach used tuples to just wrap together values but without any semantic. This has been refactored: - added `KnownSystemCategory` enum - added `KnownSystem` special marker values to split `KnownSystems` into categories - added `KnownSystemComboBoxItem` which can hold a `KnownSystem` or a `KnownSystemCategory` - rewrote system population function (and split the actual population for the UI only, with headers) - adjusted `ComboBox` bindings to use this new approach - added `Drive` class to store letter, volume label and `isFloppy` flag - adjusted drives `ComboBox` to use this new object - modified `DumpEnvironment` to use `Drive` instead that separated attributes - removed `OrderedDictionary` (not needed anymore and hopefully we won't need it again) DICUI is now 100% `KeyValuePair`/`Tuple` free! :) --- <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:30 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SabreTools/MPF#955