Exemple #1
0
 ///<summary>If the specified section exists, then this returns its height. Otherwise it returns 0.</summary>
 public int GetSectionHeight(AreaSectionType sectionType)
 {
     if (!_sections.Contains(sectionType))
     {
         return(0);
     }
     return(_sections[sectionType].Height);
 }
Exemple #2
0
 ///<summary>Creates a BoxObject with the specified name, section, color and line thickness.  The box will be offset of its position in pixels according to the given X/Y values.</summary>
 public ReportObject(string name, AreaSectionType sectionType, Color color, float lineThickness, int offSetX, int offSetY)
 {
     _name               = name;
     _sectionType        = sectionType;
     _foreColor          = color;
     _floatLineThickness = lineThickness;
     _offSetX            = offSetX;
     _offSetY            = offSetY;
     _reportObjectType   = ReportObjectType.BoxObject;
 }
 ///<summary></summary>
 public bool Contains(AreaSectionType kind)
 {
     foreach (Section section in List)
     {
         if (section.SectionType == kind)
         {
             return(true);
         }
     }
     return(false);
 }
 ///<summary></summary>
 public int IndexOf(AreaSectionType kind)
 {
     foreach (Section section in List)
     {
         if (section.SectionType == kind)
         {
             return(IndexOf(section));
         }
     }
     return(-1);
 }
Exemple #5
0
 ///<summary>Creates a LineObject with the specified name, section, color, line thickness, line orientation, line position and percent.  Orientation determines whether the line is horizontal or vertical.  Position determines which side of the section the line draws on.  Percent determines how much of available space the line will take up.  The line will be offset of its position in pixels according to the given X/Y values.</summary>
 public ReportObject(string name, AreaSectionType sectionType, Color color, float lineThickness, LineOrientation lineOrientation, LinePosition linePosition, int linePercent, int offSetX, int offSetY)
 {
     _name               = name;
     _sectionType        = sectionType;
     _foreColor          = color;
     _floatLineThickness = lineThickness;
     _lineOrientation    = lineOrientation;
     _linePosition       = linePosition;
     _intLinePercent     = linePercent;
     _offSetX            = offSetX;
     _offSetY            = offSetY;
     _reportObjectType   = ReportObjectType.LineObject;
 }
Exemple #6
0
 ///<summary>Creates a TextObject with the specified name, section, location and size.  The staticText and font will determine what and how it displays, while the contentAlignment will determine the relative location in the text area.  The text will be offset of its position in pixels according to the given X/Y values.</summary>
 public ReportObject(string name, AreaSectionType sectionType, Point location, Size size, string staticText, Font font, ContentAlignment contentAlignment, int offSetX, int offSetY)
 {
     _name             = name;
     _sectionType      = sectionType;
     _location         = location;
     _size             = size;
     _staticText       = staticText;
     _font             = font;
     _contentAlignment = contentAlignment;
     _offSetX          = offSetX;
     _offSetY          = offSetY;
     _foreColor        = Color.Black;
     _reportObjectType = ReportObjectType.TextObject;
 }
        /*
         * ///<summary>Returns the Section with the given index.</summary>
         * public Section this[int index]{
         * get{
         *              return((Section)List[index]);
         * }
         * //set{
         *      //	List[index]=value;
         * //}
         * }*/

        ///<summary>Returns the Section with the given type.</summary>
        public Section this[AreaSectionType kind] {
            get{
                foreach (Section section in List)
                {
                    if (section.SectionType == kind)
                    {
                        return(section);
                    }
                }
                return(null);
            }
            //set{
            //	List[index]=value;
            //}
        }
Exemple #8
0
 ///<summary>Currently only used for page numbers.</summary>
 public ReportObject(string name, AreaSectionType sectionType, Point location, Size size, FieldValueType fieldValueType, SpecialFieldType specialType, Font font, ContentAlignment contentAlignment, string stringFormat)
 {
     _name             = name;
     _sectionType      = sectionType;
     _location         = location;
     _size             = size;
     _font             = font;
     _contentAlignment = contentAlignment;
     _stringFormat     = stringFormat;
     _fieldDefKind     = FieldDefKind.SpecialField;
     _fieldValueType   = fieldValueType;
     _specialFieldType = specialType;
     //defaults:
     _foreColor        = Color.Black;
     _reportObjectType = ReportObjectType.FieldObject;
 }
