Example #1
0
        //--------------------------------------------------------------------//
        //                                                        M e t h o d //
        // r e p o r t B o d y S t a t i s t i c s                            //
        //--------------------------------------------------------------------//
        //                                                                    //
        // Write details of Statistics to report file.                        //
        //                                                                    //
        //--------------------------------------------------------------------//

        private static void reportBodyStatistics(
            ReportCore.eRptFileFmt rptFileFmt,
            Object writer,
            DataTable table)
        {
            const Int32 colCt = 5;

            const String c0Name = PrnParseConstants.cRptS_colName_Seq;
            const String c1Name = PrnParseConstants.cRptS_colName_Desc;
            const String c2Name = PrnParseConstants.cRptS_colName_CtP;
            const String c3Name = PrnParseConstants.cRptS_colName_CtE;
            const String c4Name = PrnParseConstants.cRptS_colName_CtT;

            const Int32 lc0 = PrnParseConstants.cRptS_colMax_Seq;
            const Int32 lc1 = PrnParseConstants.cRptS_colMax_Desc;
            const Int32 lc2 = PrnParseConstants.cRptS_colMax_CtP;
            const Int32 lc3 = PrnParseConstants.cRptS_colMax_CtE;
            const Int32 lc4 = PrnParseConstants.cRptS_colMax_CtT;

            String[] colNames;
            Int32[]  colSizes;

            Int32 ctItems;

            ctItems = table.Rows.Count;

            colNames = new String[colCt] {
                c0Name, c1Name, c2Name, c3Name, c4Name
            };
            colSizes = new Int32[colCt] {
                lc0, lc1, lc2, lc3, lc4
            };

            //----------------------------------------------------------------//
            //                                                                //
            // Open the table and Write the column header text.               //
            //                                                                //
            //----------------------------------------------------------------//

            ReportCore.tableHddrData(writer, rptFileFmt, false,
                                     colCt, colNames, colSizes);

            //----------------------------------------------------------------//
            //                                                                //
            // Write the data rows.                                           //
            //                                                                //
            //----------------------------------------------------------------//

            for (Int32 i = 0; i < ctItems; i++)
            {
                DataRow row = table.Rows[i];

                ReportCore.tableRowData(
                    writer, rptFileFmt,
                    ReportCore.eRptChkMarks.text,   // not used by this tool //
                    colCt, null,
                    row, colNames, colSizes);
            }

            //----------------------------------------------------------------//
            //                                                                //
            // Write any required end tags.                                   //
            //                                                                //
            //----------------------------------------------------------------//

            ReportCore.tableClose(writer, rptFileFmt);
        }
