private void TEST_BT_Demo1_Click(object sender, EventArgs e) { //Add 3 nodes - all using temperature NM.addNewNode(30000); NM.updateNode(30000, "North", 100, new List <double[]>(), new List <double[]>(), new List <double[]>(), new List <ErrorMsg>(), new List <DataType>(), false, false, 55, 10, 60, 0, null, null); int NodePanelNum1 = addNewNodePanel(); NM.addNewNode(30001); NM.updateNode(30001, "South", 80, new List <double[]>(), new List <double[]>(), new List <double[]>(), new List <ErrorMsg>(), new List <DataType>(), false, false, 55, 10, null, null, null, null); int NodePanelNum2 = addNewNodePanel(); NM.addNewNode(30002); NM.updateNode(30002, "West", 60, new List <double[]>(), new List <double[]>(), new List <double[]>(), new List <ErrorMsg>(), new List <DataType>(), false, false, 55, 10, null, null, null, null); int NodePanelNum3 = addNewNodePanel(); NM.NodeDict[30000].PanelNum = NodePanelNum1; NM.NodeDict[30001].PanelNum = NodePanelNum2; NM.NodeDict[30002].PanelNum = NodePanelNum3; NM.NodeDict[30000].DataTypes.Add(DataType.Temperature); NM.NodeDict[30001].DataTypes.Add(DataType.Temperature); NM.NodeDict[30002].DataTypes.Add(DataType.Temperature); NM.NodeDict[30000].DataTypes.Add(DataType.Humidity); Label tb30000name = nodeFlowLayoutPanel.Controls.Find("NodeLabel1", true).FirstOrDefault() as Label; tb30000name.Text = NM.NodeDict[30000].NodeName; Label tb30001name = nodeFlowLayoutPanel.Controls.Find("NodeLabel2", true).FirstOrDefault() as Label; tb30001name.Text = NM.NodeDict[30001].NodeName; Label tb30002name = nodeFlowLayoutPanel.Controls.Find("NodeLabel3", true).FirstOrDefault() as Label; tb30002name.Text = NM.NodeDict[30002].NodeName; Label tb30000SN = nodeFlowLayoutPanel.Controls.Find("NodeSNLabel1", true).FirstOrDefault() as Label; tb30000SN.Text = "SN" + NM.NodeDict[30000].SN.ToString(); Label tb30001SN = nodeFlowLayoutPanel.Controls.Find("NodeSNLabel2", true).FirstOrDefault() as Label; tb30001SN.Text = "SN" + NM.NodeDict[30001].SN.ToString(); Label tb30002SN = nodeFlowLayoutPanel.Controls.Find("NodeSNLabel3", true).FirstOrDefault() as Label; tb30002SN.Text = "SN" + NM.NodeDict[30002].SN.ToString(); RichTextBox rtb30000colorstatus = nodeFlowLayoutPanel.Controls.Find("NodeColorRTB1", true).FirstOrDefault() as RichTextBox; rtb30000colorstatus.BackColor = Color.Lime; RichTextBox rtb30001colorstatus = nodeFlowLayoutPanel.Controls.Find("NodeColorRTB2", true).FirstOrDefault() as RichTextBox; rtb30001colorstatus.BackColor = Color.Lime; RichTextBox rtb30002colorstatus = nodeFlowLayoutPanel.Controls.Find("NodeColorRTB3", true).FirstOrDefault() as RichTextBox; rtb30002colorstatus.BackColor = Color.Lime; //Start new data update thread(DEMO ONLY) // Push new node data on 3 sec cycle BW_DEMO1_DataStream.RunWorkerAsync(); Initialize_GraphicalUpdate(); Timer_Updates.Enabled = true; //Start form update thread cycle at 0.5s // }