[Mono-dev] Getting countries, application directory and evolution interaction

Manuel de la Pena manuel.mps at mac.com
Sat Aug 18 15:55:58 EDT 2007

Hi guys,

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  

  private void GetCountries()
    RegistryKey countries =
      "Software\\Microsoft\\Windows\\CurrentVersion" +
      "\\Telephony\\Country List");

    if ( countries!=null )
     // Clear the list

     // Get the list of subkeys,
     // which is actually the country code
     string[] subkeys = countries.GetSubKeyNames();

     foreach(string ccode in subkeys)
      // Open the subkey, to get the country name
      RegistryKey country = countries.OpenSubKey(ccode);

      // ..get the country name from country key
      string countryName = country.GetValue("Name").ToString();
      // .. save it wherever you like

      // We're done using the key, we should close it

     // It's now safe to close the country list key

Is there any possible way to achieve this with mono on Linux?!?!  I  
also have an other problem regarding the following code (I'm sure  
some one has already answer this):

if (!Environment.OSVersion.ToString().StartsWith("Unix"))//working on  
                 myDocsPath = System.Environment.GetFolderPath 
                     + @"\Macaque\MacaqueDB.db";

                 if (!Directory.Exists 
                     + @"\Macaque\Images"))
                     + @"\Macaque\Images");

             else if (Environment.OSVersion.ToString().StartsWith 
("Unix"))//working with mono

What should I do on Linux, I know I should store my application in  
the user folder in something like .Macaque or something like. Any  
An one last thing, those anyone how to interact with evolution throw  

Thanks in advanced :)

More information about the Mono-devel-list mailing list