public void UpdateAtDataGridViewRobotManage(RobotAgent.RobotInfo robotInfo) { /*try * { * this.Invoke((MethodInvoker)delegate * { * * dataGridViewRobotManager[0, robotInfo.posInGridView].Value = (String)robotInfo.robotName; * dataGridViewRobotManager[1, robotInfo.posInGridView].Value = robotInfo.alive; * dataGridViewRobotManager[2, robotInfo.posInGridView].Value = (String)robotInfo.statusconnection; * dataGridViewRobotManager[3, robotInfo.posInGridView].Value = Convert.ToString(robotInfo.batteryPercentage); * }); * } * catch { }*/ }
public void updateNewDataGridViewRobotManage(RobotAgent.RobotInfo robotInfo) { /*try * { * this.Invoke((MethodInvoker)delegate * { * DataGridViewRow row = (DataGridViewRow)dataGridViewRobotManager.Rows[0].Clone(); * row.Cells[0].Value = (String)robotInfo.robotName; * row.Cells[1].Value = robotInfo.alive; * row.Cells[2].Value = (String)robotInfo.statusconnection; * row.Cells[2].Value = Convert.ToString(robotInfo.batteryPercentage); * dataGridViewRobotManager.Rows.Add(row); * }); * } * catch { }*/ }
public void updateRobotInfoToTaskManager(RobotAgent.RobotInfo robotInfo) { UpdateAtDataGridViewRobotManage(robotInfo); }