示例#1
0
文件: FormMain.cs 项目: jrasm91/cs312
 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;
 }
示例#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;
 }
示例#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;
        }
示例#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;
        }
示例#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;
        }
        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;

        }