Exemplo n.º 1
0
        /// <summary>
        /// Obsolete class, use the classes in the namespace DvtkHighLevelInterface.Common.Compare instead.
        /// </summary>
        /// <param name="numberOfColumns">-</param>
        /// <param name="numberOfAttributeSets">-</param>
        /// <param name="tableDescription">-</param>
        /// <param name="attributeSetDescriptions">-</param>
        /// <returns>-</returns>
        protected internal CompareResults CreateCompareResults(int numberOfColumns, int numberOfAttributeSets, String tableDescription, StringCollection attributeSetDescriptions)
        {
            CompareResults compareResults = new CompareResults(numberOfColumns);
            compareResults.Table.CellItemSeperator = "<br>";

            int index = 0;
            String[] header1 = new String[numberOfColumns];
            String[] header2 = new String[numberOfColumns];
            String[] header3 = new String[numberOfColumns];
            int[] columnWidths = new int[numberOfColumns];

            if (this.displayCommonTag)
            {
                header1[index] = tableDescription;
                header2[index] = "Common info";
                header3[index] = TAG_STRING;
                columnWidths[index] = PIXEL_WIDTH_TAG;
                index++;
            }

            if (this.displayCommonName)
            {
                header1[index] = tableDescription;
                header2[index] = "Common info";
                header3[index] = NAME_STRING;
                columnWidths[index] = PIXEL_WIDTH_NAME;
                index++;
            }

            if (this.displayCommonVR)
            {
                header1[index] = tableDescription;
                header2[index] = "Common info";
                header3[index] = VR_STRING;
                columnWidths[index] = PIXEL_WIDTH_VR;
                index++;
            }

            for (int attributeSetsIndex = 0; attributeSetsIndex < numberOfAttributeSets; attributeSetsIndex++)
            {
                if (this.displayAttributeTag)
                {
                    header1[index] = tableDescription;
                    header2[index] = attributeSetDescriptions[attributeSetsIndex];
                    header3[index] = TAG_STRING;
                    columnWidths[index] = PIXEL_WIDTH_TAG;
                    index++;
                }

                if (this.displayAttributeName)
                {
                    header1[index] = tableDescription;
                    header2[index] = attributeSetDescriptions[attributeSetsIndex];
                    header3[index] = NAME_STRING;
                    columnWidths[index] = PIXEL_WIDTH_NAME;
                    index++;
                }

                if (this.displayAttributePresent)
                {
                    header1[index] = tableDescription;
                    header2[index] = attributeSetDescriptions[attributeSetsIndex];
                    header3[index] = PRESENT_STRING;
                    columnWidths[index] = PIXEL_WIDTH_PRESENT;
                    index++;
                }

                if (this.displayAttributeVR)
                {
                    header1[index] = tableDescription;
                    header2[index] = attributeSetDescriptions[attributeSetsIndex];
                    header3[index] = VR_STRING;
                    columnWidths[index] = PIXEL_WIDTH_VR;
                    index++;
                }

                if (this.displayAttributeValues)
                {
                    header1[index] = tableDescription;
                    header2[index] = attributeSetDescriptions[attributeSetsIndex];
                    header3[index] = VALUES_STRING;
                    columnWidths[index] = PIXEL_WIDTH_VALUES;
                    index++;
                }
            }

            compareResults.Table.AddHeader(header1);
            compareResults.Table.AddHeader(header2);
            compareResults.Table.AddHeader(header3);
            compareResults.Table.SetColumnPixelWidths(columnWidths);
            return(compareResults);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Obsolete class, use the classes in the namespace DvtkHighLevelInterface.Common.Compare instead.
        /// </summary>
        /// <param name="numberOfColumns">-</param>
        /// <param name="numberOfAttributeSets">-</param>
        /// <param name="tableDescription">-</param>
        /// <param name="attributeSetDescriptions">-</param>
        /// <returns>-</returns>
        internal protected CompareResults CreateCompareResults(int numberOfColumns, int numberOfAttributeSets, String tableDescription, StringCollection attributeSetDescriptions)
        {
            CompareResults compareResults = new CompareResults(numberOfColumns);

            compareResults.Table.CellItemSeperator = "<br>";

            int index = 0;

            String[] header1      = new String[numberOfColumns];
            String[] header2      = new String[numberOfColumns];
            String[] header3      = new String[numberOfColumns];
            int[]    columnWidths = new int[numberOfColumns];

            if (this.displayCommonTag)
            {
                header1[index]      = tableDescription;
                header2[index]      = "Common info";
                header3[index]      = TAG_STRING;
                columnWidths[index] = PIXEL_WIDTH_TAG;
                index++;
            }

            if (this.displayCommonName)
            {
                header1[index]      = tableDescription;
                header2[index]      = "Common info";
                header3[index]      = NAME_STRING;
                columnWidths[index] = PIXEL_WIDTH_NAME;
                index++;
            }

            if (this.displayCommonVR)
            {
                header1[index]      = tableDescription;
                header2[index]      = "Common info";
                header3[index]      = VR_STRING;
                columnWidths[index] = PIXEL_WIDTH_VR;
                index++;
            }

            for (int attributeSetsIndex = 0; attributeSetsIndex < numberOfAttributeSets; attributeSetsIndex++)
            {
                if (this.displayAttributeTag)
                {
                    header1[index]      = tableDescription;
                    header2[index]      = attributeSetDescriptions[attributeSetsIndex];
                    header3[index]      = TAG_STRING;
                    columnWidths[index] = PIXEL_WIDTH_TAG;
                    index++;
                }

                if (this.displayAttributeName)
                {
                    header1[index]      = tableDescription;
                    header2[index]      = attributeSetDescriptions[attributeSetsIndex];
                    header3[index]      = NAME_STRING;
                    columnWidths[index] = PIXEL_WIDTH_NAME;
                    index++;
                }

                if (this.displayAttributePresent)
                {
                    header1[index]      = tableDescription;
                    header2[index]      = attributeSetDescriptions[attributeSetsIndex];
                    header3[index]      = PRESENT_STRING;
                    columnWidths[index] = PIXEL_WIDTH_PRESENT;
                    index++;
                }

                if (this.displayAttributeVR)
                {
                    header1[index]      = tableDescription;
                    header2[index]      = attributeSetDescriptions[attributeSetsIndex];
                    header3[index]      = VR_STRING;
                    columnWidths[index] = PIXEL_WIDTH_VR;
                    index++;
                }

                if (this.displayAttributeValues)
                {
                    header1[index]      = tableDescription;
                    header2[index]      = attributeSetDescriptions[attributeSetsIndex];
                    header3[index]      = VALUES_STRING;
                    columnWidths[index] = PIXEL_WIDTH_VALUES;
                    index++;
                }
            }

            compareResults.Table.AddHeader(header1);
            compareResults.Table.AddHeader(header2);
            compareResults.Table.AddHeader(header3);
            compareResults.Table.SetColumnPixelWidths(columnWidths);
            return(compareResults);
        }