public void OnClick(object something, System.EventArgs args) { CommandBarItem item = (CommandBarItem)something; // ToolBarButton button = args.Button; ChoiceBase control = (ChoiceBase)item.Tag; Debug.Assert(control != null); control.OnClick(item, null); }
/// <summary> /// Handle the Button Click event. /// </summary> /// <param name="something">The button that was clicked.</param> /// <param name="args">Unused event arguments.</param> private void OnClickAreaButton(object something, System.EventArgs args) { ButtonItem item = (ButtonItem)something; ChoiceBase choice = (ChoiceBase)item.Tag; Debug.Assert(choice != null); m_control.SuspendLayout(); choice.OnClick(item, null); m_control.ResumeLayout(true); }
private void OnSelectedIndexChanged(object sender, EventArgs e) { ListView list = (ListView)sender; if (list.SelectedIndices == null || list.SelectedIndices.Count == 0) { return; } ChoiceBase control = (ChoiceBase)list.SelectedItems[0].Tag; Debug.Assert(control != null); control.OnClick(this, null); }
/// <summary> /// Handles the button item click event by passing it on to the ChoiceBase. /// </summary> /// <param name="something">The ButtonItem that was clicked.</param> /// <param name="args">Event arguments, which are not currently used.</param> protected virtual void OnClick(object something, EventArgs args) { ToolStripItem item = (ToolStripItem)something; ChoiceBase control = (ChoiceBase)item.Tag; if (control == null) { // Debug.Assert(control != null); // LT-2884 : this crash is infrequent, so for now just removing the assert MessageBox.Show(AdapterStrings.ErrorProcessingThatClick, AdapterStrings.ProcessingError, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } control.OnClick(item, null); }
protected virtual void OnComboClick(object something, System.EventArgs args) { ComboBoxItem combo = (ComboBoxItem)something; ChoiceGroup group = (ChoiceGroup)combo.Tag; ComboItem selectedItem = combo.SelectedItem as ComboItem; if (selectedItem == null) { return; } ChoiceBase choice = selectedItem.Tag as ChoiceBase; choice.OnClick(combo, null); }
/// <summary> /// triggered when the user clicks on one of the list used in the navigation bar, e.g., the tools list. /// </summary> /// <param name="something"></param> /// <param name="args"></param> private void OnClickInPanelList(object something, System.EventArgs args) { if (m_suspendEvents) { return; } ListView list = (ListView)something; if (list.SelectedIndices == null || list.SelectedIndices.Count == 0) { return; } ChoiceBase control = (ChoiceBase)list.SelectedItems[0].Tag; Debug.Assert(control != null); control.OnClick(this, null); }
protected virtual void OnSelectedIndexChanged(object something, System.EventArgs args) { ToolStripComboBox item = (ToolStripComboBox)something; ChoiceGroup control = (ChoiceGroup)item.Tag; if (control == null) { // Debug.Assert(control != null); // LT-2884 : this crash is infrequent, so for now just removing the assert MessageBox.Show(AdapterStrings.ErrorProcessingThatClick, AdapterStrings.ProcessingError, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return; } //String idx = item.SelectedItem.ToString(); ChoiceBase tgt = (ChoiceBase)item.SelectedItem; tgt.OnClick(item, null); }
public void OnItemClicked(OutlookBarBand band, OutlookBarItem item) { ChoiceBase control = (ChoiceBase)item.Tag; control.OnClick(item, null); }