Esempio n. 1
0
 public void method_2(Enum47 cellType)
 {
     this.bool_0 = true;
     ++this.int_6;
     this.int_4                = this.int_6 / this.class551_0.ColumnCount;
     this.int_5                = this.int_6 % this.class551_0.ColumnCount;
     this.class1026_0          = this.class551_0.Rows[this.int_4].Cells[this.int_5];
     this.class1026_0.CellType = cellType;
     this.class330_0           = new Class330(this.class1026_0);
     this.list_0.Add((Interface10)this.class330_0);
 }
Esempio n. 2
0
        private void CopyFrom(Class1026 from, CloneContext cloneContext)
        {
            this.enum47_0   = from.enum47_0;
            this.bool_0     = from.bool_0;
            this.int_0      = from.int_0;
            this.int_1      = from.int_1;
            this.double_0   = from.double_0;
            this.dxfValue_0 = from.dxfValue_0 != null?from.dxfValue_0.Clone(cloneContext) : (DxfValue)null;

            if (from.BlockOrField != null)
            {
                if (cloneContext.SourceModel == cloneContext.TargetModel)
                {
                    this.BlockOrField = from.BlockOrField;
                }
                else
                {
                    DxfBlock blockOrField = from.BlockOrField as DxfBlock;
                    if (blockOrField != null)
                    {
                        DxfBlock dxfBlock;
                        if (!cloneContext.TargetModel.Blocks.TryGetValue(blockOrField.Name, out dxfBlock))
                        {
                            if (cloneContext.ReferenceResolutionType == ReferenceResolutionType.CloneMissing)
                            {
                                dxfBlock = (DxfBlock)from.BlockOrField.Clone(cloneContext);
                                if (!cloneContext.CloneExact)
                                {
                                    cloneContext.TargetModel.Blocks.Add(dxfBlock);
                                }
                            }
                            else if (cloneContext.ReferenceResolutionType == ReferenceResolutionType.FailOnMissing)
                            {
                                throw new DxfException("Block with name " + blockOrField.Name + " not present in target model.");
                            }
                            this.BlockOrField = (DxfHandledObject)dxfBlock;
                        }
                    }
                    else
                    {
                        DxfField dxfField = (DxfField)from.BlockOrField.Clone(cloneContext);
                        if (!cloneContext.TargetModel.FieldList.Fields.Contains(dxfField))
                        {
                            cloneContext.TargetModel.FieldList.Fields.Add(dxfField);
                        }
                        this.BlockOrField = (DxfHandledObject)dxfField;
                    }
                }
            }
            this.double_1 = from.double_1;
            if (from.dxfTableAttributeCollection_0 != null)
            {
                foreach (DxfTableAttribute dxfTableAttribute in (List <DxfTableAttribute>)from.dxfTableAttributeCollection_0)
                {
                    this.Attributes.Add(dxfTableAttribute.Clone(cloneContext));
                }
            }
            if (from.TextStyle != null)
            {
                if (cloneContext.SourceModel == cloneContext.TargetModel)
                {
                    this.TextStyle = from.TextStyle;
                }
                else
                {
                    DxfTextStyle textStyle;
                    if (cloneContext.TargetModel.TextStyles.TryGetValue(from.TextStyle.Name, out textStyle))
                    {
                        this.TextStyle = textStyle;
                    }
                    else
                    {
                        if (cloneContext.ReferenceResolutionType != ReferenceResolutionType.CloneMissing)
                        {
                            throw new DxfException("Text style with name " + from.TextStyle.Name + " not present in target model.");
                        }
                        this.TextStyle = (DxfTextStyle)from.TextStyle.Clone(cloneContext);
                        if (!cloneContext.CloneExact)
                        {
                            cloneContext.TargetModel.TextStyles.Add(this.TextStyle);
                        }
                    }
                }
            }
            this.nullable_0 = from.nullable_0;
            this.nullable_1 = from.nullable_1;
            this.nullable_2 = from.nullable_2;
            this.nullable_3 = from.nullable_3;
            this.nullable_4 = from.nullable_4;
            this.dxfTableBorderOverrides_0.CopyFrom(from.dxfTableBorderOverrides_0, cloneContext);
            this.dxfTableBorderOverrides_1.CopyFrom(from.dxfTableBorderOverrides_1, cloneContext);
            this.dxfTableBorderOverrides_2.CopyFrom(from.dxfTableBorderOverrides_2, cloneContext);
            this.dxfTableBorderOverrides_3.CopyFrom(from.dxfTableBorderOverrides_3, cloneContext);
            this.int_2 = from.int_2;
        }