private static ClearEIDArrayParameterValues ( INetworkAnalystExtension nax, List |
||
nax | INetworkAnalystExtension | |
sourceNames | List |
|
baseName | string | |
Результат | void |
private void UnWireSelectionEvent() { try { if (m_naWindowEventSource == null) { return; } if (m_mapEventSource == null) { return; } ((ESRI.ArcGIS.Carto.IActiveViewEvents_Event)(m_mapEventSource)).SelectionChanged -= m_ActiveViewEventsSelectionChanged; m_mapEventSource = null; SubsetHelperUI.ClearEIDArrayParameterValues(m_nax, SubsetHelperUI.SelectionEIDArrayBaseName); } catch (Exception ex) { string msg = SubsetHelperUI.GetFullExceptionMessage(ex); MessageBox.Show(msg, "UnWire Selection Event"); } }
public static void ClearEIDArrayParameterValues(INetworkAnalystExtension nax, string baseName) { try { INAWindow naWindow = nax.NAWindow; INALayer naLayer = null; INAContext naContext = null; INetworkDataset nds = null; naLayer = naWindow.ActiveAnalysis; if (naLayer != null) { naContext = naLayer.Context; } if (naContext != null) { nds = naContext.NetworkDataset; } if (nds == null) { return; } VarType vt = SubsetHelperUI.GetEIDArrayParameterType(); List <string> sourceNames = SubsetHelperUI.FindParameterizedSourceNames(nds, baseName, vt); SubsetHelperUI.ClearEIDArrayParameterValues(nax, sourceNames, baseName); SubsetHelperUI.PushParameterValuesToNetwork(nax); } catch (Exception ex) { string msg = SubsetHelperUI.GetFullExceptionMessage(ex); MessageBox.Show(msg, "Clear Network Element Array Parameters"); } }