Esempio n. 1
0
 /// <summary>
 /// Print job on selected printers
 /// </summary>
 /// <param name="cb"></param>
 public void print(Action <Exception> cb)
 {
     stateDetails = "";
     Printing();
     // Job printing
     // Looks like more optimal solution will be sending job to "Printers" class and it will decise print job or not... Just idea...
     try
     {
         if (
             (printer.triggerGet(docType) == false) &
             (autoprinted == true)
             )
         {
             Skipped(quantity());
             cb(null);
         }
         else
         {
             //Console.WriteLine("File path for print: {0} | {1} | {2}", localFilePath, fileName, document);
             printer.print(localFilePath, fileName, document);
             Printed();
             cb(null);
         }
     }
     catch (Exception err)
     {
         this.err = err;
         Error();
         cb(err);
     }
 }
Esempio n. 2
0
        void init(DocumentType type, Printer printer)
        {
            this.docType = type.type;
            this.printer = printer;
            Checked      = printer.triggerGet(docType);
            // Create the ToolTip and associate with the Form container.
            ToolTip tt = new ToolTip();

            // Set up the delays for the ToolTip.
            tt.AutoPopDelay = 5000;
            tt.InitialDelay = 1000;
            tt.ReshowDelay  = 500;
            // Force the ToolTip text to be displayed whether or not the form is active.
            tt.ShowAlways = true;
            SetToolTip(tt, ttText);
        }