private void OnToolItemSelected(AdapterManager.AdapterType tType) { if (null != ToolItemSelectedtEvent) { try { ToolItemSelectedtEvent.Invoke(tType); } catch (Exception Err) { Err.ToString(); } } }
private void cmdRemoveAdapter_Click(object sender, EventArgs e) { if (0 == lvAdapters.SelectedItems.Count) { return; } AdapterManager.AdapterType tAdapterType = lvAdapters.SelectedItems[0].Tag as AdapterManager.AdapterType; if (null == tAdapterType) { return; } if (AdapterManager.UnregisterAdapterDatatype(tAdapterType)) { RefreshAdapters(); } }
private void lvAdapters_ItemActivate(object sender, EventArgs e) { if (0 == lvAdapters.SelectedItems.Count) { return; } AdapterManager.AdapterType tAdapterType = lvAdapters.SelectedItems[0].Tag as AdapterManager.AdapterType; if (null == tAdapterType) { return; } else if (!tAdapterType.Available) { return; } //! \brief raising event OnToolItemActivated(tAdapterType); }