Exemplo n.º 1
0
            /// <summary>
            /// Allows for custom events to be set, all functions must
            /// for fill the EvtHandler delegate requirements.
            /// </summary>
            /// <param name="OnClick">Called when notification is clicked</param>
            /// <param name="OnFinish">Called when notification is closed (manually or through timeout)</param>
            public void SetEvents(EvtHandler OnClick = null, EvtHandler OnFinish = null)
            {
                if (OnClick != null)
                {
                    balloon.BalloonTipClicked += new System.EventHandler(OnClick);
                }

                if (OnFinish != null)
                {
                    balloon.BalloonTipClosed += new System.EventHandler(OnFinish);
                }
            }
Exemplo n.º 2
0
    public void DispatchEvent(int key, params object[] args)
    {
        if (IsPuase)
        {
            return;
        }
        EvtHandler evtHandler = null;

        if (listeners.TryGetValue(key, out evtHandler))
        {
            evtHandler(args);
        }
    }
Exemplo n.º 3
0
 public void AddListener(int key, EvtHandler handler)
 {
     if (handler == null)
     {
         return;
     }
     if (!listeners.ContainsKey(key))
     {
         listeners.Add(key, handler);
         return;
     }
     listeners[key] += handler;
 }
Exemplo n.º 4
0
 public void RemoveListener(int key, EvtHandler handler)
 {
     if (handler != null)
     {
         EvtHandler evtHandler = null;
         if (listeners.TryGetValue(key, out evtHandler))
         {
             evtHandler -= handler;
             return;
         }
     }
     if (listeners.ContainsKey(key))
     {
         listeners.Remove(key);
     }
 }
Exemplo n.º 5
0
			/// <summary>
			/// Allows for custom events to be set, all functions must
			/// for fill the EvtHandler delegate requirements.
			/// </summary>
			/// <param name="OnClick">Called when notification is clicked</param>
			/// <param name="OnFinish">Called when notification is closed (manually or through timeout)</param>
			public void SetEvents(EvtHandler OnClick = null, EvtHandler OnFinish = null)
			{
				if (OnClick != null)
				{
					balloon.BalloonTipClicked += new System.EventHandler(OnClick);
				}

				if (OnFinish != null)
				{
					balloon.BalloonTipClosed += new System.EventHandler(OnFinish);
				}
			}
Exemplo n.º 6
0
 public void Unsubscriber(int key, EvtHandler <EvtHandlerArgs> action)
 {
     EventComponent.Unsubscriber(key, action);
 }
Exemplo n.º 7
0
 public void RemoveListener(EventMsg evtId, EvtHandler handler)
 {
     RemoveListener((int)evtId, handler);
 }
Exemplo n.º 8
0
 public void AddListener(EventMsg evtId, EvtHandler handler)
 {
     AddListener((int)evtId, handler);
 }
 protected void RemoveEvent(EventInfo info, EvtHandler handler)
 {
 }
 protected void AddEvent(EventInfo info, EvtHandler handler)
 {
 }