Exemplo n.º 1
0
 private void SetCategories(IEMessage message, ref bool wasChanges)
 {
     if (ExportCategories.ProcessCategories(message, _task))
     {
         wasChanges = true;
     }
 }
Exemplo n.º 2
0
 private void LinkAddedOrDeleted(object sender, LinkEventArgs e)
 {
     if (e.Source.Type == STR.Email)
     {
         if (e.Target.Type == STR.Category && Settings.SyncMailCategory)
         {
             ExportCategories.Do(JobPriority.AboveNormal, e.Source);
         }
         else if (e.Target.Type == STR.Flag)
         {
             ExportEmailFlag.Do(JobPriority.AboveNormal, e.Source);
         }
     }
     else
     if (e.Source.Type == STR.Task)
     {
         if (e.Target.Type == STR.Category && Settings.SyncTaskCategory)
         {
             ExportCategories.Do(JobPriority.AboveNormal, e.Source);
         }
     }
     else
     if (e.Source.Type == STR.Contact)
     {
         if (e.Target.Type == STR.Category && Settings.SyncContactCategory)
         {
             OutlookSession.OutlookProcessor.QueueJob(JobPriority.AboveNormal, new ExportContactCategoryDescriptor(e.Source));
         }
     }
 }
Exemplo n.º 3
0
        private void ProcessCategories(IResource category, string resType)
        {
            IResourceList resources = category.GetLinksOfType(resType, "Category");

            foreach (IResource resource in resources)
            {
                ExportCategories.Do(JobPriority.AboveNormal, resource);
            }
        }
Exemplo n.º 4
0
        protected override void Execute()
        {
            IEMAPIProp message = OpenMessage(_contact, false, true, true);

            if (message == null)
            {
                if (_newCreated)
                {
                    _tracer.Trace("Cannot Export NEW contact for resource id = " + _contact.Id);
                }
                _tracer.Trace("Cannot Export contact for resource id = " + _contact.Id);
                return;
            }
            using ( message )
            {
                ExportCategories.ProcessCategories(message, _contact);
                OutlookSession.SaveChanges(_newCreated, "Export contact for resource id = " + _contact.Id, message, message.GetBinProp(MAPIConst.PR_ENTRYID));
            }
        }
Exemplo n.º 5
0
        public override bool CreateNewMessage(string subject, string body, EmailBodyFormat bodyFormat, IResourceList recipients,
                                              string[] attachments, bool useTemplatesInBody)
        {
            ArrayList recipientsArray = null;
            ArrayList categories      = new ArrayList(  );

            if (recipients != null && recipients.Count > 0)
            {
                recipientsArray = GetRecipientsArray(recipients);
                foreach (IResource recipient in recipients)
                {
                    if (recipient.Type == "Contact")
                    {
                        IResourceList resCategories = Core.CategoryManager.GetResourceCategories(recipient);
                        ExportCategories.LoadCategoriesArrayList(resCategories, categories);
                    }
                }
            }
            return(CreateNewMessage(subject, body, bodyFormat, recipientsArray, attachments, useTemplatesInBody, categories));
        }
Exemplo n.º 6
0
 private void SetCategories(IEMAPIProp message)
 {
     ExportCategories.ProcessCategories(message, _contact);
 }