Flood.GUI.Controls.ComboBox.OnItemSelected C# (CSharp) Method

OnItemSelected() protected method

Internal handler for item selected event.
protected OnItemSelected ( Control control ) : void
control Control Event source.
return void
        protected virtual void OnItemSelected(Control control)
        {
            //Convert selected to a menu item
            MenuItem item = control as MenuItem;
            if (null == item) return;

            m_SelectedItem = item;
            Text = m_SelectedItem.Text;
            m_Menu.IsHidden = true;

            if (ItemSelected != null)
                ItemSelected.Invoke(this);

            Focus();
            Invalidate();
        }