コード例 #1
0
 // called if we are sending the file and it is complete
 private void FileSendComplete(FileSendInfo fileInfo, FileSendCompleteEventArgs args)
 {
     RemovePendingFileSend(fileInfo.FileSendId);
     _appContext.NotificationManager.DeleteNotification(fileInfo.Notification);
     if (args.Success)
     {
         fileInfo.State = FileSendState.SendComplete;
         Chat.LogSystemMessage("You successfully sent the file " + fileInfo.Filename);
         OnNewActivity(new FileSendActivity(_engagement, FileSendActivity.FILE_SEND_COMPLETE)
         {
             From     = "_SELF",
             To       = _engagement.SecondParty.Party.Username,
             FileInfo = fileInfo
         });
     }
     else
     {
         if (fileInfo.State != FileSendState.SendCancelled)
         {
             Chat.LogSystemMessage("Sending of " + fileInfo.Filename + "  failed.");
             OnNewActivity(new FileSendActivity(_engagement, FileSendActivity.FILE_SEND_FAILED)
             {
                 From     = "_SELF",
                 To       = _engagement.SecondParty.Party.Username,
                 FileInfo = fileInfo
             });
         }
     }
 }
コード例 #2
0
 private void OnSendFileComplete(FileSendCompleteEventArgs e)
 {
     var handler = SendFileComplete;
     if (handler != null) handler(this, e);
 }
コード例 #3
0
ファイル: FileSendClient.cs プロジェクト: gwupe/Gwupe
 private void OnSendFileComplete(FileSendCompleteEventArgs e)
 {
     var handler = SendFileComplete;
     if (handler != null) handler(this, e);
 }
コード例 #4
0
ファイル: Function.cs プロジェクト: gwupe/Gwupe
 // called if we are sending the file and it is complete
 private void FileSendComplete(FileSendInfo fileInfo, FileSendCompleteEventArgs args)
 {
     RemovePendingFileSend(fileInfo.FileSendId);
     _appContext.NotificationManager.DeleteNotification(fileInfo.Notification);
     if (args.Success)
     {
         fileInfo.State = FileSendState.SendComplete;
         Chat.LogSystemMessage("You successfully sent the file " + fileInfo.Filename);
         OnNewActivity(new FileSendActivity(_engagement, FileSendActivity.FILE_SEND_COMPLETE)
         {
             From = "_SELF",
             To = _engagement.SecondParty.Party.Username,
             FileInfo = fileInfo
         });
     }
     else
     {
         if (fileInfo.State != FileSendState.SendCancelled)
         {
             Chat.LogSystemMessage("Sending of " + fileInfo.Filename + "  failed.");
             OnNewActivity(new FileSendActivity(_engagement, FileSendActivity.FILE_SEND_FAILED)
             {
                 From = "_SELF",
                 To = _engagement.SecondParty.Party.Username,
                 FileInfo = fileInfo
             });
         }
     }
 }