Ejemplo n.º 1
0
        public void BeginPrinting(UInt16 Index, PlotterPenInfo Pen)
        {
            DTPMaster.CheckConnAndVal();

            StartTime = DateTime.Now;
            if (ContentMaster == null)
            {
                ContentMaster = new PlotterContent(Master);
            }

            if (!ContentMaster.ContentTable.VectorAdresses.Contains(Index))
            {
                RaiseErrorEvent(PrintErrorType.CantFoundFileWithSpecifiedIndex);
                return;
            }
            VectorMetaData metaData = ContentMaster.GetVectorMetaData(Index);

            if (XSize == 0)
            {
                XSize = GetXsize(metaData.Width, metaData.Height, YSize);
            }
            else
            {
                YSize = GetYsize(metaData.Width, metaData.Height, XSize);
            }
            GetCoefficients(new SizeF(metaData.Width, metaData.Height));
            try
            {
                ph.StartPrinting(Pen.ElevationDelta, Pen.ElevationCorrection, (UInt16)XCoef, (UInt16)YCoef, Index);
            }
            catch
            {
                RaiseErrorEvent(PrintErrorType.CantFoundFileWithSpecifiedIndex);
                return;
            }
            Printing = true;

            Thread.Sleep(1000);

            StatusRequestTimer = new Thread(StatusRequestTimerHandler);
            StatusRequestTimer.Start();
        }
Ejemplo n.º 2
0
 public bool MoveTool(PlotterPenInfo pen, bool UpDirrection)
 {
     DTPMaster.CheckConnAndVal();
     return(ph.MoveTool(0, 0, UpDirrection ? (Int16)(pen.ElevationCorrection + pen.ElevationDelta) : (Int16)pen.ElevationDelta));
 }