public void EstablishEvent(Visio.EventList ovEventList, DrawingEvents iEvent, bool bProcess = true) { if (bProcess) { EnableEvent(ovEventList, iEvent); } else { DisableEvent(ovEventList, iEvent, true); } }
public Visio.Event CreateEvent(Visio.EventList ovEventList, DrawingEvents iEvent) { const string sink = ""; const string targetArgs = ""; try { return(ovEventList.AddAdvise((short)iEvent, (Visio.IVisEventProc) this, sink, targetArgs)); } catch (Exception e) { ReportException(e); } return(null); }
public Visio.Event DisableEvent(Visio.EventList ovEventList, DrawingEvents iEvent, bool bRemove) { Visio.Event ovEvent = null; string sKey = iEvent.ToString(); if (m_ovEvents.ContainsKey(sKey) == true) { ovEvent = m_ovEvents[sKey] as Visio.Event; if (bRemove) { m_ovEvents.Remove(sKey); } try { ovEvent.Enabled = (short)visTF.FALSE; } catch { } } return(ovEvent); }
public Visio.Event EnableEvent(Visio.EventList ovEventList, DrawingEvents iEvent) { Visio.Event ovEvent = null; string sKey = iEvent.ToString(); if (m_ovEvents.ContainsKey(sKey) == true) { ovEvent = m_ovEvents[sKey] as Visio.Event; } else { ovEvent = CreateEvent(ovEventList, iEvent); if (ovEvent == null) { return(null); } m_ovEvents.Add(sKey, ovEvent); } ovEvent.Enabled = (short)visTF.TRUE; return(ovEvent); }