Пример #1
0
 public DrawingStyle(DrawingStyle style)
 {
     name         = style.name;
     fontFileName = style.fontFileName;
     textHeight   = style.textHeight;
     widthFactor  = style.widthFactor;
     obliqueAngle = style.obliqueAngle;
     mirrorX      = style.mirrorX;
     mirrorY      = style.mirrorY;
 }
Пример #2
0
 public Schematic(DXFFile file, Viewer viewer, Canvas canvas)
 {
     foreach (List <string> style in file.styles)
     {
         DrawingStyle currentStyle = new DrawingStyle().parse(style);
         styles.Add(currentStyle.name.ToUpper(), currentStyle);
     }
     foreach (List <string> layer in file.layers)
     {
         Layer currentLayer = new Layer().parse(layer);
         layers.Add(currentLayer.name.ToUpper(), currentLayer);
     }
     if (!layers.ContainsKey("0"))
     {
         layers.Add("0", new Layer());
     }
     header = new Header(file.header);
     foreach (string type in file.entities.Keys)
     {
         foreach (List <string> section in file.entities[type])
         {
             try
             {
                 entities.Add(EntityFactory.makeEntity(type, section, this, viewer));
             }
             catch (EntityNotSupportedException ex)
             {
                 Console.WriteLine(ex.Message);
             }
         }
     }
     foreach (List <string> blockSection in file.blocks)
     {
         Block currentBlock = new Block(canvas).parse(blockSection, this, viewer);
         blocks.Add(currentBlock.name, currentBlock);
     }
 }