Beispiel #1
0
        private GType GetType(string filename, DXFUnit dxfu, Dictionary <DXFUnit, GType> types)
        {
            GType gType = null;

            if (!types.ContainsKey(dxfu))
            {
                gType      = CreateType(dxfu);
                gType.Name = Path.GetFileNameWithoutExtension(filename) + dxfu.ToString( );
                types.Add(dxfu, gType);
            }
            else
            {
                gType = types[dxfu];
            }
            return(gType);
        }
Beispiel #2
0
        GType CreateType(DXFUnit dxf)
        {
            switch (dxf)
            {
            case DXFUnit.Point:
                return(CreateType(GeomType.Point));

            case DXFUnit.Text:
                return(CreateType(GeomType.Caption));

            case DXFUnit.Polygon:
                return(CreateType(GeomType.Polygon));

            case DXFUnit.Polyline:
                return(CreateType(GeomType.Polyline));

            default:
                throw new DXFReaderException("Type \'" + dxf.ToString( ) + "\' not implemented");
//					cnterr++;
//					return CreateType( GeomType.Polyline );
//					break;
            }
        }