Exemple #1
0
        /* Can only play animation if the home and destination nodes are set and
         * there are nodes in the graph
         */

        public void AddAnimation(Animation anim)
        {
            this.anim           = anim;
            this.comboBox1.Text = anim.ToString();
            this.comboBox1.Items.Add(anim.ToString());
            animations.Add(anim);
        }
Exemple #2
0
 private void newButton(object sender, System.EventArgs e)
 {
     graph.Clear();
     this.inkOverlay.Ink.DeleteStrokes(inkOverlay.Ink.Strokes);
     penButton(sender, e);
     if (anim != null)
     {
         anim.Stop();
     }
     anim           = new DijkstraAnimation(this);
     comboBox1.Text = anim.ToString();
     togglePlayPause(PLAY);
     Invalidate();
 }
Exemple #3
0
 private void newButton(object sender, System.EventArgs e)
 {
     graph.Clear();
     this.inkOverlay.Ink.DeleteStrokes(inkOverlay.Ink.Strokes);
     penButton(sender, e);
     if(anim != null) anim.Stop();
     anim = new DijkstraAnimation(this);
     comboBox1.Text = anim.ToString();
     togglePlayPause(PLAY);
     Invalidate();
 }
Exemple #4
0
 /* Can only play animation if the home and destination nodes are set and
  * there are nodes in the graph
  */
 public void AddAnimation(Animation anim)
 {
     this.anim = anim;
     this.comboBox1.Text = anim.ToString();
     this.comboBox1.Items.Add(anim.ToString());
     animations.Add(anim);
 }