Esempio n. 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
             });
         }
     }
 }
Esempio n. 2
0
 private void OnSendFileComplete(FileSendCompleteEventArgs e)
 {
     var handler = SendFileComplete;
     if (handler != null) handler(this, e);
 }
Esempio n. 3
0
 private void OnSendFileComplete(FileSendCompleteEventArgs e)
 {
     var handler = SendFileComplete;
     if (handler != null) handler(this, e);
 }
Esempio n. 4
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
             });
         }
     }
 }