Ejemplo n.º 1
0
 private void buttonSolve_Click(object sender, EventArgs e)
 {
     Stopwatch timer = new Stopwatch();
     timer.Start();
         ConvexHullSolver convexHullSolver = new ConvexHullSolver();
         convexHullSolver.Solve(m_g, m_pointList);
     timer.Stop();
     statusLabel.Text = "Done.  Time taken: " + timer.Elapsed;
 }
Ejemplo n.º 2
0
 private void buttonSolve_Click(object sender, EventArgs e)
 {
     Stopwatch timer = new Stopwatch();
     timer.Start();
         ConvexHullSolver convexHullSolver = new ConvexHullSolver(m_g, pictureBoxView);
         ConvexHullSolver.drawPolygon(convexHullSolver.Solve(m_pointList));
         pictureBoxView.Refresh();
     timer.Stop();
     statusLabel.Text = "Done.  Time taken: " + timer.Elapsed;
 }
Ejemplo n.º 3
0
        private void buttonSolve_Click(object sender, EventArgs e)
        {
            Stopwatch timer = new Stopwatch();

            timer.Start();
            ConvexHullSolver convexHullSolver = new ConvexHullSolver();

            convexHullSolver.Solve(m_g, m_pointList);
            timer.Stop();
            statusLabel.Text = "Done.  Time taken: " + timer.Elapsed;
        }
Ejemplo n.º 4
0
        private void buttonSolve_Click(object sender, EventArgs e)
        {
            Stopwatch timer = new Stopwatch();

            timer.Start();
            ConvexHullSolver convexHullSolver = new ConvexHullSolver(m_g, pictureBoxView, Convert.ToInt32(pause.Text));

            convexHullSolver.Solve(m_pointList);
            pictureBoxView.Refresh();
            timer.Stop();
            statusLabel.Text = "Done.  Time taken: " + timer.Elapsed;
        }
Ejemplo n.º 5
0
        private void buttonSolve_Click(object sender, EventArgs e)
        {
            Stopwatch timer = new Stopwatch();

            timer.Start();
            ConvexHullSolver convexHullSolver = new ConvexHullSolver();

            convexHullSolver.Solve(m_g, m_pointList, pictureBoxView);
            timer.Stop();
            statusLabel.Text = "Done.  Time taken: " + timer.Elapsed;
            pictureBoxView.Refresh();
            timeElapsed = timer.ElapsedMilliseconds;
        }
Ejemplo n.º 6
0
        private void buttonSolve_Click(object sender, EventArgs e)
        {
            Stopwatch timer = new Stopwatch();
            timer.Start();
            ConvexHullSolver convexHullSolver = new ConvexHullSolver(m_g, pictureBoxView);
            // Insert the points
            /*
            List<PointF> customPoints = new List<PointF>();
            customPoints.Add(new PointF(0F, 20F));
            customPoints.Add(new PointF(10F, 40F));
            customPoints.Add(new PointF(20F, 2F));
            customPoints.Add(new PointF(50F, 0F));
            customPoints.Add(new PointF(70F, 20F));
            customPoints.Add(new PointF(60F, 40F));
            m_pointList = customPoints;
             */
            convexHullSolver.Solve(m_pointList);
            pictureBoxView.Refresh();
            timer.Stop();
            statusLabel.Text = "Done.  Time taken: " + timer.Elapsed;

        }
Ejemplo n.º 7
0
 public ConvexHullSolver(System.Drawing.Graphics g, System.Windows.Forms.PictureBox pictureBoxView)
 {
     _instance           = this;
     this.graphic        = g;
     this.pictureBoxView = pictureBoxView;
 }
Ejemplo n.º 8
0
 public ConvexHullSolver(System.Drawing.Graphics g, System.Windows.Forms.PictureBox pictureBoxView)
 {
     _instance = this;
     this.graphic = g;
     this.pictureBoxView = pictureBoxView;
 }