예제 #1
0
		/// <summary>
		/// </summary>
		public void HandleDelayedEvent(object sender, INuGenDEHEventArgs e)
		{
			if (e is NuGenSelectedTaskChangedEventArgs)
			{
				NuGenSelectedTaskChangedEventArgs eventArgs = (NuGenSelectedTaskChangedEventArgs)e;
				string treeNodeText = eventArgs.TaskText != null ? eventArgs.TaskText : "";

				if (this.IsHandleCreated)
				{
					this.BeginInvoke(
						new MethodInvoker(
							delegate
							{
								if (
									this.SelectedNode != null
									/* Otherwise, not appropriate nodes change its text when multiselected. */
									&& this.SelectedNodes.Count < 2
									)
								{
									if (this.SelectedNode is NuGenTaskTreeNodeBase)
									{
										((NuGenTaskTreeNodeBase)this.SelectedNode).Text = treeNodeText;
									}
									else
									{
										this.SelectedNode.Text = treeNodeText;
									}
								}
							}
						)
					);
				}
			}
		}
예제 #2
0
        /// <summary>
        /// </summary>
        public void HandleDelayedEvent(object sender, INuGenDEHEventArgs e)
        {
            if (e is NuGenSelectedTaskChangedEventArgs)
            {
                NuGenSelectedTaskChangedEventArgs eventArgs = (NuGenSelectedTaskChangedEventArgs)e;
                string treeNodeText = eventArgs.TaskText != null ? eventArgs.TaskText : "";

                if (this.IsHandleCreated)
                {
                    this.BeginInvoke(
                        new MethodInvoker(
                            delegate
                    {
                        if (
                            this.SelectedNode != null
                            /* Otherwise, not appropriate nodes change its text when multiselected. */
                            && this.SelectedNodes.Count < 2
                            )
                        {
                            if (this.SelectedNode is NuGenTaskTreeNodeBase)
                            {
                                ((NuGenTaskTreeNodeBase)this.SelectedNode).Text = treeNodeText;
                            }
                            else
                            {
                                this.SelectedNode.Text = treeNodeText;
                            }
                        }
                    }
                            )
                        );
                }
            }
        }
예제 #3
0
 protected virtual void OnEventToBeDelayed(INuGenDEHEventArgs e)
 {
     if (this.EventToBeDelayed != null)
     {
         this.EventToBeDelayed(this, e);
     }
 }
예제 #4
0
        private void client_EventToBeDelayed(object sender, INuGenDEHEventArgs e)
        {
            _currentSender    = sender;
            _currentEventArgs = e;

            Debug.Assert(_eventRaiseTimer != null, "_eventRaiseTimer != null");
            _eventRaiseTimer.Start();
        }
예제 #5
0
 public void HandleDelayedEvent(object sender, INuGenDEHEventArgs e)
 {
     if (e is NuGenDEHEventArgs)
     {
         this.handleEventCallsCount.Inc();
         this.targetData.Actual = ((NuGenDEHEventArgs)e).LParam;
     }
 }
예제 #6
0
		/// <summary>
		/// </summary>
		public void HandleDelayedEvent(object sender, INuGenDEHEventArgs e)
		{
			if (e is NuGenTaskAddedEventArgs)
			{
				this.TaskAdded((NuGenTaskAddedEventArgs)e);
			}
			else if (e is NuGenSelectedTaskChangedEventArgs)
			{
				this.SelectedTaskChanged((NuGenSelectedTaskChangedEventArgs)e);
			}
		}
