Hi,
In an MDI environment with (30+) childforms I'd like to be able to reset each child form to the standaard (designer) layout when the end user messed up by eg. hiding tool windows etc.
First of all, saving 60+ XML files (user dock + default dock) to each end user profile is not my preferred option. I saved the default, and the user dock XML to the registry for now, but I'm considering using a table in the database.
However saving/restoring the defaults is a potential bug, because when the app is updated and a form was changed by adding or deleting a tool/document window the "dock.LoadFromXml(dockSettings)" fails, since the xml in the registry reflects the 'old' pre-update form.
So 2 questions:
- Is there a way to reset the dock layout, without the LoadFromXml? That way I would not need to 'remember' the default designer settings. If not, what is the best practice to reset the updated forms in my updated app to the default?
- saving to a table, I would only need to save these 3 columns, or do I mis something?
- form name
- Dock XML info
- UserId for particular settings (or eg. Guid.Empty for the default)
Kind regards,
Raoul
In an MDI environment with (30+) childforms I'd like to be able to reset each child form to the standaard (designer) layout when the end user messed up by eg. hiding tool windows etc.
First of all, saving 60+ XML files (user dock + default dock) to each end user profile is not my preferred option. I saved the default, and the user dock XML to the registry for now, but I'm considering using a table in the database.
However saving/restoring the defaults is a potential bug, because when the app is updated and a form was changed by adding or deleting a tool/document window the "dock.LoadFromXml(dockSettings)" fails, since the xml in the registry reflects the 'old' pre-update form.
So 2 questions:
- Is there a way to reset the dock layout, without the LoadFromXml? That way I would not need to 'remember' the default designer settings. If not, what is the best practice to reset the updated forms in my updated app to the default?
- saving to a table, I would only need to save these 3 columns, or do I mis something?
- form name
- Dock XML info
- UserId for particular settings (or eg. Guid.Empty for the default)
Kind regards,
Raoul