Vision

Setting Culture

by admin on Dec.03, 2009, under c#

if (CultureInfo.CurrentCulture.DateTimeFormat.ShortDatePattern != “yyyy/mm/dd”)
      {
        //Registry Logic
        //Open Sub key
        RegistryKey rkey = Registry.CurrentUser.OpenSubKey(@”Control Panel\International”, true);
        ///Set Values
        rkey.SetValue(“sShortDate”, Constants.ShortDatePattern);
        //Close the Registry
        rkey.Close();
        MessageBox.Show(“System has been reconfigured.” + “\r\n\r\n” + “Please restart application.”, Constants.ApplicationTitle, MessageBoxButton.OK, MessageBoxImage.Information);
        Application.Current.Shutdown();
      }

No comments for this entry yet...

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...