private void buttonViewElementSet_Click(object sender, System.EventArgs e) { IQuantity providerQuantity, acceptorQuantity; IElementSet providerElementSet, acceptorElementSet; IDataOperation[] providerDataOperations, acceptorDataOperations; acceptorExchangeItemSelector.GetCheckedExchangeItem(out acceptorQuantity, out acceptorElementSet, out acceptorDataOperations); providerExchangeItemSelector.GetCheckedExchangeItem(out providerQuantity, out providerElementSet, out providerDataOperations); ArrayList elementSets = new ArrayList(); if (acceptorElementSet != null) { elementSets.Add(acceptorElementSet); } if (providerElementSet != null) { elementSets.Add(providerElementSet); } if (elementSets.Count > 0) { _elementSetViewer.PopulateDialog(elementSets); _elementSetViewer.ShowDialog(); } else { Debug.Assert(false); } }
private void buttonViewElementSet_Click(object sender, System.EventArgs e) { Debug.Assert(buttonViewElementSet.Enabled); if (propertyGrid.SelectedObject != null) { if (((HydroNumerics.OpenMI.Gui.Controls.PropertyManager)propertyGrid.SelectedObject).Tag is IElementSet) { ArrayList elementSets = new ArrayList(); elementSets.Add(((HydroNumerics.OpenMI.Gui.Controls.PropertyManager)propertyGrid.SelectedObject).Tag); _elementSetViewer.PopulateDialog(elementSets); _elementSetViewer.ShowDialog(); } } }