Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# Windows Forms
Hi,
 
What is the best practice to save user last entered values on a form (dialog)
 
I have a dialog, which I use for entering additional information when opening RAW image files, i.e. FileName, Width, Height, Depth, Header size, Pixel type, etc.
 
I would like the user see his or her last input (values that where saved during last successful file open) each time the dialog is opened, or some defaults when no last data exist
 
I could of course serialize the object that is data-bind to forms controls and then during forms load deserialize it and finally init the controls, but I see few issues here:
 
1. Problem with saving the data on per user basis
2. The manual coding that needs to be done here
3. The serialized data are saved to file (this is not actually a problem)
4. "versioning" the data, as the dialog may change over time (i.e. additional controls may be added or removed)
 
I believe that there is some common way of dealing with such requirements.
I am using .NET C# 4.0
 
Regards,
Sebastian
Posted 4-Dec-12 19:32pm
Comments
Sebastian Widz at 5-Dec-12 0:37am
   
Maybe I should also add that this is a windows forms application with no database connected

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 505
1 Maciej Los 325
2 Richard MacCutchan 265
3 Mathew Soji 220
4 BillWoodruff 210
0 OriginalGriff 8,804
1 Sergey Alexandrovich Kryukov 7,457
2 DamithSL 5,689
3 Maciej Los 5,279
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web02 | 2.8.1411028.1 | Last Updated 5 Dec 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100