private void WireEvents() { try { if (m_naWindowEventSource != null) { UnWireEvents(); } m_naWindowEventSource = ((m_nax != null) ? m_nax.NAWindow : null) as INAWindow; if (m_naWindowEventSource == null) { return; } //Create an instance of the delegate, add it to OnActiveAnalysisChanged event m_ActiveAnalysisChanged = new ESRI.ArcGIS.NetworkAnalystUI.INAWindowEvents_OnActiveAnalysisChangedEventHandler(OnActiveAnalysisChanged); ((ESRI.ArcGIS.NetworkAnalystUI.INAWindowEvents_Event)(m_naWindowEventSource)).OnActiveAnalysisChanged += m_ActiveAnalysisChanged; WireSelectionEvent(); WireGraphicsEvents(); } catch (Exception ex) { string msg = SubsetHelperUI.GetFullExceptionMessage(ex); MessageBox.Show(msg, "Wire Events"); } }
private void WireEvents() { try { if (m_naWindowEventSource != null) UnWireEvents(); m_naWindowEventSource = ((m_nax != null) ? m_nax.NAWindow : null) as INAWindow; if (m_naWindowEventSource == null) return; //Create an instance of the delegate, add it to OnActiveAnalysisChanged event m_ActiveAnalysisChanged = new ESRI.ArcGIS.NetworkAnalystUI.INAWindowEvents_OnActiveAnalysisChangedEventHandler(OnActiveAnalysisChanged); ((ESRI.ArcGIS.NetworkAnalystUI.INAWindowEvents_Event)(m_naWindowEventSource)).OnActiveAnalysisChanged += m_ActiveAnalysisChanged; WireSelectionEvent(); WireGraphicsEvents(); } catch (Exception ex) { string msg = SubsetHelperUI.GetFullExceptionMessage(ex); MessageBox.Show(msg, "Wire Events"); } }