Ejemplo n.º 1
0
        /**********************************************************************
         *********************************************************************/
        void B_Next_Clicked(object sender, EventArgs e)
        {
            bool disableOrEnable = NextStep();

            b_Next.IsEnabled = disableOrEnable;
            toggleRestart    = true;
            b_Restart.Text   = "Restart";
            b_Back.IsEnabled = true;
            DijkstraDraw.Paint();
        }
Ejemplo n.º 2
0
        /**********************************************************************
         *********************************************************************/
        void B_Back_Clicked(object sender, EventArgs e)
        {
            bool disableOrEnable = PreviousStep();

            b_Back.IsEnabled = disableOrEnable;
            if (disableOrEnable)
            {
                toggleRestart  = true;
                b_Restart.Text = "Restart";
            }
            else
            {
                toggleRestart  = false;
                b_Restart.Text = "Go to End";
            }
            b_Next.IsEnabled = true;
            DijkstraDraw.Paint();
        }
Ejemplo n.º 3
0
 /**********************************************************************
  *********************************************************************/
 void B_Restart_Clicked(object sender, EventArgs e)
 {
     if (toggleRestart)
     {
         Restart();
         b_Restart.Text   = "Go to End";
         toggleRestart    = false;
         b_Back.IsEnabled = false;
         b_Next.IsEnabled = true;
     }
     else
     {
         GoToEnd();
         b_Restart.Text   = "Restart";
         toggleRestart    = true;
         b_Back.IsEnabled = true;
         b_Next.IsEnabled = false;
     }
     DijkstraDraw.Paint();
 }
Ejemplo n.º 4
0
 public static void UpdateDijkstraDraw()
 {
     DijkstraDraw.SetCurrentStep(currentStep);
     DijkstraDraw.Paint();
 }