public Form1()
        {
            InitializeComponent();
            g = pictureBox1.CreateGraphics();

            //by default first is current
            currentPolygon = firstPolygon;
        }
        /// <summary>
        /// Clears the screen and empties the points list
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ClearButton_Click(object sender, EventArgs e)
        {
            currentPolygon = firstPolygon;
            g.Clear(Color.White);

            polygonOnePoints.Items.Clear();
            polygonTwoPoints.Items.Clear();
            secondPolygon.ClearPolygon();
            firstPolygon.ClearPolygon();
            totalPolygons = 0;

            ClosePolygonButton.Enabled = true;
            maxDiameterButton.Enabled = false;
            nextButton.Enabled = false;
            addPolygonButton.Enabled = false;
            minAreaButton.Enabled = false;
            minimumPermButton.Enabled = false;
            mergeConvexHullButton.Enabled = false;
            maxDist2PolyButton.Enabled = false;
            intersectionButton.Enabled = false;
            minWidthButton.Enabled = false;

            CalipersBaseClass.TotalRotatedAngleAmount = 0;
            totalRotatedAngleTextBox.Text = CalipersBaseClass.TotalRotatedAngleAmount.ToString();
        }
        /// <summary>
        /// Add a second polygon
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void addPolygonButton_Click(object sender, EventArgs e)
        {
            minimumPermButton.Enabled = false;
            maxDiameterButton.Enabled = false;
            minAreaButton.Enabled = false;
            nextButton.Enabled = false;
            minWidthButton.Enabled = false;

            ClosePolygonButton.Enabled = true;

            currentPolygon = secondPolygon;
        }