public void CheckCircuit(SpecificElement se, int level) { se.visited = true; int ACfound = 0; foreach (SpecificElement se2 in se.GetElements()) { if (RemoveNumbers(se2.GetName()) != "AC" && !se2.visited) { CheckCircuit(se2, level + 1); if (circuitFull) { hgc.ShowCheckCircuitBox(se2.GetElement()); break; } } else if (RemoveNumbers(se2.GetName()) == "AC" && !se2.visited) { circuitFull = true; hgc.ShowCheckCircuitBox(se2.GetElement()); break; } ACfound++; } if (circuitFull) { hgc.ShowCheckCircuitBox(se.GetElement()); } }
public void AddElementToList(string name, Image img) { SpecificElement se = new SpecificElement(name, img); seList.Add(se); }
public void AddElement(SpecificElement se) { seList.Add(se); }
public Element_features(SpecificElement se) { InitializeComponent(); this.se = se; UpdateTextBoxes(); }