示例#1
0
 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();
     }
 }
示例#2
0
        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 );
        }