예제 #1
0
		void InvokeHandler(NewContactEventHandler handler, NewContactEventArgs e)
		{
			if (handler != null)
			{
				handler(this, e);

				if (executeOnNextContact != null)
				{
					Action<Contact> action = executeOnNextContact;
					executeOnNextContact = null;
					action(e.Contact);
				}
			}
		}
예제 #2
0
        void InvokeHandler(NewContactEventHandler handler, NewContactEventArgs e)
        {
            if (handler != null)
            {
                handler(this, e);

                if (executeOnNextContact != null)
                {
                    Action <Contact> action = executeOnNextContact;
                    executeOnNextContact = null;
                    action(e.Contact);
                }
            }
        }
예제 #3
0
		/// <summary>
		/// Removes a handler for the <see cref="NewContactEvent"/> attached event.
		/// </summary>
		/// <param name="element"><see cref="UIElement"/> or <see cref="ContentElement"/> that listens to this event.</param>
		/// <param name="handler">The handler.</param>
		public static void RemoveNewContactHandler(DependencyObject element, NewContactEventHandler handler)
		{
			removeHandlerMethod.Invoke(element, NewContactEvent, handler);
		}
예제 #4
0
		/// <summary>
		/// Adds a handler for the <see cref="NewContactEvent"/> attached event.
		/// </summary>
		/// <param name="element"><see cref="UIElement"/> or <see cref="ContentElement"/> that listens to this event.</param>
		/// <param name="handler">The handler.</param>
		public static void AddNewContactHandler(DependencyObject element, NewContactEventHandler handler)
		{
			addHandlerMethod.Invoke(element, NewContactEvent, handler);
		}
예제 #5
0
 /// <summary>
 /// Removes a handler for the <see cref="NewContactEvent"/> attached event.
 /// </summary>
 /// <param name="element"><see cref="UIElement"/> or <see cref="ContentElement"/> that listens to this event.</param>
 /// <param name="handler">The handler.</param>
 public static void RemoveNewContactHandler(DependencyObject element, NewContactEventHandler handler)
 {
     removeHandlerMethod.Invoke(element, NewContactEvent, handler);
 }
예제 #6
0
 /// <summary>
 /// Adds a handler for the <see cref="NewContactEvent"/> attached event.
 /// </summary>
 /// <param name="element"><see cref="UIElement"/> or <see cref="ContentElement"/> that listens to this event.</param>
 /// <param name="handler">The handler.</param>
 public static void AddNewContactHandler(DependencyObject element, NewContactEventHandler handler)
 {
     addHandlerMethod.Invoke(element, NewContactEvent, handler);
 }