Example #2
0
        //--------------------------------------------------------------------//
        //                                                        M e t h o d //
        // r e p o r t B o d y C o n t e n t                                  //
        //--------------------------------------------------------------------//
        //                                                                    //
        // Write details of Content to report file.                           //
        //                                                                    //
        //--------------------------------------------------------------------//

        private static void reportBodyContent(
            ReportCore.eRptFileFmt rptFileFmt,
            Object writer,
            DataTable table,
            Boolean flagOffsetHex)
        {
            const Int32 colCt = 3;

            const String c0Name = PrnParseConstants.cRptC_colName_Offset;
            const String c1Name = PrnParseConstants.cRptC_colName_Hex;
            const String c2Name = PrnParseConstants.cRptC_colName_Text;

            const Int32 lc0 = PrnParseConstants.cRptC_colMax_Offset;
            const Int32 lc1 = PrnParseConstants.cRptC_colMax_Hex;
            const Int32 lc2 = PrnParseConstants.cRptC_colMax_Text;

            String c0Hddr;

            String[] colHddrs;
            String[] colNames;
            Int32[]  colSizes;

            Int32 ctItems;

            ctItems = table.Rows.Count;

            if (flagOffsetHex)
            {
                c0Hddr = c0Name + ": hex";
            }
            else
            {
                c0Hddr = c0Name + ": dec";
            }

            colHddrs = new String[colCt] {
                c0Hddr, c1Name, c2Name
            };
            colNames = new String[colCt] {
                c0Name, c1Name, c2Name
            };
            colSizes = new Int32[colCt] {
                lc0, lc1, lc2
            };

            ctItems = table.Rows.Count;

            if (flagOffsetHex)
            {
                c0Hddr = c0Name + ": hex";
            }
            else
            {
                c0Hddr = c0Name + ": dec";
            }

            //----------------------------------------------------------------//
            //                                                                //
            // Open the table and Write the column header text.               //
            //                                                                //
            //----------------------------------------------------------------//

            ReportCore.tableHddrData(writer, rptFileFmt, false,
                                     colCt, colHddrs, colSizes);

            //----------------------------------------------------------------//
            //                                                                //
            // Write the data rows.                                           //
            //                                                                //
            //----------------------------------------------------------------//

            for (Int32 i = 0; i < ctItems; i++)
            {
                DataRow row = table.Rows[i];

                ReportCore.tableRowData(
                    writer, rptFileFmt,
                    ReportCore.eRptChkMarks.text,   // not used by this tool //
                    colCt, null,
                    row, colNames, colSizes);
            }

            //----------------------------------------------------------------//
            //                                                                //
            // Write any required end tags.                                   //
            //                                                                //
            //----------------------------------------------------------------//

            ReportCore.tableClose(writer, rptFileFmt);
        }
        //--------------------------------------------------------------------//
        //                                                        M e t h o d //
        // r e p o r t B o d y S t d                                          //
        //--------------------------------------------------------------------//
        //                                                                    //
        // Write details of specified two-column table to report file.        //
        //                                                                    //
        //--------------------------------------------------------------------//

        private static void reportBodyStd(
            ReportCore.eRptFileFmt rptFileFmt,
            ReportCore.eRptChkMarks rptChkMarks,
            Object writer,
            DataTable table)
        {
            const Int32 colCt = 2;

            const String c0Name = "Name";
            const String c1Name = "Value";

            const Int32 lc0 = 21;
            const Int32 lc1 = 57;

            String[] colHddrs;
            String[] colNames;
            Int32[]  colSizes;

            Int32 ctItems;

            ctItems = table.Rows.Count;

            colHddrs = new String[colCt] {
                c0Name, c1Name
            };
            colNames = new String[colCt] {
                c0Name, c1Name
            };
            colSizes = new Int32[colCt] {
                lc0, lc1
            };

            ctItems = table.Rows.Count;

            //----------------------------------------------------------------//
            //                                                                //
            // Open the table and Write the column header text.               //
            //                                                                //
            //----------------------------------------------------------------//

            ReportCore.tableHddrData(writer, rptFileFmt, false,
                                     colCt, colHddrs, colSizes);

            //----------------------------------------------------------------//
            //                                                                //
            // Write the data rows.                                           //
            //                                                                //
            //----------------------------------------------------------------//

            for (Int32 i = 0; i < ctItems; i++)
            {
                DataRow row = table.Rows[i];

                ReportCore.tableRowData(writer, rptFileFmt, rptChkMarks,
                                        colCt, null,
                                        row, colNames, colSizes);
            }

            //----------------------------------------------------------------//
            //                                                                //
            // Write any required end tags.                                   //
            //                                                                //
            //----------------------------------------------------------------//

            ReportCore.tableClose(writer, rptFileFmt);
        }
