예제 #1
0
파일: Class325.cs 프로젝트: 15831944/WW
        public override void ResolveReferences(Class374 modelBuilder)
        {
            base.ResolveReferences(modelBuilder);
            DxfVPort handledObject = (DxfVPort)this.HandledObject;

            if (this.ulong_2 != 0UL)
            {
                DxfUcs dxfUcs = modelBuilder.method_4 <DxfUcs>(this.ulong_2);
                if (dxfUcs != null)
                {
                    handledObject.Ucs = dxfUcs;
                }
            }
            if (this.ulong_3 != 0UL)
            {
                DxfUcs dxfUcs = modelBuilder.method_4 <DxfUcs>(this.ulong_3);
                if (dxfUcs != null)
                {
                    handledObject.Ucs = dxfUcs;
                }
            }
            if (string.IsNullOrEmpty(this.string_0))
            {
                return;
            }
            string[] strArray = this.string_0.Split('$');
            if (strArray == null || strArray.Length != 2)
            {
                return;
            }
            string colorBookName = strArray[0];
            string name          = strArray[1];

            handledObject.AmbientColor = Color.smethod_1(handledObject.AmbientColor.Data, colorBookName, name);
        }
예제 #2
0
파일: CAD.cs 프로젝트: xeon-ye/GSYGeo
        /// <summary>
        /// 方法,保存CAD图形
        /// </summary>
        /// <param name="_path">保存路径</param>
        /// <param name="_vportCenter">保存视图的中心坐标</param>
        /// <param name="_vportHeight">保存视图的高度</param>
        public void SaveAsDwg(string _path, double _vportCenterX, double _vportCenterY, double _vportHeight)
        {
            DxfVPort vport = DxfVPort.CreateActiveVPort();

            vport.Center = new Point2D(_vportCenterX, _vportCenterY);
            vport.Height = _vportHeight;
            Model.VPorts.Add(vport);

            DwgWriter.Write(_path, Model);
        }
예제 #3
0
        private void method_1(Class374 modelBuilder, ulong handle, int i)
        {
            DxfModel         model            = modelBuilder.Model;
            DxfHandledObject dxfHandledObject = modelBuilder.method_3(handle);
            DxfVPort         dxfVport         = dxfHandledObject as DxfVPort;

            if (dxfVport != null)
            {
                model.VPorts.Add(dxfVport);
            }
            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
                        }
                    }
                });
            }
        }
예제 #4
0
파일: Class906.cs 프로젝트: 15831944/WW
        internal static DxfVPort smethod_7(CloneContext cloneContext, DxfVPort from)
        {
            if (from == null)
            {
                return((DxfVPort)null);
            }
            if (from.Name == null)
            {
                throw new Exception("Table record name is null.");
            }
            if (cloneContext.SourceModel == cloneContext.TargetModel)
            {
                return(from);
            }
            DxfVPort dxfVport1 = (DxfVPort)cloneContext.GetExistingClone((IGraphCloneable)from);

            if (dxfVport1 == null)
            {
                cloneContext.TargetModel.VPorts.TryGetValue(from.Name, out dxfVport1);
            }
            if (dxfVport1 == null)
            {
                switch (cloneContext.ReferenceResolutionType)
                {
                case ReferenceResolutionType.CloneMissing:
                    DxfVPort dxfVport2 = (DxfVPort)from.Clone(cloneContext);
                    if (!cloneContext.CloneExact)
                    {
                        cloneContext.TargetModel.VPorts.Add(dxfVport2);
                    }
                    dxfVport1 = dxfVport2;
                    break;

                case ReferenceResolutionType.FailOnMissing:
                    throw new DxfException(string.Format("Could not resolve reference to VPORT with name {0}", (object)from.Name));
                }
            }
            return(dxfVport1);
        }
예제 #5
0
파일: Class325.cs 프로젝트: 15831944/WW
 public Class325(DxfVPort vport)
     : base((DxfHandledObject)vport)
 {
 }
예제 #6
0
 public void Visit(DxfVPort value)
 {
     this.dxfHandledObject_0 = (DxfHandledObject)Class906.smethod_7(this.cloneContext_0, value);
 }