Beispiel #1
0
        private void DataSourcedComboBox_Disposed(object sender, EventArgs e)
        {
            if (_dropdown != null)
            {
                try { _dropdown.Dispose(); }
                catch { }
                finally { _dropdown = null; }
            }

            Materia.RefreshAndManageCurrentProcess();
        }
Beispiel #2
0
        /// <summary>
        /// Creates a new instance of DataSourcedComboBox.
        /// </summary>
        public DataSourcedComboBox()
        {
            InitializeComponent();

            if (this.AutoCompleteCustomSource == null)
            {
                base.AutoCompleteCustomSource = new AutoCompleteStringCollection();
            }
            base.AutoCompleteMode   = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
            base.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.CustomSource;

            this.ButtonCustom.Visible = true;
            this.ButtonCustom.Image   = Properties.Resources.ArrowDown;

            _dropdown              = new DataSourcedDropDown(this);
            _dropdown.RowSelected += new EventHandler(DropDown_RowSelected);

            _popup         = new Popup(_dropdown);
            _popup.Closed += new ToolStripDropDownClosedEventHandler(Popup_Closed);
        }