Ejemplo n.º 1
0
 public void AttachmentCustomItem_Click(Microsoft.Office.Core.CommandBarButton button, ref bool CancelDefault)
 {
     NuxeoAttachList attachList = new NuxeoAttachList();
     try
     {
         attachList.init(this.attachment);
         attachList.ShowDialog();
         attachList.Close();
     }
     catch (Exception e)
     {
         FormError bob = new FormError(e.ToString(), "Erreur lors de l'initialisation du plugin."
             + System.Environment.NewLine + "Veuillez redémarrez le programme, vérifiez vos paramètres de connection et réessayez ou contactez l'administrateur si le problème persiste.");
         bob.ShowDialog();
         System.Diagnostics.Trace.TraceError("Problème Initialisation NuxeoDocList :" + e);
         using (System.IO.StreamWriter file = new System.IO.StreamWriter(appDataFolterPath + "\\" + folderConfigName + @"\tmp\error.log", true))
         {
             file.WriteLine(e + "\n\t\n\t");
             file.Close();
         }
     }
 }
Ejemplo n.º 2
0
 public void OnMyButtonClick(Office.IRibbonControl control)
 {
     NuxeoAttachList nuxeo = new NuxeoAttachList();
     try
     {
         if (control.Context is Outlook.AttachmentSelection)
         {
             Outlook.AttachmentSelection attachSel =
                 control.Context as Outlook.AttachmentSelection;
             foreach (Outlook.Attachment attach in attachSel)
             {
                 nuxeo.init(attach);
                 nuxeo.ShowDialog();
                 nuxeo.Close();
             }
         }
     }
     catch (Exception e)
     {
         FormError bob = new FormError(e.ToString(), "Erreur lors de l'initialisation du plugin."
         + System.Environment.NewLine + "Veuillez redémarrez le programme, vérifiez vos paramètres de connection et réessayez ou contactez l'administrateur si le problème persiste.");
         bob.ShowDialog();
     }
 }