예제 #1
0
파일: Block.cs 프로젝트: vicban3d/Hackaton
 public Block addBlock(String name, String type, String info)
 {
     Block newBlock;
     if (type.Equals("repeating")) newBlock = new RepeatingBlock(name, info);
     else if (type.Equals("single")) newBlock = new SingleBlock(name, info);
     else if (type.Equals("optional")) newBlock = new OptionalBlock(name, info);
     else if (type.Equals("dependent")) newBlock = new DependBlock(name, info);
     else return null;
     data.AddLast(newBlock);
     return newBlock;
 }
예제 #2
0
파일: GUI.cs 프로젝트: vicban3d/Hackaton
 public void drawData(DependBlock data)
 {
     createLabel(data.getName() + " (" + data.getInfoName() + ")", data.getInfo() + "\r\n\r\nThis field may or may not appear depending on " + data.getInfoName() + " field.\r\n");
     structureDepth++;
     foreach (Data child in data.getChildren())
     {
         structureIndex++;
         child.drawData(this);
     }
     structureDepth--;
 }