J
John H.
I am creating a large complex C# WinForm app under VS2008. I have
several custom controls where I need to save the history of user
entries. For example a search text entry box where I save the last 20
entries on a per user basis.
I had originally, thought that creating a .settings file for this
purpose would be the way to go. But, lists are difficult to work with
programmatically as Property settings.
What I have done is saved the history into a
System.Collections.Specialized.StringCollection object and then write
or read them to a disk folder with a BinaryFormatter.Serialize()
or .Deserialize object. I name the individual files in a way that
identifies the App, Form, Control, and user.
This works well, but it seems to me there may be a more straight
forward way to accomplish this. Is there a better way to track user
control history from session to session? Is there a mechanism built
into the .Net framework to handle this that I am not understanding?
Thanks,
John
several custom controls where I need to save the history of user
entries. For example a search text entry box where I save the last 20
entries on a per user basis.
I had originally, thought that creating a .settings file for this
purpose would be the way to go. But, lists are difficult to work with
programmatically as Property settings.
What I have done is saved the history into a
System.Collections.Specialized.StringCollection object and then write
or read them to a disk folder with a BinaryFormatter.Serialize()
or .Deserialize object. I name the individual files in a way that
identifies the App, Form, Control, and user.
This works well, but it seems to me there may be a more straight
forward way to accomplish this. Is there a better way to track user
control history from session to session? Is there a mechanism built
into the .Net framework to handle this that I am not understanding?
Thanks,
John