private void button20_Click(object sender, EventArgs e) { DrawFull(0); try { TasksOne t1 = new TasksOne(); t1.Set(test); t1.Solve(); for (int i = 0; i < test.VertexCount; i++) { (en.GetControlbyName(i.ToString(), ctrls)).BackColor = test.GetVertex(i)._inner; } DrawFull(1); for (int i = 0; i < test.VertexCount; i++) { if (test.GetVertex(i)._inner == Color.Black) { (en.GetControlbyName(i.ToString(), ctrls)).BackgroundImage = iterator; } else { (en.GetControlbyName(i.ToString(), ctrls)).BackgroundImage = normal; } } } catch (Exception ee) { MessageBox.Show(ee.Message + "\nThis will not affect app work", "error during solution search", MessageBoxButtons.OK); } }
private void button20_Click(object sender, EventArgs e) { DrawFull(0); try { TasksOne t1 = new TasksOne(); t1.Set(test); t1.Solve(); for (int i = 0; i < test.VertexCount; i++) { (en.GetControlbyName(i.ToString(), ctrls)).BackColor = test.GetVertex(i)._inner; } DrawFull(1); for (int i = 0; i < test.VertexCount; i++) { if (test.GetVertex(i)._inner == Color.Black) (en.GetControlbyName(i.ToString(), ctrls)).BackgroundImage = iterator; else (en.GetControlbyName(i.ToString(), ctrls)).BackgroundImage = normal; } } catch (Exception ee) { MessageBox.Show(ee.Message + "\nThis will not affect app work", "error during solution search", MessageBoxButtons.OK); } }