private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
string selected = this.comboBox1.SelectedItem.ToString();
if (selected.ToString() == "Default")
{
this.doubleTextBox1.SpecialCultureValue = SpecialCultureValues.CurrentCulture;
this.doubleTextBox1.Culture = new CultureInfo(CultureInfo.CurrentCulture.LCID, this.doubleTextBox1.UseUserOverride);
}
else if (selected.ToString() == "UICulture")
{
this.doubleTextBox1.SpecialCultureValue = SpecialCultureValues.UICulture;
this.doubleTextBox1.Culture = new CultureInfo(CultureInfo.CurrentUICulture.LCID, this.doubleTextBox1.UseUserOverride);
}
else if (selected.ToString() == "InstalledUICulture")
{
this.doubleTextBox1.SpecialCultureValue = SpecialCultureValues.InstalledCulture;
this.doubleTextBox1.Culture = new CultureInfo(CultureInfo.InstalledUICulture.LCID, this.doubleTextBox1.UseUserOverride);
}
else
{
this.doubleTextBox1.SpecialCultureValue = SpecialCultureValues.None;
this.doubleTextBox1.Culture = new CultureInfo(selected, this.doubleTextBox1.UseUserOverride);
}
}
|