コード例 #1
0
ファイル: OperationsManager.cs プロジェクト: kkalinowski/nex
        private void CleanAfterOperation(OperationBase operation)
        {
            operation.Finished -= operation_Finished;
            if (operation.IsComplexOperation)
            {
                operation.Progressed -= operation_Progressed;
            }

            WpfUtilities.ThreadSafeInvoke(() => Pending.Remove(operation));
            CheckOngoingOperations();
        }
コード例 #2
0
 public void NextCharacter()
 {
     if (Roster.Count == 0)
     {
         return;
     }
     if (Pending.Count == 0)
     {
         NewRound();
         return;
     }
     Done.Insert(0, Current);
     Current = Pending[0];
     Pending.Remove(Current);
     return;
 }
コード例 #3
0
        private void MoveToArchive(TransmittalVM trans)
        {
            var file = trans.File;

            file.MoveTo(ArchivePath(file));

            _ui.Send(x => Archive.Add(file.Name), null);
            if (Archive.Count > MAX_ARCHIVE)
            {
                _ui.Send(x => Archive.RemoveAt(0), null);
            }

            //OnGoing.Remove(trans);
            _ui.Send(x => OnGoing.Remove(trans), null);
            //Pending.Remove(file);
            _ui.Send(x => Pending.Remove(file), null);
        }
コード例 #4
0
 private void RemoveUserFromMemory(FriendModel user)
 {
     if (Friends.Contains(user))
     {
         Friends.Remove(user);
         UserFriendsUpdatedEvent?.Invoke();
     }
     if (Pending.Contains(user))
     {
         Pending.Remove(user);
         PendingUsersUpdatedEvent?.Invoke();
     }
     if (Requested.Contains(user))
     {
         Requested.Remove(user);
         RequestedUsersUpdatedEvent?.Invoke();
     }
     if (Blocked.Contains(user))
     {
         Blocked.Remove(user);
         BlockedUsersUpdatedEvent?.Invoke();
     }
 }
コード例 #5
0
 public void Remove(T newVal)
 {
     Pending.Remove(newVal);
 }
コード例 #6
0
ファイル: OngoingJobsViewModel.cs プロジェクト: g4idrijs/DIPS
 /// <summary>
 /// Occurs when a contained JobViewModel has finished
 /// </summary>
 /// <param name="sender">The JobViewModel</param>
 /// <param name="e">N/A</param>
 private void _jobFinished(object sender, EventArgs e)
 {
     Current = null;
     _safeViewModelAction(x => Pending.Remove(x), (JobViewModel)sender);
     _safeViewModelAction(Finished.Add, (JobViewModel)sender);
 }
コード例 #7
0
ファイル: OngoingJobsViewModel.cs プロジェクト: g4idrijs/DIPS
 /// <summary>
 /// Occurs when a contained JobViewModel has begun
 /// </summary>
 /// <param name="sender">The JobViewModel</param>
 /// <param name="e">N/A</param>
 private void _jobStarted(object sender, EventArgs e)
 {
     Current = (JobViewModel)sender;
     _safeViewModelAction(x => Pending.Remove(x), Current);
 }