Exemplo n.º 1
0
        internal Class430 Clone(CloneContext cloneContext)
        {
            Class430 class430 = new Class430();

            class430.CopyFrom(this, cloneContext);
            return(class430);
        }
Exemplo n.º 2
0
 private void CopyFrom(Class430 from, CloneContext cloneContext)
 {
     this.double_0 = from.double_0;
     foreach (Class1026 class1026 in (ActiveList <Class1026>)from.class1025_0)
     {
         this.class1025_0.Add(class1026.Clone(cloneContext));
     }
 }
Exemplo n.º 3
0
        internal void method_7(int value, bool mergeTitleRowCells)
        {
            int count = this.class912_0.Count;

            if (value > this.class429_0.Count)
            {
                this.bool_0 = true;
                int num = value - this.class429_0.Count;
                for (int index1 = 0; index1 < num; ++index1)
                {
                    Class430 class430 = new Class430();
                    for (int index2 = 0; index2 < count; ++index2)
                    {
                        class430.Cells.Add(new Class1026());
                    }
                    this.class429_0.Add(class430);
                    if (mergeTitleRowCells && this.class429_0.Count == 1 && (count > 1 && !this.method_4()))
                    {
                        class430.Cells[0].MergedCellCountHorizontal = (int)(short)count;
                    }
                }
                this.bool_0 = false;
            }
            else
            {
                if (value >= this.class429_0.Count)
                {
                    return;
                }
                this.bool_0 = true;
                int num = this.class429_0.Count - value;
                for (int index = 0; index < num; ++index)
                {
                    this.class429_0.RemoveAt(value);
                }
                this.bool_0 = false;
            }
        }
Exemplo n.º 4
0
 private void InitRowCells(int index, Class430 item)
 {
     if (!this.bool_0)
     {
         int count = this.class912_0.Count;
         if (item.Cells.Count < count)
         {
             int num = count - item.Cells.Count;
             for (int index1 = 0; index1 < num; ++index1)
             {
                 item.Cells.Add(new Class1026());
             }
         }
         else if (item.Cells.Count > count)
         {
             throw new ArgumentException("More cells in row than ColumnCount.");
         }
         if (index == 0 && !this.method_4() && count > 1)
         {
             item.Cells[0].MergedCellCountHorizontal = (int)(short)count;
         }
     }
     item.method_0(this);
 }
Exemplo n.º 5
0
 private void method_19(object sender, int index, Class430 item)
 {
     this.InitRowCells(index, item);
 }
Exemplo n.º 6
0
 private void method_18(object sender, int index, Class430 oldItem, Class430 newItem)
 {
     oldItem.method_0((Class551)null);
     this.InitRowCells(index, newItem);
 }
Exemplo n.º 7
0
 private void method_17(object sender, int index, Class430 item)
 {
     item.method_0((Class551)null);
 }
