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; }; }
public ProgressAttachmentModel(ISendLinkAttachment attachment) { _attachment = attachment; _statusType = attachment.IsCompleted ? StatusImageType.Completed : StatusImageType.Waiting; _attachment.StatusChanged += AttachmentOnStatusChanged; }