Esempio n. 1
0
        /// ------------------------------------------------------------------------------------
        private void ResetCountryList()
        {
            //int iCountry = _country.SelectedIndex;
            var selectedCountry = _country.SelectedItem as IMDIListItem;

            //_country.Items.Clear();
            _country.DataSource = null;
            _countryList.Localize(Localize);
            _countryList.Sort();
            //_country.Items.AddRange(_countryList.Select(c => c.Text).Cast<object>().ToArray());

            _country.DataSource    = _countryList;
            _country.DisplayMember = "Text";
            _country.ValueMember   = "Value";

            if (selectedCountry != null)
            {
                _country.SelectedItem = _countryList.FindByValue(selectedCountry.Value);
            }
        }