public string OutConnEquation() { startNode = conn.GetStart(); endNode = conn.GetEnd(); string equation = "V" + startNode.GetName() + " = " + "V" + endNode.GetName(); return (equation); }
public void SetDeviceMergeNode() { ArrayList MergeNodeList = GetMergeNodeList(); Device currentDevice = new Device(); Node deviceNode1 = new Node(); Node deviceNode2 = new Node(); Node deviceNode3 = new Node(); Node currentNode = new Node(); MergeNode mNode; dEnum = dList.GetEnumerator(); IEnumerator mnlEnum = MergeNodeList.GetEnumerator(); IEnumerator mnEnum = MergeNodeList.GetEnumerator(); //for each device in the device list while(dEnum.MoveNext()) { currentDevice = (Device)dEnum.Current; deviceNode1 = currentDevice.GetNode1(); deviceNode2 = currentDevice.GetNode2(); //for each mergeNode in the mergeNodeList mnlEnum = MergeNodeList.GetEnumerator(); while(mnlEnum.MoveNext()) { mNode = (MergeNode)mnlEnum.Current; mnEnum = mNode.getList().GetEnumerator(); //for each node in the mergeNode while(mnEnum.MoveNext()) { currentNode = (Node)mnEnum.Current; if(currentNode.GetName().Equals(deviceNode1.GetName())) { currentDevice.SetMergeNode1(mNode); } if(currentDevice.GetNode2()!=null) { if(currentNode.GetName().Equals(deviceNode2.GetName())) { currentDevice.SetMergeNode2(mNode); } } if(currentDevice.GetNode3()!=null) { deviceNode3 = currentDevice.GetNode3(); if(currentNode.GetName().Equals(deviceNode3.GetName())) { currentDevice.SetMergeNode3(mNode); } } } } } }