private void UpdateQueuedMatch(int division) { int[] queued = Service.getQueuedMatch(division); String match_name = Match.toName(queued[0], queued[1], queued[2]); String field_name = ""; if (!String.IsNullOrWhiteSpace(match_name)) { field_name = Service.getField(Service.GetCurField(division)); } else { match_name = "NO MATCH"; } Control cur_match = GetFirstChildByName(this.StatusPanel.Controls, "txt_match_" + division); if (cur_match != null) { ((TextBox)cur_match).Text = match_name; } Control cur_field = GetFirstChildByName(this.StatusPanel.Controls, "txt_field_" + division); if (cur_field != null) { ((TextBox)cur_field).Text = field_name; } // Update the vision to the new field for (int i = 0; i < VisionTasks.Count; i++) { if (VisionTasks[i].ContainsKey(Service.GetCurField(division))) { VisionServices[i].RunMacro(VisionTasks[i][Service.GetCurField(division)]); } } // Update the lighting to the new field for (int i = 0; i < LightingTasks.Count; i++) { if (LightingTasks[i].ContainsKey(Service.GetCurField(division))) { LightingServices[i].RunSequence(LightingTasks[i][Service.GetCurField(division)]); } } }