/// <summary> /// Raises the RequestedTaskStateChanged event. /// </summary> /// <param name="eventArgs">The <see cref="TaskEventArgs"/> that contains the event data.</param> protected virtual void OnRequestedTaskStateChanged(TaskEventArgs eventArgs) { if (RequestedTaskStateChanged != null) { RequestedTaskStateChanged(this, eventArgs); } }
protected virtual void MediaFile_TaskStateChanged(object sender, TaskEventArgs eventArgs) { if (eventArgs.NewState == TaskState.Running) { lock (this) { lock (m_ValueFader) { m_ValueFader.FadeTime = m_FadeOnStart; //m_ValueFader.TargetValue = m_MaxVolume; } } } }
/// <summary> /// Raises the TaskStateChanged event. /// </summary> /// <param name="eventArgs">The <see cref="TaskEventArgs"/> that contains the event data.</param> protected virtual void OnTaskStateChanged(TaskEventArgs eventArgs) { if (TaskStateChanged != null) { TaskStateChanged(this, eventArgs); } }
/// <summary> /// Raises the TaskStateChanged event. /// </summary> /// <param name="eventArgs">The <see cref="TaskEventArgs"/> that contains the event data.</param> private void OnTaskStateChanged(TaskEventArgs eventArgs) { if (TaskStateChanged != null) { TaskStateChanged(task, eventArgs); } }
/// <summary> /// Raises the RequestedTaskStateChanged event. /// </summary> /// <param name="eventArgs">The <see cref="TaskEventArgs"/> that contains the event data.</param> private void OnRequestedTaskStateChanged(TaskEventArgs eventArgs) { if (RequestedTaskStateChanged != null) { RequestedTaskStateChanged(task, eventArgs); } }
/// <summary> /// Raises the TaskStateChanged event. /// </summary> /// <param name="eventArgs">The <see cref="TaskEventArgs"/> that contains the event data.</param> private void OnTaskStateChanged(TaskEventArgs eventArgs) { this.TaskStateChanged?.Invoke(this.task, eventArgs); }
/// <summary> /// Raises the RequestedTaskStateChanged event. /// </summary> /// <param name="eventArgs">The <see cref="TaskEventArgs"/> that contains the event data.</param> private void OnRequestedTaskStateChanged(TaskEventArgs eventArgs) { this.RequestedTaskStateChanged?.Invoke(this.task, eventArgs); }
private void Pump_TaskStateChanged(object sender, TaskEventArgs eventArgs) { if (eventArgs.TaskState == TaskState.Running || eventArgs.TaskState == TaskState.Paused) { SetTaskState(eventArgs.TaskState); } }