[FZ Editor] Serialize/deserialize settings#8615
Merged
SeraphimaZykova merged 14 commits intomicrosoft:users/niels9001/editor-fluentfrom Dec 16, 2020
Merged
Conversation
enricogior
reviewed
Dec 16, 2020
| string message = parseResult.Item2 + Environment.NewLine + Environment.NewLine + FancyZonesEditor.Properties.Resources.Error_Parsing_Zones_Settings_User_Choice; | ||
| if (MessageBox.Show(message, FancyZonesEditor.Properties.Resources.Error_Parsing_Zones_Settings_Title, MessageBoxButton.YesNo) == MessageBoxResult.No) | ||
| { | ||
| Environment.Exit(0); |
Contributor
There was a problem hiding this comment.
We need to log the error.
Contributor
Author
There was a problem hiding this comment.
I've added data saving to the file with a notification message box, as it was done for other errors.
Contributor
There was a problem hiding this comment.
OK, let's a comment for future reference when we fully enable logging in the editor.
Contributor
|
Code looks good and the scenarios I tested work, although I couldn't test some of them because of bugs in Neils' code. |
enricogior
reviewed
Dec 16, 2020
enricogior
approved these changes
Dec 16, 2020
Co-authored-by: Enrico Giordani <enricogior@users.noreply.github.com>
SeraphimaZykova
added a commit
that referenced
this pull request
Dec 17, 2020
SeraphimaZykova
added a commit
that referenced
this pull request
Jan 27, 2021
enricogior
pushed a commit
that referenced
this pull request
Jan 27, 2021
* Removed MetroWindow, added theming support and modernWPF * Rmoved MahApps refs * Removed MahApps * Updated canvas zones * Updated GridEditor * Fixes * UI updates * New layout type selection dialog * New editor UI * Updates * Fix * UI enhancements * Updated UI * Added styles to layoutpreview * Accesibility improvements * Accesibility and styling improvements * Fix * Cleaned up brushes * Updated UX * Updated UI * Added no layouts description * Fix * UI fixes * [FZ Editor] Serialize/deserialize settings (#8615) * conflicts fix * [FZ Editor] Parse json file instead of command line args (#8649) * [FZ Editor] Serialize/deserialize settings fix (#8707) * [FZ Editor] Hide unsupported settings in custom layouts flyouts (#8716) * [FZ Editor] Duplicate custom layouts (#8718) * [FZ Editor] Duplicate layout behavior (#8720) * New UX proposal * Updated spacing * Switching to toggleswitches * Revert toggleswitch * Updated colorbrush * Updated string for saving label * Updated UI * Dark theme color fixes * Removed space * [FZ Editor] Bind dialog properties (#9199) * Resize editor window to fit the content in single-monitor mode (#9203) * Editor opening fix (#9207) * Disable "Create" button if the Name textbox is empty (#9212) * [FZ Editor] Changed edit dialog for template layouts. (#9233) * [FZ Editor] Small fixes and refactoring. (#9236) * new layout creation refactoring * "Save and apply" applies the layout * number of zones header hide * [FZ Editor] Empty layout template. (#9237) * [FZ Editor] Move "Duplicate" and "Delete" buttons to the Edit dialog. (#9272) * [FZ Editor] Preview the applied layout after editing another layout. (#9278) * Fixed "Save and apply" button behavior (#9286) * [FZ Editor] Save template layouts in the settings. (#9283) * Added default custom layout name (#9291) * close dialog before opening zones editor (#9302) * Pressing Esc closes dialogs (#9301) * [FZ Editor] Reset applied layout to "No layout" if it was deleted. (#9315) * [FZ Editor] Dark theme colors (#9317) * "Number of zones" buttons colors. (#9321) * rebase fix * added ModernWpf.dll * address PR comments: updated colors * added comments, replaced magic numbers * refactoring * merge zones crash fix * removed redundant using directive Co-authored-by: Niels Laute <niels9001@hotmail.com> Co-authored-by: Niels Laute <niels.laute@live.nl>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Get rid of temp files, serialize/deserialize
zones-settings.jsonin the editor.PR Checklist
Info on Pull Request
Removed temp files usage. Editor reads and writes data directly to
zones-settings.json.For parsing there is a 10ms retry loop with a 1-second timeout and a message box error if after 1 second the load/save fails.
If an error occurred:
Yeswill open the editor ignoring malformed data and using default values where necessary.zones-settings.jsonwould be changed and contain only correct data.Nocloses the editor, data inzones-settings.jsonwouldn't be changed.Validation Steps Performed
zones-settings.jsonmanually and verify that incorrect data leads to an error message.YesandNoscenarios.