You can use the Settings Class that come with C# to store and retrieve these values. The advantage is that
- It does not store as a flat file
- Others cannot see the value that is stored
Please see the link here
Pergunta
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:
I believe that there is some common way of dealing with such requirements. I am using .NET C# 4.0 This is a windows form application, no database
Regards, Sebastian
Solução
You can use the Settings Class that come with C# to store and retrieve these values. The advantage is that
Please see the link here