Esempio n. 1
0
 public IShapeRecordEx CreateEx(ShapeRecordType recordType)
 {
     switch (recordType) {
         case ShapeRecordType.EndRecord:
             return new EndShapeRecord();
         case ShapeRecordType.StyleChangeRecord:
             return new StyleChangeShapeRecordEx();
         case ShapeRecordType.StraightEdge:
             return new StraightEdgeShapeRecord();
         case ShapeRecordType.CurvedEdgeRecord:
             return new CurvedEdgeShapeRecord();
         default:
             throw new NotSupportedException();
     }
 }
Esempio n. 2
0
        public IShapeRecordEx CreateEx(ShapeRecordType recordType)
        {
            switch (recordType)
            {
            case ShapeRecordType.EndRecord:
                return(new EndShapeRecord());

            case ShapeRecordType.StyleChangeRecord:
                return(new StyleChangeShapeRecordEx());

            case ShapeRecordType.StraightEdge:
                return(new StraightEdgeShapeRecord());

            case ShapeRecordType.CurvedEdgeRecord:
                return(new CurvedEdgeShapeRecord());

            default:
                throw new NotSupportedException();
            }
        }