Exemplo n.º 1
0
        public void SetColumnProperties(int columnIndex, double widthInPoints, byte columnOutlineLevel, bool collapsed)
        {
            if (columnIndex > this.MaxColumns)
            {
                throw new ReportRenderingException(ExcelRenderRes.MaxColExceededInSheet(columnIndex.ToString(CultureInfo.InvariantCulture), this.MaxColumns.ToString(CultureInfo.InvariantCulture)));
            }
            ColumnProperties columnProperties = this._currentSheet.GetColumnProperties(columnIndex);

            columnProperties.Width = widthInPoints;
            if (columnOutlineLevel > 7)
            {
                columnOutlineLevel = 7;
            }
            columnProperties.OutlineLevel     = columnOutlineLevel;
            columnProperties.OutlineCollapsed = collapsed;
            columnProperties.Hidden           = collapsed;
            List <Picture> list = default(List <Picture>);

            if (this._picturesToUpdateByStartColumn.TryGetValue(columnIndex, out list))
            {
                foreach (Picture item in list)
                {
                    item.UpdateColumnOffset(widthInPoints, true);
                }
            }
            if (this._picturesToUpdateByEndColumn.TryGetValue(columnIndex, out list))
            {
                foreach (Picture item2 in list)
                {
                    item2.UpdateColumnOffset(widthInPoints, false);
                }
            }
        }
Exemplo n.º 2
0
 public override bool Equals(object obj)
 {
     if (obj != null && obj is ColumnProperties)
     {
         if (obj == this)
         {
             return(true);
         }
         ColumnProperties columnProperties = (ColumnProperties)obj;
         return(columnProperties.mModel.Equals(this.mModel));
     }
     return(false);
 }