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

Persistence #117

Open
hyblocker opened this issue Apr 20, 2023 · 3 comments
Open

Persistence #117

hyblocker opened this issue Apr 20, 2023 · 3 comments

Comments

@hyblocker
Copy link

Is your feature request related to a problem? Please describe.
I want to see msstyleEditor remember certain settings between sessions, as it would improve user workflow when working on a theme throughout multiple sessions.

Describe the solution you'd like
A way so that, for example, if I enable the render view, the GUI application would remember it.

Describe alternatives you've considered
N/A

Additional context
I am willing to PR a solution for this, but I would like to have input regarding how to store the settings. Should the standard .NET framework settings system, JSON, INI files, or the registry be used for this?
I would like to also see the app remember things like which items in the class view have been explored, so that when editing the same visual style you can immediately get back to what you were working on, though this may not necessarily be added immediately.
These would probably be best suited as per-user settings.

@nptr
Copy link
Owner

nptr commented Apr 20, 2023

I am willing to PR a solution for this, but I would like to have input regarding how to store the settings. Should the standard .NET framework settings system, JSON, INI files, or the registry be used for this?

Thanks! Feel free to do so! It has been a previously suggested feature but I never had the urge to implement it.
I think the .NET / WinForms settings are a reasonable choice because it's built-in and should properly integrate with Windows.
Per-user is also fine. Just ensure the editor still starts without a settings file if there isn't one.

[..] though this may not necessarily be added immediately

Thats fine. Smaller PRs - one task at a time - makes reviewing them much easier for me :)

@hyblocker
Copy link
Author

I noticed there's a RegistrySettings class in the GUI project, should I use this given it's already there?

@nptr
Copy link
Owner

nptr commented Apr 20, 2023

No, I might even remove it and also use the .NET settings in the future. I store the users warning confirmation in there. I believe i chose the registry because its a bit more persistent than a file.

For more complex settings, the registry is painful however. So just go with plain old .NET settings. Not a lot of style points for that solution, but its convenient and well integrated :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants