Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive User classes directly from IUser interface instead of the NullUser class. #2648

Merged
merged 4 commits into from
Jan 14, 2019

Conversation

DasSkelett
Copy link
Member

@DasSkelett DasSkelett commented Jan 10, 2019

Problem:

Our UI specific (I)User classes for interacting with the... user are pretty messy.
Besides to the consoleUI all of them are inheriting from NullUser instead of directly extending the IUser interface, which kinda misses the point of having an interface.
Also the NullUser implements a Display...() method for each IUser method on top of the existing Raise...() methods, just to let the Raise..() ones call the Display...() ones without any reason to do so.

Solution:

Now all User classes inherit directly from IUser.
NullUser is now only used in tests.
All Display...() methods are removed.
Added LOTS of code documentation, because I could have needed them...

And i implemented the selection dialog for the GUI.

instead of the NullUser class.
Remove the unnecessary `Display...()` methods.
Still needs `RaiseSelectionDialog()` implementation for the GUI. Coming soon...
@HebaruSan HebaruSan added the In progress We're still working on this label Jan 10, 2019
@DasSkelett
Copy link
Member Author

Added the GUI dialog, looks like this:
seldiag-windows selDiagUbuntuDark

" -- Default" is added to the default selection, if any.

@DasSkelett DasSkelett changed the title WIP: Derive User classes directly from IUser interface instead of the NullUser class. Derive User classes directly from IUser interface instead of the NullUser class. Jan 11, 2019
@HebaruSan HebaruSan removed the In progress We're still working on this label Jan 11, 2019
Core/ModuleInstaller.cs Outdated Show resolved Hide resolved
@HebaruSan HebaruSan added GUI Issues affecting the interactive GUI Cmdline Issues affecting the command line Core (ckan.dll) Issues affecting the core part of CKAN Pull request Netkan Issues affecting the netkan data labels Jan 11, 2019
Used right now to find out whether to show confirmation dialogs prior to mod changes.
Also adjusted the .csproj for the new SelectionDialog form
@politas politas merged commit 4b6984e into KSP-CKAN:master Jan 14, 2019
@DasSkelett DasSkelett deleted the fix/User-IUser-mess branch January 14, 2019 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cmdline Issues affecting the command line Core (ckan.dll) Issues affecting the core part of CKAN GUI Issues affecting the interactive GUI Netkan Issues affecting the netkan data Pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants