Пример #1
0
        private static void AddItem(this System.Windows.Forms.ComboBox lstControl, string value)
#endif
        {
            int newIndex = lstControl.Items.Add(value);

            _dictionaryOfNewIndexes[lstControl.GetHashCode()] = newIndex;
        }
Пример #2
0
        private static void AddItem(this System.Windows.Forms.ComboBox lstControl, string value, int index)
#endif
        {
            try
            {
                lstControl.Items.Insert(index, value);
                _dictionaryOfNewIndexes[lstControl.GetHashCode()] = index;
            }
            catch
            {
            }
        }
Пример #3
0
        private static void RemoveItem(this System.Windows.Forms.ComboBox lstControl, int index)
#endif
        {
            try
            {
                if (lstControl.Text == lstControl.Items[index].ToString())
                {
                    lstControl.Text = string.Empty;
                }
                lstControl.Items.RemoveAt(index);
                _dictionaryOfNewIndexes[lstControl.GetHashCode()] = -1;
            }
            catch
            {
            }
        }