private void mnuReprint_Click(object sender, EventArgs e) { try { if (!_DicomMedicalViewer.IsValidCell()) return; if (blnHasjustClick) return; blnHasjustClick = true; AutoCropImageWhenPanOrZoomIn(_CurrCell); SaveImg(); //Test to see //pnlDirectPrint.BringToFront(); Thread.Sleep(10); //Chuyển vào Thread để burn chữ và in _DicomMedicalViewer._medicalViewerPrintDirect = new MedicalViewer(1, 1); _DicomMedicalViewer._medicalViewerPrintDirect.Location = new Point(0, 0); _DicomMedicalViewer._medicalViewerPrintDirect.Size = new Size(pnlDirectPrint.ClientRectangle.Right, pnlDirectPrint.ClientRectangle.Bottom); pnlDirectPrint.Controls.Add(_DicomMedicalViewer._medicalViewerPrintDirect); MedicalViewerMultiCell cell = new MedicalViewerMultiCell(); cell.Columns = 1; cell.Rows = 1; AddNewMecicalViewerCell(_DicomMedicalViewer._medicalViewerPrintDirect, cell); cell.FitImageToCell = true; cell.Image = _CurrCell.Image.CloneAll(); cell.Tag = _CurrCell.Tag; cell.TabIndex = GetSelectedScheduled().DETAIL_ID; cell.Selected = true; cell.Refresh(); _DicomMedicalViewer._medicalViewerPrintDirect.Invalidate(); rePrint = true; PrintImg(); } catch { } finally { blnHasjustClick = false; } }