Example #1
0
 protected override void ExecuteAction(IResource resource, PairIDs pairIDs)
 {
     try
     {
         if (_single)
         {
             new OutlookAttachment(resource).SaveAs(_path);
         }
         else
         {
             SaveAllAttachments.SaveAttachment(resource, _path);
         }
     }
     catch (OutlookAttachmentException exception)
     {
         Tracer._TraceException(exception);
     }
 }
Example #2
0
        protected override void ExecuteAction(IResourceList selectedResources)
        {
            try
            {
                SaveAllAttachments.SaveAttachments(selectedResources, _path);

                string[] files = Directory.GetFiles(_path);
                if (files == null)
                {
                    return;
                }
                for (int i = 0; i < files.Length; ++i)
                {
                    files[i] = Path.Combine(_path, files[i]);
                }
                OutlookFacadeHelper.CreateNewMessage("", "", EmailBodyFormat.PlainText, (IResourceList)null, files, true);
            }
            catch (OutlookAttachmentException exception)
            {
                Tracer._TraceException(exception);
            }
        }