Пример #1
0
        /// <summary>method write report's main box custom sections to document grid
        /// </summary>
        protected override int WriteCustomSectionToMainBox()
        {
            const double fontSize   = m_FontSize + 2;
            const double leftMargin = m_LeftMargin + 18;
            const double topMargin  = m_TopMargin + 6;

            int  rowsCount = m_ReportData.ResultRowsCount + 1;
            Grid grid      = XPSHelper.GetGrid(XPSHelper.GetFullWidthGridColWidthArray(new double[] { 0.4, 1.5, 2.5 }, m_LeftMargin), rowsCount);

            grid.Margin = new Thickness(leftMargin, topMargin, 0, 0);

            for (int i = 0; i < rowsCount; i++)
            {
                for (int j = 0; j < ResultColumnsHeaders.GetLength(0); j++)
                {
                    if (i == 0)
                    {
                        XPSHelper.WriteTextBlockToGrid(ResultColumnsHeaders[j], grid, i, j + 1, HorizontalAlignment.Left, VerticalAlignment.Top, null, fontSize, null, FontWeights.Bold, true);
                    }
                    else
                    {
                        XPSHelper.WriteTextBlockToGrid(m_ReportData.GetResultCellValue(i - 1, j), grid, i, j + 1, HorizontalAlignment.Left, VerticalAlignment.Top, null, fontSize);
                    }
                }
            }

            return(m_ReportDocument.WriteRowContent(grid));
        }
Пример #2
0
        /// <summary>method write diagnosis comment
        /// </summary>
        /// <param name="commentBody">diagnosis comment body text</param>
        /// <param name="fontSize">diagnosis comment font size</param>
        /// <param name="leftMargin">diagnosis comment left margin</param>
        /// <param name="topMargin">diagnosis comment top margin</param>
        private void WriteDiagnosisComment(string commentBody, double fontSize, double leftMargin, double topMargin)
        {
            Grid grid = XPSHelper.GetGrid(XPSHelper.GetFullWidthGridColWidthArray(new double[] { 0.8 }), 1, 0, new Thickness(leftMargin, topMargin, 0, 0));

            XPSHelper.WriteTextBlockToGrid(CommentLabel, grid, 0, 0, HorizontalAlignment.Left, VerticalAlignment.Top, null, fontSize, null, FontWeights.Bold);
            XPSHelper.WriteTextBlockToGrid(commentBody, grid, 0, 1, HorizontalAlignment.Left, VerticalAlignment.Top, null, fontSize, null, null, false, true);
            m_ReportDocument.WriteRowContent(grid);
        }
Пример #3
0
        /// <summary>method write "Ancillary Studies" section
        /// </summary>
        private void WriteAncillaryStudiesSection()
        {
            WriteSimpleSectionWithTitle(AncillaryStudiesTitle, m_ReportData.AncillaryStudiesHeaderText);

            int  rowsCount = m_ReportData.AncillaryStudiesCount;
            Grid grid      = XPSHelper.GetGrid(XPSHelper.GetFullWidthGridColWidthArray(new double[] { 0.4, 2.1, 1.2 }), rowsCount * 3);

            for (int i = 0; i < rowsCount; i++)
            {
                WriteAncillaryStudyRow(grid, i);
            }
            m_ReportDocument.WriteRowContent(grid);
        }
Пример #4
0
        /// <summary>method write "Result Data" and "Specimen Information" sections to document grid
        /// </summary>
        private void WriteResultDataAndSpecimenInformation()
        {
            const double leftMargin = m_LeftMargin;
            const double topMargin  = m_TopMargin;

            double[] colWidth = XPSHelper.GetFullWidthGridColWidthArray(new double[] { 3.4 }, leftMargin);
            Grid     grid     = XPSHelper.GetGrid(colWidth, 1);

            grid.Margin = new Thickness(leftMargin, topMargin, 0, 0);

            XPSHelper.WriteItemToGrid(WriteResultData(), grid, 0, 0);
            XPSHelper.WriteItemToGrid(WriteSpecimenInformation(), grid, 0, 1);
            m_ReportDocument.WriteRowContent(grid);
        }
