Inheritance: Components.Notification.Notification
Ejemplo n.º 1
0
 public OpenFileReceivedCommand(NotificationManager notificationManager, FileReceivedNotification fileReceivedNotification)
 {
     _notificationManager = notificationManager;
     this._fileReceivedNotification = fileReceivedNotification;
 }
 public OpenFileReceivedCommand(NotificationManager notificationManager, FileReceivedNotification fileReceivedNotification)
 {
     _notificationManager           = notificationManager;
     this._fileReceivedNotification = fileReceivedNotification;
 }
Ejemplo n.º 3
0
 private void FileReceiverOnConnectionClosed(FileSendInfo fileInfo)
 {
     RemovePendingFileReceive(fileInfo.FileSendId);
     _appContext.NotificationManager.DeleteNotification(fileInfo.Notification);
     if (fileInfo.FileReceiver.FileReceiveResult)
     {
         var fileReceivedNotification = new FileReceivedNotification
             {
                 AssociatedUsername = _engagement.SecondParty.Party.Username,
                 FileInfo = fileInfo
             };
         _appContext.NotificationManager.AddNotification(fileReceivedNotification);
         Chat.LogSystemMessage("Successfully received the file " + fileInfo.Filename);
         OnNewActivity(new FileSendActivity(_engagement, FileSendActivity.FILE_SEND_COMPLETE) { To = "_SELF", From = _engagement.SecondParty.Party.Username, FileInfo = fileInfo });
     }
     else
     {
         if (fileInfo.State != FileSendState.ReceiveCancelled)
             Chat.LogErrorMessage("There was a problem receiving the file " +
                                           fileInfo.Filename);
         OnNewActivity(new FileSendActivity(_engagement, FileSendActivity.FILE_SEND_FAILED) { To = "_SELF", From = _engagement.SecondParty.Party.Username, FileInfo = fileInfo });
     }
 }