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

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

            x.Parse();
            return(x);
        }
Exemple #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();
        }
Exemple #4
0
 public static PolyParser LoadFromStream(Stream stream)
 {
     var x = new PolyParser(stream);
     x.Parse();
     return x;
 }
Exemple #5
0
 public static PolyParser LoadFromFile(string fileName)
 {
     var x = new PolyParser(fileName);
     x.Parse();
     return x;
 }
Exemple #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();
        }