public SetupWizardForm(Framework.Interfaces.IPlugin owner, Framework.Interfaces.ICore core) { InitializeComponent(); this.TopMost = true; _ownerPlugin = owner as SetupWizard; _core = core; UpdateTextForLanguage(); textBoxAccountname.Text = core.GeocachingComAccount.AccountName; textBoxHomecoords.Text = Utils.Conversion.GetCoordinatesPresentation(core.HomeLocation); textBoxCentercoords.Text = Utils.Conversion.GetCoordinatesPresentation(core.CenterLocation); comboBoxLanguage.Items.Add(Utils.LanguageSupport.Instance.GetTranslation(STR_ORGTEXT)); comboBoxLanguage.Items.AddRange(Utils.LanguageSupport.Instance.GetSupportedCultures().ToArray()); for (int i = 1; i < comboBoxLanguage.Items.Count; i++) { if ((comboBoxLanguage.Items[i] as System.Globalization.CultureInfo).LCID == core.SelectedLanguage.LCID) { comboBoxLanguage.SelectedIndex = i; break; } } if (comboBoxLanguage.SelectedIndex < 0) { comboBoxLanguage.SelectedIndex = 0; } }
public SetupWizardForm(Framework.Interfaces.IPlugin owner, Framework.Interfaces.ICore core) { InitializeComponent(); this.TopMost = true; _ownerPlugin = owner as SetupWizard; _core = core; UpdateTextForLanguage(); textBoxAccountname.Text = core.GeocachingComAccount.AccountName; textBoxHomecoords.Text = Utils.Conversion.GetCoordinatesPresentation(core.HomeLocation); textBoxCentercoords.Text = Utils.Conversion.GetCoordinatesPresentation(core.CenterLocation); comboBoxLanguage.Items.Add(Utils.LanguageSupport.Instance.GetTranslation(STR_ORGTEXT)); comboBoxLanguage.Items.AddRange(Utils.LanguageSupport.Instance.GetSupportedCultures().ToArray()); for (int i = 1; i < comboBoxLanguage.Items.Count; i++) { if ((comboBoxLanguage.Items[i] as System.Globalization.CultureInfo).LCID == core.SelectedLanguage.LCID) { comboBoxLanguage.SelectedIndex = i; break; } } if (comboBoxLanguage.SelectedIndex < 0) { comboBoxLanguage.SelectedIndex = 0; } }