Example #4
0
        //--------------------------------------------------------------------//
        //                                                        M e t h o d //
        // r e p o r t B o d y A n a l y s i s                                //
        //--------------------------------------------------------------------//
        //                                                                    //
        // Write details of Analysis to report file.                          //
        //                                                                    //
        //--------------------------------------------------------------------//

        private static void reportBodyAnalysis(
            ReportCore.eRptFileFmt rptFileFmt,
            Object writer,
            DataTable table,
            Boolean flagOffsetHex)
        {
            const Int32 colCt = 4;

            const String c0Name = PrnParseConstants.cRptA_colName_Offset;
            const String c1Name = PrnParseConstants.cRptA_colName_Type;
            const String c2Name = PrnParseConstants.cRptA_colName_Seq;
            const String c3Name = PrnParseConstants.cRptA_colName_Desc;

            const Int32 lc0 = PrnParseConstants.cRptA_colMax_Offset;
            const Int32 lc1 = PrnParseConstants.cRptA_colMax_Type;
            const Int32 lc2 = PrnParseConstants.cRptA_colMax_Seq;
            const Int32 lc3 = PrnParseConstants.cRptA_colMax_Desc;

            const String rtName = PrnParseConstants.cRptA_colName_RowType;

            String c0Hddr;

            String[] colHddrs;
            String[] colNames;
            Int32[]  colSizes;

            Int32 ctItems;

            ctItems = table.Rows.Count;

            if (flagOffsetHex)
            {
                c0Hddr = c0Name + ": hex";
            }
            else
            {
                c0Hddr = c0Name + ": dec";
            }

            colHddrs = new String[colCt] {
                c0Hddr, c1Name, c2Name, c3Name
            };
            colNames = new String[colCt] {
                c0Name, c1Name, c2Name, c3Name
            };
            colSizes = new Int32[colCt] {
                lc0, lc1, lc2, lc3
            };

            //----------------------------------------------------------------//
            //                                                                //
            // Open the table and Write the column header text.               //
            //                                                                //
            //----------------------------------------------------------------//

            ReportCore.tableHddrData(writer, rptFileFmt, false,
                                     colCt, colHddrs, colSizes);

            //----------------------------------------------------------------//
            //                                                                //
            // Write the data rows.                                           //
            //                                                                //
            //----------------------------------------------------------------//

            for (Int32 i = 0; i < ctItems; i++)
            {
                DataRow row = table.Rows[i];

                Int32 indxRowType = (Int32)row[rtName];

                String rowType = Enum.GetName
                                     (typeof(PrnParseRowTypes.eType),
                                     indxRowType);

                ReportCore.tableRowData(
                    writer, rptFileFmt,
                    ReportCore.eRptChkMarks.text,   // not used by this tool //
                    colCt, rowType,
                    row, colNames, colSizes);
            }

            //----------------------------------------------------------------//
            //                                                                //
            // Write any required end tags.                                   //
            //                                                                //
            //----------------------------------------------------------------//

            ReportCore.tableClose(writer, rptFileFmt);
        }
        //--------------------------------------------------------------------//
        //                                                        M e t h o d //
        // r e p o r t B o d y C h a r s                                      //
        //--------------------------------------------------------------------//
        //                                                                    //
        // Write details of generated characters to report file.              //
        //                                                                    //
        //--------------------------------------------------------------------//

        private static void reportBodyChars(
            ReportCore.eRptFileFmt rptFileFmt,
            ReportCore.eRptChkMarks rptChkMarks,
            Object writer,
            DataTable table)
        {
            const Int32 colCt = 13;

            const String c0Name  = "DecCode";
            const String c1Name  = "HexCode";
            const String c2Name  = "Unicode";
            const String c3Name  = "Glyph";
            const String c4Name  = "Abs";
            const String c5Name  = "Prev";
            const String c6Name  = "Comp";
            const String c7Name  = "Depth";
            const String c8Name  = "Width";
            const String c9Name  = "LSB";
            const String c10Name = "Height";
            const String c11Name = "TSB";
            const String c12Name = "Length";

            const String c0Hddr  = "DecCode";
            const String c1Hddr  = "HexCode";
            const String c2Hddr  = "Unicode";
            const String c3Hddr  = "Glyph";
            const String c4Hddr  = "Abs?";
            const String c5Hddr  = "Prev?";
            const String c6Hddr  = "Comp?";
            const String c7Hddr  = "Depth";
            const String c8Hddr  = "Width";
            const String c9Hddr  = "LSB";
            const String c10Hddr = "Height";
            const String c11Hddr = "TSB";
            const String c12Hddr = "Length";

            const Int32 lc0  = 7;
            const Int32 lc1  = 7;
            const Int32 lc2  = 7;
            const Int32 lc3  = 5;
            const Int32 lc4  = 5;
            const Int32 lc5  = 5;
            const Int32 lc6  = 5;
            const Int32 lc7  = 5;
            const Int32 lc8  = 5;
            const Int32 lc9  = 6;
            const Int32 lc10 = 6;
            const Int32 lc11 = 6;
            const Int32 lc12 = 6;

            String[] colHddrs;
            String[] colNames;
            Int32[]  colSizes;

            Int32 ctItems;

            ctItems = table.Rows.Count;

            colHddrs = new String[colCt] {
                c0Hddr, c1Hddr, c2Hddr, c3Hddr,
                c4Hddr, c5Hddr, c6Hddr, c7Hddr,
                c8Hddr, c9Hddr, c10Hddr, c11Hddr,
                c12Hddr
            };
            colNames = new String[colCt] {
                c0Name, c1Name, c2Name, c3Name,
                c4Name, c5Name, c6Name, c7Name,
                c8Name, c9Name, c10Name, c11Name,
                c12Name
            };
            colSizes = new Int32[colCt] {
                lc0, lc1, lc2, lc3,
                lc4, lc5, lc6, lc7,
                lc8, lc9, lc10, lc11,
                lc12
            };

            //----------------------------------------------------------------//
            //                                                                //
            // Open the table and Write the column header text.               //
            //                                                                //
            //----------------------------------------------------------------//

            ReportCore.tableHddrData(writer, rptFileFmt, false,
                                     colCt, colHddrs, colSizes);

            //----------------------------------------------------------------//
            //                                                                //
            // Write the data rows.                                           //
            //                                                                //
            //----------------------------------------------------------------//

            for (Int32 i = 0; i < ctItems; i++)
            {
                DataRow row = table.Rows[i];

                ReportCore.tableRowData(writer, rptFileFmt, rptChkMarks,
                                        colCt, null,
                                        row, colNames, colSizes);
            }

            //----------------------------------------------------------------//
            //                                                                //
            // Write any required end tags.                                   //
            //                                                                //
            //----------------------------------------------------------------//

            ReportCore.tableClose(writer, rptFileFmt);
        }