public ProgressAttachmentModel(ISendLinkAttachment attachment)
		{
			AttachmentName = attachment.Name;
			AttachmentStatus = attachment.IsCompleted ? AttachmentStatus.Completed : AttachmentStatus.Waiting;

			attachment.OnError += (sender, args) => { AttachmentStatus = AttachmentStatus.Error; };
			attachment.OnStarted += (sender, args) => { AttachmentStatus = AttachmentStatus.InProgress; };
			attachment.OnCompleted += (sender, args) => { AttachmentStatus = AttachmentStatus.Completed; };
		}
Ejemplo n.º 2
0
		public ProgressAttachmentModel(ISendLinkAttachment attachment)
		{
			_attachment = attachment;
			_statusType = attachment.IsCompleted ? StatusImageType.Completed : StatusImageType.Waiting;
			_attachment.StatusChanged += AttachmentOnStatusChanged;
		}