application configuration file for .NET CF ?
I just posted to the .NET Tech. forum here on devx ( http://forums.devx.com/showthread.php?threadid=134939 ) and I got a very helpful answer but I didn't ask the rite question in the rite area it seems
My question was...
The link I was given there (http://www.ftponline.com/vsm/2002_10...ettingstarted/) was great and I read and followed it and it would have done the trick except I forgot to mention that I am writeing a mobile app
What I can't figure out is how to have options definable by the user from the aplications interface without haveing to hand edit xml files etc.
e.g. I would like to have an option in my options tab where a user can define if he wants X radio button Checked at startup.
Then have that choice stored somehow where each time after that when the program starts it can see if user wanted X radio button checked and check it.
The only things I am finding are guides/faqs etc on XML files and there all showing that they can't be eddited by the program at runtime and must be hand edditted.
I would greatly apriciate it if someone could explain (or point to a good simpleton's explanation) how to store and change variables in a file so that i could keep variables and there values between program launches.
What ever happend to good old ini files ?
I am not great at explaining myself so if this post doesn't explain what I am asking please let me know so I can make it more understandable.
Thanks for any help anyone can offer.
The problem is that "application configuration file" isn't available in the "add new item" dialog.
What is the .NET CF equivalent?
I doubt that you can get the same functionality on a mobile app as with a desktop app. It's getting close but still not there yet.
Does it have to be in XML? If all you need to check is a few user options, you can use a cookie, i.e., a tiny local file that contains the options.
Thanks for the reply,
Sorry it took me so long to get back to it.
I have actualy concidered other options, even thought about useing a simple text file for each option/value.
That just seems like a realy dirty way to do it.
I have found a class file in another application example that offers functions for read/write/edit of values in xml files but i'm not realy great with reading other peoples code and figuring out how it works.
I'm still very new and trying to teach myself.
What bothers me is that the answer is rite there in that example app and I can't figure it out. I have spent hours going over and over how he uses the class to work with the xml files and just can't figure it out. To an extent it's like a puzzle and I love the challange but it's also easy to get frustrated with my owne ignorance.
It's a great sample app to learn several concepts includeing networking, and cryptography, I just can't figure it out
If anyone else would like a look you can find it
here ( http://www.microsoft.com/downloads/d...displaylang=en )
As for me I may dig at it some more but for now I guess I will just use a text file for each value and setting I need to store, I just won't let anyone see it who may laugh at me
Well once again I have been just a touch short sighted.
I just set down to map out a way to handle all my data in text files and it's not going to be an option.
I need to be able to store a type, date, description, and total for each transaction and I need to be able to access that data later for my history table, not to mention store a balance total and all the user settings. And thats just for the checks tab, i need to store an equal amount of data for the deposits tab
The only way I can think of to do that with simple files is to use a file for each value for each transation and increment the filename_end# by 1 for each transaction then to access the data later I would need to look for each value#.txt file's existance one at a time untill file#.txt does not exist.
Even I can see the trouble with this meathod, first the number of files created would be unreal, also the overhead of cheacking for, opening, parseing, and closeing each file in order to populate my history table would be sevear, especialy on a platform like a pocketpc.
So I'm back to square one and would greatly apreciate any ideas.
I am more then happy to read for myself if anyone knows of a complete idiots guide that would help.
Also If anyone could take a look at the class from the project sample I posted earlier and show simply how to get, write, edit values using it I would name my 3rd born after you
Thanks again for allowing me to bloat this thread and for any help at all.
Last edited by acecase; 10-28-2004 at 10:19 PM.
MSDN has a list of FAQ about the .Net Compact Framework:
Perhaps the answe lies somewhere there? Look in particular at this one:
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center