Esempio n. 1
0
 protected override void ExecuteAction(IResource resource, PairIDs pairIDs)
 {
     Tracer._Trace("Execute action: DisplayMessageAction");
     if (resource.HasProp(PROP.EmbeddedMessage))
     {
         IEMessage message = new OutlookAttachment(resource).OpenEmbeddedMessage();
         if (message != null)
         {
             using ( message )
             {
                 string path = Core.FileResourceManager.GetUniqueTempDirectory();
                 path = Path.Combine(path, SaveToMSGAction.GetFileName(resource) + ".msg");
                 message.SaveToMSG(path);
                 try
                 {
                     Process.Start(path);
                 }
                 catch (Exception e)
                 {
                     Utils.DisplayException(e, "Can't open file");
                 }
             }
         }
     }
     else
     {
         if (pairIDs == null)
         {
             return;
         }
         new ResourceProxy(resource).SetPropAsync(Core.Props.IsUnread, false);
         OutlookFacadeHelper.DisplayMessage(pairIDs.EntryId, pairIDs.StoreId);
     }
 }
Esempio n. 2
0
 protected override void ExecuteAction(IResource resource, PairIDs pairIDs)
 {
     if (pairIDs == null)
     {
         return;
     }
     Tracer._Trace("Execute action: PrintMessageAction");
     OutlookFacadeHelper.PrintMessage(pairIDs.EntryId, pairIDs.StoreId);
 }
Esempio n. 3
0
 protected override void ExecuteAction(IResource resource, PairIDs pairIDs)
 {
     Tracer._Trace("Execute action: ForwardMessageAction");
     MarkAsReadOnReply.Do(resource);
     if (pairIDs == null)
     {
         return;
     }
     OutlookFacadeHelper.ForwardMessage(pairIDs.EntryId, pairIDs.StoreId);
 }
Esempio n. 4
0
 protected override void ExecuteAction(IResourceList selectedResources)
 {
     if (selectedResources.Count == 1)
     {
         base.ExecuteAction(selectedResources);
     }
     else
     {
         string[] files = SaveMessages(selectedResources);
         OutlookFacadeHelper.CreateNewMessage("", "", EmailBodyFormat.PlainText, (IResourceList)null, files, true);
     }
 }
Esempio n. 5
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);
            }
        }
Esempio n. 6
0
 private static void ExecuteImpl()
 {
     OutlookFacadeHelper.CreateNewMessage(null, null, EmailBodyFormat.PlainText, (IResourceList)null, null, true);
 }