private void finishSketchToolStripMenuItem_Click(object sender, EventArgs e) { isDrawFinished = true; if (inputPoiList.Count() > 2) { Polygon temp = new Polygon(inputPoiList); currentPolygon.Add(temp); } madePolygonList.Add(currentPolygon); inputPoiList = new Stack <Point> { }; currentPolygon = new MultiPolygon(); finishSketchToolStripMenuItem.Enabled = false; finishPartToolStripMenuItem.Enabled = false; pictureBox1.Refresh(); }
private void pictureBox1_MouseDoubleClick(object sender, MouseEventArgs e) { if (!isDrawFinished) { if (inputPoiList.Count() <= 2) { return; } isDrawFinished = true; Polygon temp = new Polygon(inputPoiList); currentPolygon.Add(temp); madePolygonList.Add(currentPolygon); inputPoiList = new Stack <Point> { }; currentPolygon = new MultiPolygon(); finishSketchToolStripMenuItem.Enabled = false; finishPartToolStripMenuItem.Enabled = false; pictureBox1.Refresh(); } }