예제 #1
0
        private void RemoveListeners(StartSongTaskHandler task)
        {
            var songTask = task.StartSongTask;

            songTask.BeforeResourceStarted  -= InvokeBeforeResourceStarted;
            songTask.AfterResourceStarted   -= InvokeAfterResourceStarted;
            songTask.OnAudioResourceUpdated -= InvokeOnAudioResourceUpdated;
            songTask.OnLoadFailure          -= InvokeOnLoadFailure;
        }
예제 #2
0
 protected override void CancelTask()
 {
     RemoveListeners(currentTask);
     currentTask.Cancel();
     currentTask = null;
 }
예제 #3
0
 protected override void RemoveFinishedTask()
 {
     currentTask = null;
 }
예제 #4
0
 protected override void SetTask(QueueItem item, TimeSpan?remaining)
 {
     currentTask = constructor(item);
     AddListeners(currentTask);
     StartCurrentIfRemaining(remaining);
 }