/// <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; } } } ) ); } } }
protected virtual void OnEventToBeDelayed(INuGenDEHEventArgs e) { if (this.EventToBeDelayed != null) { this.EventToBeDelayed(this, e); } }
private void client_EventToBeDelayed(object sender, INuGenDEHEventArgs e) { _currentSender = sender; _currentEventArgs = e; Debug.Assert(_eventRaiseTimer != null, "_eventRaiseTimer != null"); _eventRaiseTimer.Start(); }
public void HandleDelayedEvent(object sender, INuGenDEHEventArgs e) { if (e is NuGenDEHEventArgs) { this.handleEventCallsCount.Inc(); this.targetData.Actual = ((NuGenDEHEventArgs)e).LParam; } }
/// <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); } }
/// <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) { }