public void ContruirVistaPrevia(Dictionary <int, Orden> ordenes) { BLPaciente enlace = new BLPaciente(); FormatoImpresion fichero; foreach (Orden orden in ordenes.Values) { fichero = ConstructorFicha.GetInstance().CrearDocumento(orden, enlace.ObtenerPerfilPorId(orden.IdPaciente), BLExamen.RecuperarExamenes(orden)); ficheros.Add(fichero); } this.printPreviewDialog = new PrintPreviewDialog(); this.printPreviewDialog.ClientSize = new System.Drawing.Size(400, 300); this.printPreviewDialog.Location = new System.Drawing.Point(29, 29); this.printPreviewDialog.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.printPreviewDialog.Name = "Vista Previa de Impresión"; hojaSize.Height = 1170; hojaSize.Width = 827; PrintDocument pd = new PrintDocument(); pd.DefaultPageSettings.PaperSize = new PaperSize("A4", 827, 1170); // all sizes are converted from mm to inches & then multiplied by 100. pd.PrintPage += new PrintPageEventHandler(this.pd_PrintPage); printPreviewDialog.Document = pd; printPreviewDialog.ShowDialog(); indexFichero = 0; ficheros.Clear(); }
public static ConstructorFicha GetInstance() { if (clasificador == null) { clasificador = new ConstructorFicha(); } return(clasificador); }