XML, INI or Registry?

W

Wapiti

Should this be this difficult? Using VB.net cf, I would like to save some
app specific information to be retrieved by the same app at a later time.
For example, the user will enter a warehouse location into a text field, I
want to save that particular location so that the next time it prompts them
for a warehouse location, that location will display by default. Also,
program settings, such as those in typical Tools | Options.

Typically, in my VB6 days, I'd just write this info to INI files. Worked
great, and could copy that ini file to other PCs/Devices so they all hold
the same initial settings.

How is this done in CF?

I've tried xml files as explained in the link:

http://www.knowdotnet.com/articles/csettings.html

but found that often my settings would get reset to null. I'm not sure that
was problem in the example code, or in something I was doing.

I'm also looking into using the registry by way of OpenNetCF.Win32 registry
class - but then, I won't be able to copy the initial settings easily from
device to device... easily anyway.

Ini files? No such thing anymore?

How do you save app specific info?

I'm ready to even try using csv files instead - ?

Mike
 
S

Sai

If your settings needed to move from device to device, your desktop
application would have to do it. Put it in a config file (xml format) and
use the www.opennetcf.org classes to read and write config files. Each of
the machines where the device could be docked could then run a service which
checks for this file and pushes one down to the device. The architecture you
are shooting for isnt apparent, but I'd say xml based config files is a good
bet.
 
W

Wapiti

Thanks Sai,

I was trying to find xml support in opennetcf earlier - but apparently
wasn't looking in the right place.

Can you help me locate a starting point to finding the right lib?

Thx.

-m
 
P

Peter Foot [MVP]

The OpenNETCF.Configuration.ConfigurationSettings class is used for reading
from XML configuration files which is consistent with the
System.Configuration namespace on the desktop framework. You'll need to add
a reference to OpenNETCF.dll which is part of the Smart Device Framework:-
www.opennetcf.org/sdf/

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups
 
W

Wapiti

"Reading from XML..." - but does it not all the creation of and writing to
XML config files?

Thanks Peter,

-m
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top