Пример #5
0
        /// <summary>method write report's main box custom sections to document grid
        /// </summary>
        /// <returns>main box first row index</returns>
        protected override int WriteCustomSectionToMainBox()
        {
            const double fontSize = m_FontSize + 2;
            Grid         grid     = XPSHelper.GetGrid(XPSHelper.GetFullWidthGridColWidthArray(new double[] { 2.1 }), 3);

            WriteResultUnderlinedHeader(grid);

            int rowIndex = 1;

            XPSHelper.WriteTextBlockToGrid(m_ReportData.TestNameText, grid, rowIndex, 0, HorizontalAlignment.Right, VerticalAlignment.Top, new Thickness(0, 5, 0, 0), fontSize, null, FontWeights.Bold);
            XPSHelper.WriteTextBlockToGrid(m_ReportData.TestResultText, grid, rowIndex++, 1, HorizontalAlignment.Left, VerticalAlignment.Top, new Thickness(20, 5, 0, 0), fontSize, null, FontWeights.Bold);
            XPSHelper.WriteTextBlockToGrid(m_ReportData.ResultCommentText, grid, rowIndex++, 1, HorizontalAlignment.Left, VerticalAlignment.Top, new Thickness(20, 0, 5, 0), fontSize, null, FontWeights.Bold, false, true);

            return(m_ReportDocument.WriteRowContent(grid));
        }
Пример #6
0
        /// <summary>method write report's main box custom sections to document grid
        /// </summary>
        protected override int WriteCustomSectionToMainBox()
        {
            const double fontSize = m_FontSize + 2;

            Thickness rowMargin = new Thickness(0, -3, 0, 0);
            Grid      grid      = XPSHelper.GetGrid(XPSHelper.GetFullWidthGridColWidthArray(new double[] { 0.7, 0.55, 4.0, 0.8, 0.3 }), 5);

            WriteResultUnderlinedHeader(grid);

            int rowIndex = 2;

            XPSHelper.WriteTextBlockToGrid(TestNameText, grid, rowIndex, 1, HorizontalAlignment.Left, VerticalAlignment.Top, null, fontSize, null, FontWeights.Bold);
            XPSHelper.WriteTextBlockToGrid(m_ReportData.TestResultText, grid, rowIndex++, 2, HorizontalAlignment.Left, VerticalAlignment.Top, null, fontSize, null, FontWeights.Bold);
            XPSHelper.WriteTextBlockToGrid(m_ReportData.TestResultValue, grid, rowIndex++, 2, HorizontalAlignment.Left, VerticalAlignment.Top, rowMargin, fontSize, null, FontWeights.Bold);

            WriteReferenceTableSectionToMainBox(grid, fontSize, rowMargin);

            return(m_ReportDocument.WriteRowContent(grid));
        }
Пример #7
0
        /// <summary>method write report's main box custom sections to document grid
        /// </summary>
        protected override int WriteCustomSectionToMainBox()
        {
            const double fontSize   = m_FontSize + 2;
            const double leftMargin = m_LeftMargin + 18;
            const double topMargin  = m_TopMargin + 6;
            const int    rowCount   = 3;

            Grid grid = XPSHelper.GetGrid(XPSHelper.GetFullWidthGridColWidthArray(new double[] { 0.5, 1.5 }, m_LeftMargin), rowCount);

            grid.Margin = new Thickness(leftMargin, topMargin, 0, 0);

            int rowIndex = 0;

            XPSHelper.WriteTextBlockToGrid(YpReportBase.ResultLabel, grid, rowIndex++, 0, HorizontalAlignment.Left, VerticalAlignment.Top, null, fontSize, null, FontWeights.Bold, false, false, 0, 3);
            XPSHelper.WriteTextBlockToGrid(m_ReportData.TestNameText, grid, rowIndex, 1, HorizontalAlignment.Left, VerticalAlignment.Top, null, fontSize, null, FontWeights.Bold);
            XPSHelper.WriteTextBlockToGrid(m_ReportData.TestResultText, grid, rowIndex++, 2, HorizontalAlignment.Left, VerticalAlignment.Top, null, fontSize, null, FontWeights.Bold);
            XPSHelper.WriteTextBlockToGrid(m_ReportData.ResultCommentText, grid, rowIndex++, 2, HorizontalAlignment.Left, VerticalAlignment.Top, null, fontSize, null, FontWeights.Bold);

            return(m_ReportDocument.WriteRowContent(grid));
        }