Exemplo n.º 8
0
        public void method_0(DxfTable table, DxfTableContent tableContent)
        {
            this.vector3D_0 = table.HorizontalDirection;
            int num = tableContent.RowCount;

            if (table.BreakData != null && table.BreakData.OptionFlags != TableBreakOptionFlags.None && table.BreakData.RowRanges.Count > 0)
            {
                num = table.BreakData.RowRanges[0].EndRowIndex + 1;
            }
            this.method_7(num, false);
            this.method_8(tableContent.ColumnCount, false);
            if (tableContent.TableStyle == null)
            {
                throw new ArgumentException("Table style is not set on table content.");
            }
            this.TableStyle           = tableContent.TableStyle;
            this.FlowDirection        = tableContent.FlowDirection;
            this.SuppressTitle        = tableContent.SuppressTitle == this.TableStyle.SuppressTitle ? new bool?() : new bool?(tableContent.SuppressTitle);
            this.SuppressHeaderRow    = tableContent.SuppressHeaderRow == this.TableStyle.SuppressHeaderRow ? new bool?() : new bool?(tableContent.SuppressHeaderRow);
            this.VerticalCellMargin   = !tableContent.CellStyleOverrides.OverrideVerticalMargin ? new double?() : new double?(tableContent.CellStyleOverrides.VerticalMargin);
            this.HorizontalCellMargin = !tableContent.CellStyleOverrides.OverrideHorizontalMargin ? new double?() : new double?(tableContent.CellStyleOverrides.HorizontalMargin);
            for (int rowIndex = 0; rowIndex < this.RowCount; ++rowIndex)
            {
                Class430    class430 = this.class429_0[rowIndex];
                DxfTableRow row      = tableContent.Rows[rowIndex];
                class430.Height = row.Height;
                for (int columnIndex = 0; columnIndex < this.ColumnCount; ++columnIndex)
                {
                    Class1026            cell1 = class430.Cells[columnIndex];
                    DxfTableCell         cell2 = row.Cells[columnIndex];
                    TableCellContentType tableCellContentType1 = TableCellContentType.Value;
                    DxfTableCellContent  tableCellContent      = (DxfTableCellContent)null;
                    DxfTableCellStyle    cellStyle             = this.GetCellStyle(rowIndex, columnIndex);
                    TableCellContentType tableCellContentType2;
                    if (cell2.Contents.Count > 0)
                    {
                        tableCellContentType1 = TableCellContentType.Value;
                        tableCellContentType1 = TableCellContentType.Value;
                        tableCellContent      = cell2.Contents[0];
                        tableCellContentType2 = tableCellContent.ContentType;
                        switch (tableCellContentType2)
                        {
                        case TableCellContentType.Value:
                        case TableCellContentType.Field:
                            break;

                        case TableCellContentType.Block:
                            cell1.CellType = Enum47.const_2;
                            cell1.Value.method_0(DxfValueFormat.GeneralInstance);
                            cell1.Value.method_1((object)null);
                            cell1.Value.method_2((string)null);
                            cell1.AutoFit    = table.GetAutoScale(rowIndex, columnIndex, -1);
                            cell1.BlockScale = table.GetBlockScale(rowIndex, columnIndex, -1);
                            cell1.Rotation   = table.GetRotation(rowIndex, columnIndex, -1);
                            if (tableCellContent != null)
                            {
                                cell1.BlockOrField = (DxfHandledObject)(tableCellContent.ValueObject as DxfBlock);
                                cell1.AutoFit      = table.GetAutoScale(rowIndex, columnIndex, 0);
                                cell1.BlockScale   = table.GetBlockScale(rowIndex, columnIndex, 0);
                                cell1.Rotation     = table.GetRotation(rowIndex, columnIndex, 0);
                                goto label_16;
                            }
                            else
                            {
                                goto label_16;
                            }

                        default:
                            goto label_16;
                        }
                    }
                    else
                    {
                        tableCellContentType1 = TableCellContentType.Value;
                        tableCellContentType2 = TableCellContentType.Value;
                    }
                    cell1.CellType = Enum47.const_1;
                    if (tableCellContent != null)
                    {
                        cell1.BlockOrField = tableCellContentType2 != TableCellContentType.Field ? (DxfHandledObject)null : tableCellContent.ValueObject;
                        cell1.Value.CopyFromShallow(tableCellContent.Value);
                        double?rotationOverride = table.GetRotationOverride(rowIndex, columnIndex, 0, cellStyle);
                        cell1.Rotation   = rotationOverride.HasValue ? rotationOverride.Value : 0.0;
                        cell1.TextStyle  = table.GetTextStyleOverride(rowIndex, columnIndex, 0, cellStyle);
                        cell1.TextHeight = table.GetTextHeightOverride(rowIndex, columnIndex, 0, cellStyle);
                    }
                    else
                    {
                        cell1.BlockOrField = (DxfHandledObject)null;
                        if (cell2.Contents.Count > 0)
                        {
                            cell1.Value.CopyFromShallow(cell2.Contents[0].Value);
                        }
                        double?rotationOverride = table.GetRotationOverride(rowIndex, columnIndex, -1, cellStyle);
                        cell1.Rotation   = rotationOverride.HasValue ? rotationOverride.Value : 0.0;
                        cell1.TextStyle  = table.GetTextStyleOverride(rowIndex, columnIndex, -1, cellStyle);
                        cell1.TextHeight = table.GetTextHeightOverride(rowIndex, columnIndex, -1, cellStyle);
                    }
label_16:
                    cell1.CellAlignment = table.GetCellAlignmentOverride(rowIndex, columnIndex, -1, cellStyle);
                    Color?contentColorOverride = table.GetContentColorOverride(rowIndex, columnIndex, -1, cellStyle);
                    cell1.ContentColor = contentColorOverride.HasValue ? new Color?(contentColorOverride.Value) : new Color?();
                    Color?backColor = table.GetBackColor(rowIndex, columnIndex);
                    if (backColor.HasValue)
                    {
                        cell1.BackColor          = new Color?(backColor.Value);
                        cell1.IsBackColorEnabled = new bool?(true);
                    }
                    else
                    {
                        cell1.BackColor          = new Color?();
                        cell1.IsBackColorEnabled = new bool?();
                    }
                    for (int borderIndex = 0; borderIndex < 4; ++borderIndex)
                    {
                        DxfTableBorder          dxfTableBorder       = cell2.CellStyleOverrides.method_21(borderIndex + 2);
                        DxfTableBorderOverrides tableBorderOverrides = cell1.method_6(borderIndex);
                        tableBorderOverrides.Color      = !dxfTableBorder.OverrideColor ? new Color?() : new Color?(dxfTableBorder.Color);
                        tableBorderOverrides.LineWeight = !dxfTableBorder.OverrideLineWeight ? new short?() : new short?(dxfTableBorder.LineWeight);
                        tableBorderOverrides.Visible    = !dxfTableBorder.OverrideVisibility ? new bool?() : new bool?(dxfTableBorder.Visible);
                    }
                }
            }
            for (int index = 0; index < this.ColumnCount; ++index)
            {
                this.class912_0[index].Width = tableContent.Columns[index].Width;
            }
            foreach (DxfTableCellRange mergedCellRange in (List <DxfTableCellRange>)tableContent.MergedCellRanges)
            {
                if ((mergedCellRange.TopRowIndex != mergedCellRange.BottomRowIndex || mergedCellRange.LeftColumnIndex != mergedCellRange.RightColumnIndex) && (mergedCellRange.TopRowIndex < this.RowCount && mergedCellRange.LeftColumnIndex < this.ColumnCount))
                {
                    Class1026 cell = this.class429_0[mergedCellRange.TopRowIndex].Cells[mergedCellRange.LeftColumnIndex];
                    cell.MergedCellCountHorizontal = mergedCellRange.RightColumnIndex - mergedCellRange.LeftColumnIndex + 1;
                    cell.MergedCellCountVertical   = mergedCellRange.BottomRowIndex - mergedCellRange.TopRowIndex + 1;
                }
            }
        }
Exemplo n.º 9
0
 internal void method_3(Class430 tableRow)
 {
     this.class430_0 = tableRow;
 }