예제 #1
0
        /// <summary>
        ///     Add an attachment with the specified path to the message.
        /// </summary>
        /// <param name="path"></param>
        public AttachmentViewModel AddAttachment(string path)
        {
            var avm = new AttachmentViewModel(this)
            {
                FileName = Path.GetFileName(path),
                FullPath = path
            };

            Attachments.Add(avm);

            return(avm);
        }
예제 #2
0
 /// <summary>
 ///     Removes the specified AttachmentViewModel from the message.
 /// </summary>
 /// <param name="attachmentViewModel">The AttachmentViewModel to remove.</param>
 public void RemoveAttachment(AttachmentViewModel attachmentViewModel)
 {
     Attachments.Remove(attachmentViewModel);
 }