Esempio n. 1
0
 /// <summary>
 /// Create a new instance of datasource item
 /// </summary>
 public DataSourceItem()
 {
     fields = new FieldItemCollection(this);
 }
Esempio n. 2
0
 internal void SetCollection(FieldItemCollection col)
 {
     collection = col;
 }
Esempio n. 3
0
        private double GetFieldHeaderHeight(FieldItemCollection collection, System.Drawing.Font font)
        {
            double height = 0;
            double fontHeight = GetFontHeight(font);
            double maxHeight = 0;

            foreach (FieldItem field in collection)
            {
                if (field.NewLine)
                {
                    height += maxHeight;
                    maxHeight = 0;
                }
                maxHeight = Math.Max(maxHeight, GetStringHeight(field.Caption, fontHeight));
            }

            height += maxHeight;

            return height;
        }