Esempio n. 1
0
 public void EstablishEvent(Visio.EventList ovEventList, DrawingEvents iEvent, bool bProcess = true)
 {
     if (bProcess)
     {
         EnableEvent(ovEventList, iEvent);
     }
     else
     {
         DisableEvent(ovEventList, iEvent, true);
     }
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
        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);
        }