}//CloseAllPopUps // // // #endregion//Private Methods #region Form Event Handlers // ***************************************************************** // **** Form Event Handlers **** // ***************************************************************** // // // // **** MenuButton_Click() **** // // <summary> // One of the buttons I have created for opening a Popup has been // clicked. From the buttons name, try to locate the desired popup and // open it. // </summary> /* * private void MenuButton_Click(object sender, EventArgs e) * { * Label button = (Label)sender; * int = Convert.ToInt32(button.Name); * IPopUp popUp = null; * if (m_PopUpList.TryGetValue(id, out popUp)) * { * if (popUp.Visible) * popUp.Visible = false; * else * popUp.ShowMe(this.Parent); * } * } */ // // // // ********************************************************************* // **** comboBoxEngines_SelectionChangeCommitted() **** // ********************************************************************* /// <summary> /// The user has selected a specific engine name from the dropdown list. /// Find the Popup associated with this engine name, and show it. /// </summary> private void comboBoxEngines_SelectionChangeCommitted(object sender, EventArgs e) { if (comboBoxEngines.SelectedIndex < 0) { return; } string s = (string)comboBoxEngines.Items[comboBoxEngines.SelectedIndex]; IPopUp popUp = null; if (m_PopupList.TryGetValue(s, out popUp)) { if (popUp.Visible) { popUp.Visible = false; } else { popUp.ShowMe(this.Parent); } } }//comboBoxEngines_SelectionChangeCommitted()