[Mono-list] Getting countries, application directory and evolution interaction
Jonathan Pryor
jonpryor at vt.edu
Sat Aug 18 21:48:35 EDT 2007
On Sat, 2007-08-18 at 21:55 +0200, Manuel de la Pena wrote:
> I'm developing an application and in one point I want to get a list
> of all the countries, I have found the following code that works on
> windows:
<snip/>
> Is there any possible way to achieve this with mono on Linux?!?!
Not with the code you originally posted. You can't assume anything
about the contents of registry entries that you didn't create. There
might be some Linux-specific code that you can use, but I don't know
what it is.
> I also have an other problem regarding the following code (I'm sure
> some one has already answer this):
The easiest thing to do is continue using
Environment.SpecialFolder.ApplicationData, but use Path.Combine to
create the full paths:
string root = Environment.GetFolderPath (
Environment.SpecialFolder.ApplicationData);
string myDocsPath = Path.Combine (root,
Path.Combine ("Macaque", "MacaqueDB.db"));
string imagesDir = Path.Combine (root,
Path.Combine ("Macaque", "Images"));
if (!Directory.Exists (imagesDir))
Directory.CreateDirectory (imagesDir);
Under Linux, SpecialFolder.ApplicationData maps to $XDG_CONFIG_HOME,
which in turn defaults to ~/.config.
> An one last thing, those anyone how to interact with evolution throw
> Mono.??
There was a set of Evolution# packages that you might look into...
- Jon
More information about the Mono-list
mailing list