예제 #1
0
파일: Class319`1.cs 프로젝트: 15831944/WW
        private void method_1(Class374 modelBuilder, ulong handle, int i)
        {
            DxfHandledObject dxfHandledObject = modelBuilder.method_3(handle);
            T obj = dxfHandledObject as T;

            if ((object)obj != null)
            {
                if (this.keyedDxfHandledObjectCollection_0.Contains(obj.Name))
                {
                    string name = obj.Name;
                    do
                    {
                        obj.Name = string.Format("AUDIT_{0}", (object)modelBuilder.method_21());
                    }while (this.keyedDxfHandledObjectCollection_0.Contains(obj.Name));
                    this.keyedDxfHandledObjectCollection_0.Add(obj);
                    modelBuilder.Messages.Add(new DxfMessage(DxfStatus.AuditRepairedDuplicateName, Severity.Warning)
                    {
                        Parameters =
                        {
                            {
                                "Class",
                                (object)obj.GetType().FullName
                            },
                            {
                                "OriginalName",
                                (object)name
                            },
                            {
                                "RepairedName",
                                (object)obj.Name
                            }
                        }
                    });
                }
                else
                {
                    this.keyedDxfHandledObjectCollection_0.Add(obj);
                }
            }
            else
            {
                if (dxfHandledObject == null)
                {
                    return;
                }
                modelBuilder.Messages.Add(new DxfMessage(DxfStatus.WrongType, Severity.Error)
                {
                    Parameters =
                    {
                        {
                            "Handle",
                            (object)handle
                        },
                        {
                            "Type",
                            (object)dxfHandledObject.GetType()
                        },
                        {
                            "ExpectedType",
                            (object)typeof(DxfAppId)
                        },
                        {
                            "Index",
                            (object)i
                        }
                    }
                });
            }
        }
예제 #2
0
        private void method_1(Class374 modelBuilder, ulong handle, int i)
        {
            DxfModel         model            = modelBuilder.Model;
            DxfHandledObject dxfHandledObject = modelBuilder.method_3(handle);
            DxfTextStyle     dxfTextStyle     = dxfHandledObject as DxfTextStyle;

            if (dxfTextStyle != null)
            {
                if (!string.IsNullOrEmpty(dxfTextStyle.Name) && model.TextStyles.Contains(dxfTextStyle.Name))
                {
                    string name = dxfTextStyle.Name;
                    do
                    {
                        dxfTextStyle.Name = string.Format("AUDIT_{0}", (object)modelBuilder.method_21());
                    }while (model.TextStyles.Contains(dxfTextStyle.Name));
                    model.TextStyles.Add(dxfTextStyle);
                    modelBuilder.Messages.Add(new DxfMessage(DxfStatus.AuditRepairedDuplicateName, Severity.Warning)
                    {
                        Parameters =
                        {
                            {
                                "Class",
                                (object)"AcDbTextStyleTableRecord"
                            },
                            {
                                "OriginalName",
                                (object)name
                            },
                            {
                                "RepairedName",
                                (object)dxfTextStyle.Name
                            }
                        }
                    });
                }
                else
                {
                    model.TextStyles.Add(dxfTextStyle);
                }
            }
            else
            {
                if (dxfHandledObject == null)
                {
                    return;
                }
                modelBuilder.Messages.Add(new DxfMessage(DxfStatus.WrongType, Severity.Error)
                {
                    Parameters =
                    {
                        {
                            "Handle",
                            (object)handle
                        },
                        {
                            "Type",
                            (object)dxfHandledObject.GetType()
                        },
                        {
                            "ExpectedType",
                            (object)typeof(DxfAppId)
                        },
                        {
                            "Index",
                            (object)i
                        }
                    }
                });
            }
        }