public AttachmentImage(AttachmentModel model) : base(model) { InitializeComponent(); try { LoadAttachmentImage(); } catch { LoadErrorImage(); } }
protected override void AddAttachment(IMessageAttachment messageAttachment) { UIElement attachmentElement; AttachmentModel attachmentModel = new AttachmentModel(_fileSystem, messageAttachment); switch (messageAttachment.Type) { case AttachmentType.Image: attachmentElement = new AttachmentImage(attachmentModel); break; case AttachmentType.Video: attachmentElement = new AttachmentVideo(attachmentModel); break; case AttachmentType.Audio: attachmentElement = new AttachmentAudio(attachmentModel); break; default: throw new ArgumentException("Unrecognized attachment type: " + messageAttachment.Type.ToString()); } _currentParagraph.Inlines.Add(attachmentElement); }
public AttachmentAudio(AttachmentModel model) : base(model) { InitializeComponent(); }
public AttachmentBase(AttachmentModel model) { _model = model; }