コード例 #1
0
ファイル: Form1.cs プロジェクト: NSoft-SteAleX/Graphs
 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
ファイル: Form1.cs プロジェクト: NSoft-SteAleX/Graphs
 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);
     }
 }