Source: www.vbforums.com --- Saturday, October 07, 2017
I'm having a problem understanding deserialization for the application (VB) I'm developing. I have an application that allows a user to draw straight arrows all over a Windows form. I made the arrows a class that has only two properties -- start points and end points. Now as the user creates new arrows, the start points and end points of the arrows are saved in lists. There are two lists: One for the start points, and one for the end points. I don't have any problem creating these lists. I can also serialize these two lists in an xml file and save the file. So when finished drawing arrows, the user can select "Save As" from the menu and then name and save an xml file that has serialized the two lists of points for all of the arrows. I don't seem to have a problem serializing and saving the xml file, but perhaps I'm not doing that correctly. The purpose of the xml file is to allow the user to start the application again, from scratch, and reload all of the arrows by opening (and deserializing) the saved xml file. I'm having a problem understanding how to deserialize the xml file so that the lists of points can be reconstructed and all of the arrows automatically redrawn on the form when the user opens the file. It seems that I can deserialize and load one arrow, although it doesn't get drawn for some reason. I can't seem to get beyond one arrow. How do I pull out the points from the xml file and rebuild the lists for all of the a ...
from Windows http://ift.tt/2xqDHYV
No comments:
Post a Comment