//*Class Constructor -- Note Currently only set up for stage signal control different coding required for flow control public SignalsSet(SnmpConnect A, List <string> NodeNames)//NOTE: rather that passing NodeNames it would be better to extract info from model files if possible { Sconnect = A; try { Sconnect.PCont.ParseNodes(ref Sconnect.Path);//Double check nodes data are loaded foreach (string Nd in NodeNames) { string[] Ndlist = Nd.Split(','); List <int> NodeCodes = new List <int>(); foreach (string Ndf in Ndlist) { string NdfN = Ndf; int NodeID = Sconnect.PCont.AddSignalNodeControlRow(ref NdfN); //int FlowID = Sconnect.PCont.AddSignalFlowControlRow(ref Ndf); if (NodeID == 0) { throw new Exception("Signal junction node with name " + Nd + " was not detected or added to the MiB"); } NodeCodes.Add(NodeID); } SignalNode temp = new SignalNode(Nd, NodeCodes); SigNodes.Add(temp); } } catch (Exception e) { Console.WriteLine(e); } }
private void Nd_Click(object sender, EventArgs e) { Nd form2 = new Nd(); form2.Show(); }