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