public string UniqueMixName()
{
indexRun1x = 1;
int tx = menuStripNodeInfoValues.Count;
//if (t > 0)
//{
// indexRun1 = t + 1;
//}
//else
if (tx == 0)
{
indexRun1x = 1;
}
else
{
foreach(var node in menuStripNodeInfoValues)
{
if (node.temperature_source == "Mix")//either temperature or humidity source will have mix as property
{
indexRun1x++;
}
}
}
//We also need to check if the value is present or not after setting
int indNodeRun1 = indexRun1x;
string nodeName = "Mix" + indNodeRun1;//This is the node name
for (int i = 0; i < menuStripNodeInfoValues.Count; i++)
{
if (menuStripNodeInfoValues[i].name == nodeName)
{
indNodeRun1++;
nodeName = "Mix" + indNodeRun1;
i = 0;
}
}
return nodeName;
}