OpenInOffice() public méthode

public OpenInOffice ( IDocTemplate template, bool readOnly, FileEditMode mode, bool silentPrint = false ) : void
template IDocTemplate
readOnly bool
mode FileEditMode
silentPrint bool
Résultat void
 protected void OnButtonPrintClicked(object sender, EventArgs e)
 {
     BeforeOpen?.Invoke(this, EventArgs.Empty);
     if (CanOpenDocument)
     {
         worker.OpenInOffice(Template, true, FileEditMode.Document, true);
     }
     CanOpenDocument = true;
 }
 public static void PrintDocuments(IWorker worker, IList<ITemplatePrntDoc> docs)
 {
     using (FileWorker fileWorker = new FileWorker())
     {
         int step = 0;
         foreach (var document in docs)
         {
             worker.ReportProgress(step, document.Name);
             var template = document.GetTemplate();
             if (template != null)
                 fileWorker.OpenInOffice(template, true, FileEditMode.Document, true);
             if (worker.IsCancelled)
                 return;
             step++;
         }
     }
 }
Exemple #3
0
 public static void PrintDocuments(IWorker worker, IList <IPrintableOdtDocument> docs)
 {
     using (FileWorker fileWorker = new FileWorker())
     {
         int step = 0;
         foreach (var document in docs)
         {
             worker.ReportProgress(step, document.Name);
             var template = document.GetTemplate();
             int copies   = document.CopiesToPrint;
             if (template != null)
             {
                 fileWorker.OpenInOffice(template, true, FileEditMode.Document, copies, PrintSettings);
             }
             if (worker.IsCancelled)
             {
                 return;
             }
             step++;
         }
     }
 }