示例#1
0
        void impresora_PrintPage(object sender, PrintPageEventArgs e)
        {
            GraficadorGDI g = new GraficadorGDI(e.Graphics);

            //e.Graphics.ResetTransform();
            //e.Graphics.PageUnit = GraphicsUnit.Display;
            g.CambiarResolucion(96, 96);//Utilizar resolucion pantalla
            e.HasMorePages = _impgenerica.PrintNextPage(g);
        }
示例#2
0
 /*
  * protected void RegistrarPosicionSinc(float x, float y, bool ampliarSeleccion)
  * {
  *  using (Graphics g = Graphics.FromHwnd(this.Handle))
  *  {
  *      float posx = x - deltax;
  *      float posy = y - deltay;
  *      GraficadorGDI graf = new GraficadorGDI(g);
  *      _baa.IrAPosicion(graf.Traducir(new PointF(posx, posy)), ampliarSeleccion);
  *  }
  * }*/
 private Punto TranslatePoint(PointF punto)
 {
     using (Graphics g = Graphics.FromHwnd(Handle))
     {
         using (GraficadorGDI gr = new GraficadorGDI(g))
         {
             return(gr.Traducir(punto));
         }
     }
 }
示例#3
0
        public SWPEditorControl()
            : base()
        {
            DoubleBuffered = true;

            Documento _documento = new Documento();

            _clipboard = new SWPClipboard();
            _base      = new SWPGenericControl(GraficadorGDI.ObtenerGraficadorConsultas());
            this.SetStyle(ControlStyles.Selectable, true);
            Enabled = true;
            Visible = true;
            _base.PrintRequested   += new EventHandler(_base_PrintRequested);
            _base.RefreshRequested += new EventHandler(_base_RefreshRequested);
        }
示例#4
0
 protected override void OnPaint(PaintEventArgs e)
 {
     base.OnPaint(e);
     try
     {
         using (IGraficador graf = new GraficadorGDI(e.Graphics))
         {
             _base.DrawDesktop(graf, true, true);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message +
                         "\r\n" +
                         ex.StackTrace);
     }
 }