Example #1
0
        public static PolyParser LoadFromStream(Stream stream)
        {
            var x = new PolyParser(stream);

            x.Parse();
            return(x);
        }
Example #2
0
        public static PolyParser LoadFromFile(string fileName)
        {
            var x = new PolyParser(fileName);

            x.Parse();
            return(x);
        }
Example #3
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (OpenFileDialog ofd = new OpenFileDialog())
            {
                ofd.Filter = "Polygons|*.poly";

                if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    polygon = PolyParser.LoadFromFile(ofd.FileName);
                    pictureBox1.Invalidate();
                }
                else
                {
                    return;
                }
            }

            label2.Text = "Vertices: " + polygon.VertCount.ToString();
        }
Example #4
0
 public static PolyParser LoadFromStream(Stream stream)
 {
     var x = new PolyParser(stream);
     x.Parse();
     return x;
 }
Example #5
0
 public static PolyParser LoadFromFile(string fileName)
 {
     var x = new PolyParser(fileName);
     x.Parse();
     return x;
 }
Example #6
0
        private void openToolStripMenuItem_Click(object sender, EventArgs e)
        {
            using (OpenFileDialog ofd = new OpenFileDialog())
            {
                ofd.Filter = "Polygons|*.poly";

                if (ofd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    polygon = PolyParser.LoadFromFile(ofd.FileName);
                    pictureBox1.Invalidate();
                }
                else
                    return;
            }

            label2.Text = "Vertices: " + polygon.VertCount.ToString();
        }