private void ButtonOpen_Click(object sender, EventArgs e) { OpenFileDialog dial = new OpenFileDialog(); dial.InitialDirectory = Environment.CurrentDirectory; dial.CheckFileExists = true; dial.Filter = "Kamikaze files (*.kam)|*.kam"; if(dial.ShowDialog() == DialogResult.OK) { // new frame MdiChild frm = new MdiChild(); frm.MdiParent = this; frm.Text = "Picture " + MdiChildren.Length; frm.Show(); EnableSaveAndBuffer ( true ); // try to open! frm.Open(dial.FileName); frm.UnselectAllFigures(); } }
private void ButtonNew_Click(object sender, EventArgs e) { Form frm = new MdiChild(imageSize); frm.MdiParent = this; frm.Text = "Picture " + MdiChildren.Length; frm.Show(); EnableSaveAndBuffer ( true ); }