コード例 #1
0
ファイル: TransferManager.cs プロジェクト: campbeb/GamePipe
 private bool ShouldAbortTransfer(TransferBase transfer)
 {
     lock (_transferLock)    //Acquire the transfer lock
     {
         return(!Transfers.Contains(transfer));
     }
 }
コード例 #2
0
        private void AddTransfer(OneFileTransferModel fileTransferModel)
        {
            var fileTransferViewModel = new OneFileTransferViewModel(this, fileTransferModel);

            if (Transfers.Contains(fileTransferViewModel))
            {
                return;
            }

            Transfers.Add(fileTransferViewModel);

            if (VisualStates.BlockState == FileTransfersVisualStates.TransfersBlockState.Invisible)
            {
                VisualStates.BlockState = FileTransfersVisualStates.TransfersBlockState.Open;
            }
        }