예제 #7
0
 /// <summary>
 /// </summary>
 public void HandleDelayedEvent(object sender, INuGenDEHEventArgs e)
 {
     if (e is NuGenTaskAddedEventArgs)
     {
         this.TaskAdded((NuGenTaskAddedEventArgs)e);
     }
     else if (e is NuGenSelectedTaskChangedEventArgs)
     {
         this.SelectedTaskChanged((NuGenSelectedTaskChangedEventArgs)e);
     }
 }
		/// <summary>
		/// Invokes <see cref="NuGenDEHEventHandler"/> specified by the <paramref name="key"/>.
		/// </summary>
		/// <param name="key">Specifies the <see cref="NuGenDEHEventHandler"/> to invoke.</param>
		/// <param name="e">Specifies the <see cref="INuGenDEHEventArgs"/> inheritor instance containing the event data.</param>
		/// <exception cref="T:System.InvalidOperationException">
		/// The <see cref="T:System.Delegate"/> specified by the <paramref name="key"/> is not compatible
		/// with <see cref="NuGenDEHEventHandler"/>.
		/// </exception>
		public void InvokeEventToBeDelayed(object key, INuGenDEHEventArgs e)
		{
			Delegate handler = this.Events[key];

			if (handler is NuGenDEHEventHandler)
			{
				((NuGenDEHEventHandler)handler)(this.Sender, e);
			}
			else if (handler != null)
			{
				throw new InvalidOperationException(Resources.InvalidOperation_DEHEventHandlerType);
			}
		}
예제 #9
0
        /// <summary>
        /// Invokes <see cref="NuGenDEHEventHandler"/> specified by the <paramref name="key"/>.
        /// </summary>
        /// <param name="key">Specifies the <see cref="NuGenDEHEventHandler"/> to invoke.</param>
        /// <param name="e">Specifies the <see cref="INuGenDEHEventArgs"/> inheritor instance containing the event data.</param>
        /// <exception cref="T:System.InvalidOperationException">
        /// The <see cref="T:System.Delegate"/> specified by the <paramref name="key"/> is not compatible
        /// with <see cref="NuGenDEHEventHandler"/>.
        /// </exception>
        public void InvokeEventToBeDelayed(object key, INuGenDEHEventArgs e)
        {
            Delegate handler = this.Events[key];

            if (handler is NuGenDEHEventHandler)
            {
                ((NuGenDEHEventHandler)handler)(this.Sender, e);
            }
            else if (handler != null)
            {
                throw new InvalidOperationException(Resources.InvalidOperation_DEHEventHandlerType);
            }
        }
예제 #10
0
		/// <summary>
		/// </summary>
		/// <param name="e"></param>
		protected virtual void OnEventToBeDelayed(INuGenDEHEventArgs e)
		{
			Debug.Assert(this.Initiator != null, "this.Initiator != null");
			this.Initiator.InvokeEventToBeDelayed(_EventToBeDelayed, e);
		}
			public void HandleDelayedEvent(object sender, INuGenDEHEventArgs e)
			{
				if (e is NuGenDEHEventArgs)
				{
					this.handleEventCallsCount.Inc();
					this.targetData.Actual = ((NuGenDEHEventArgs)e).LParam;
				}
			}
			protected virtual void OnEventToBeDelayed(INuGenDEHEventArgs e)
			{
				if (this.EventToBeDelayed != null)
				{
					this.EventToBeDelayed(this, e);
				}
			}
			public void HandleDelayedEvent(object sender, INuGenDEHEventArgs e)
			{
			}
예제 #14
0
 public void HandleDelayedEvent(object sender, INuGenDEHEventArgs e)
 {
 }
예제 #15
0
 /// <summary>
 /// </summary>
 /// <param name="e"></param>
 protected virtual void OnEventToBeDelayed(INuGenDEHEventArgs e)
 {
     Debug.Assert(this.Initiator != null, "this.Initiator != null");
     this.Initiator.InvokeEventToBeDelayed(_EventToBeDelayed, e);
 }
예제 #16
0
		private void client_EventToBeDelayed(object sender, INuGenDEHEventArgs e)
		{
			_currentSender = sender;
			_currentEventArgs = e;

			Debug.Assert(_eventRaiseTimer != null, "_eventRaiseTimer != null");
			_eventRaiseTimer.Start();
		}