public int IndexOfPreviousNodeForLineFunction()
{
int indCountForPrevIdOfLine = 0;
string idValue = "";
int indexX = 0;
for (int i = 0; i < menuStripNodeInfoValues.Count; i++)
{
//--Now we need to count the valus
if (menuStripNodeInfoValues[i].temperature_source == "Mix")
{
//Do not count
}
else
{
//Its not mix node so count every other nodes
//indCountForPrevIdOfLine++;
idValue = menuStripNodeInfoValues[i].id;
}
}
//--Now lets identify the node value
for (int i = 0; i < menuStripNodeInfoValues.Count; i++)
{
/*
indCountForPrevIdOfLine-1 this -1 is done because
indCountForPrevIdOfLine 1 means index is 0
*/
if (idValue == menuStripNodeInfoValues[i].id)
{
indexX = i;
break;
}
}
return indexX;
}