Exemplo n.º 1
0
        /**********************************************************************
         *********************************************************************/
        void CreateTopHalf(Grid grid)
        {
            skiaview = new SKCanvasView();

            skiaview = DijkstraDraw.ReturnCanvas();
            skiaview.BackgroundColor = App._viewBackground;
            grid.Children.Add(skiaview, 0, 0);
        }
Exemplo n.º 2
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();
        }
Exemplo n.º 3
0
        //CONSTRUCTOR
        public Dijkstra(String[] a, int n)
        {
            ToolbarItem info = new ToolbarItem();

            info.Text = App._sHelpInfoHint;
            this.ToolbarItems.Add(info);
            info.Clicked += B_Info_Clicked;

            Title         = "Dijkstra";
            toggleRestart = false;
            currentStep   = 0;
            maxStep       = 31;

            draw = new DijkstraDraw(a, n);
            CreateContent();
        }
Exemplo n.º 4
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();
        }
Exemplo n.º 5
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();
 }
Exemplo n.º 6
0
 public static void UpdateDijkstraDraw()
 {
     DijkstraDraw.SetCurrentStep(currentStep);
     DijkstraDraw.Paint();
 }