Exemple #9
0
 ///<summary>Mainly used from inside QueryObject.  Creates a SummaryFieldObject with the specified name, section, location, size, summaryOperation, summarizedFieldName, font, contentAlignment and stringFormat.  SummaryOperation determines what calculation will be used when summarizing the column.  SummarizedFieldName determines the field that will be summarized at the bottom of the column.  ContentAlignment determines where the text will be drawn in the box.  StringFormat is used to determined how a ToString() method call will format the field text.</summary>
 public ReportObject(string name, AreaSectionType sectionType, Point location, Size size, SummaryOperation summaryOperation, string summarizedFieldName, Font font, ContentAlignment contentAlignment, string stringFormat)
 {
     _name                = name;
     _sectionType         = sectionType;
     _location            = location;
     _size                = size;
     _font                = font;
     _contentAlignment    = contentAlignment;
     _stringFormat        = stringFormat;
     _fieldDefKind        = FieldDefKind.SummaryField;
     _fieldValueType      = FieldValueType.Number;
     _summaryOperation    = summaryOperation;
     _summarizedFieldName = summarizedFieldName;
     //defaults:
     _foreColor        = Color.Black;
     _reportObjectType = ReportObjectType.FieldObject;
 }
Exemple #10
0
 ///<summary>Mainly used from inside QueryObject.  Creates a GroupSummaryObject with the specified name, section, location, size, color, summaryOperation, summarizedFieldName, font, datafield, and offsets.  SummaryOperation determines what calculation will be used when summarizing the group of column.  SummarizedFieldName determines the field that will be summarized and must be the same in each of the queries.  Datafield determines which column the summary will draw under.  The summary will be offset of its position in pixels according to the given X/Y values.</summary>
 public ReportObject(string name, AreaSectionType sectionType, Point location, Size size, Color color, SummaryOperation summaryOperation, string summarizedFieldName, Font font, ContentAlignment contentAlignment, string datafield, int offSetX, int offSetY)
 {
     _name                = name;
     _sectionType         = sectionType;
     _location            = location;
     _size                = size;
     _dataFieldName       = datafield;
     _font                = font;
     _fieldDefKind        = FieldDefKind.SummaryField;
     _fieldValueType      = FieldValueType.Number;
     _summaryOperation    = summaryOperation;
     _summarizedFieldName = summarizedFieldName;
     _offSetX             = offSetX;
     _offSetY             = offSetY;
     _foreColor           = color;
     //defaults:
     _contentAlignment = contentAlignment;
     _reportObjectType = ReportObjectType.TextObject;
 }
Exemple #11
0
 /// <summary></summary>
 public void AddBox(string name, AreaSectionType sectionType, Color color, float lineThickness, int offSetX, int offSetY)
 {
     _reportObjects.Add(new ReportObject(name, sectionType, color, lineThickness, offSetX, offSetY));
 }
Exemple #12
0
 /// <summary></summary>
 public void AddLine(string name, AreaSectionType sectionType, Color color, float lineThickness, LineOrientation lineOrientation, LinePosition linePosition, int linePercent, int offSetX, int offSetY)
 {
     _reportObjects.Add(new ReportObject(name, sectionType, color, lineThickness, lineOrientation, linePosition, linePercent, offSetX, offSetY));
 }
Exemple #13
0
 ///<summary>Creates a LineObject with the specified name, section, color, line thickness, line orientation, line position and percent.  Orientation determines whether the line is horizontal or vertical.  Position determines which side of the section the line draws on.  Percent determines how much of available space the line will take up.</summary>
 public ReportObject(string name, AreaSectionType sectionType, Color color, float lineThickness, LineOrientation lineOrientation, LinePosition linePosition, int linePercent)
     : this(name, sectionType, color, lineThickness, lineOrientation, linePosition, linePercent, 0, 0)
 {
 }
Exemple #14
0
 ///<summary>Creates a BoxObject with the specified name, section, color and line thickness.</summary>
 public ReportObject(string name, AreaSectionType sectionType, Color color, float lineThickness)
     : this(name, sectionType, color, lineThickness, 0, 0)
 {
 }
Exemple #15
0
 ///<summary>Creates a TextObject with the specified name, section, location and size.  The staticText and font will determine what and how it displays, while the contentAlignment will determine the relative location in the text area.</summary>
 public ReportObject(string name, AreaSectionType sectionType, Point location, Size size, string staticText, Font font, ContentAlignment contentAlignment)
     : this(name, sectionType, location, size, staticText, font, contentAlignment, 0, 0)
 {
 }
Exemple #16
0
 ///<summary></summary>
 public Section(AreaSectionType type, int height)
 {
     _sectionType = type;
     _height      = height;
 }