Quantcast
Channel: DotSpatial Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 1128

Commented Unassigned: Saving Toolstrippositions [25601]

$
0
0
Currently the positions of the toolstrips vary depending on the extensions that get loaded. Furthermore all toolstrips are in only one row. If there are to many buttons they get send to the overflow. If the user rearranges the toolstrips the new positions are lost on exit.
Because that behavior is inconviniend for the enduser I added some code that saves the toolstrip positions.
Comments: ** Comment from web user: mogikanin **

I like your idea about saving Toolstrippositions, but your code needed some refactoring:
1. Change visibilty of ToolstripPosition class to internal, fix names for "row" and "column" properties (first letter should be uppercase)
2. Add readonly specifier to _StripPosList to and remove checks "if (_StripPosList == null)". When you are deserializing it, just clear it and fill with new elements.
3. MenuSettings.txt should have another extension because it is a not a text file. The better choise is "MenuBarHeaderControl.config".
4. Remove call of LoadToolstrips() from AppManager.LoadExtensions(). If you need to handle a moment when all extensions activated then you have to subscribe to AppManager.ExtensionsActivated event.
5. MenuBarHeaderControl.Initialize() potentially can be called several times, so better unsubscribe from events before subscribing them:
```_tsPanel.Layout += RememberLayout;``` and
```Application.ApplicationExit += SaveToolstripPositions;```


Viewing all articles
Browse latest Browse all 1128

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>