示例#1
0
 private void button22_Click(object sender, EventArgs e)
 {
     DrawFull(0);
     try
     {
         Task2Dialog td = new Task2Dialog();
         td.maxVertex = test.VertexCount;
         td.ShowDialog();
         if (!td.confirmed)
         {
             return;
         }
         TaskTwo tt = new TaskTwo();
         tt.Set(test, td.selectedval);
         tt.Solve();
         tt = new TaskTwo();
         for (int i = 0; i < test.VertexCount; i++)
         {
             Misc.Vertex <int> cv = test.GetVertex(i);
             if (cv.value == td.distance)
             {
                 en.GetControlbyName(i.ToString(), ctrls).BackgroundImage = iterator;
             }
         }
     }
     catch (Exception ee)
     {
         MessageBox.Show(ee.Message + "\nThis will not affect app work", "error during solution search", MessageBoxButtons.OK);
     }
 }
示例#2
0
 private void button22_Click(object sender, EventArgs e)
 {
     DrawFull(0);
     try
     {
         Task2Dialog td = new Task2Dialog();
         td.maxVertex = test.VertexCount;
         td.ShowDialog();
         if (!td.confirmed) return;
         TaskTwo tt = new TaskTwo();
         tt.Set(test, td.selectedval);
         tt.Solve();
         tt = new TaskTwo();
         for (int i = 0; i < test.VertexCount; i++)
         {
             Misc.Vertex<int> cv = test.GetVertex(i);
             if (cv.value == td.distance) en.GetControlbyName(i.ToString(), ctrls).BackgroundImage = iterator;
         }
     }
     catch (Exception ee)
     {
         MessageBox.Show(ee.Message + "\nThis will not affect app work", "error during solution search", MessageBoxButtons.OK);
     }
 }