private void newPaint(string imgPath) { mChild.Add(new PaintForm()); PaintForm c = mChild[mChild.Count - 1]; c.MdiParent = this; c.mImgPath = imgPath; if (c.mImgPath == null) { // new file c.Text = "제목 없음"; c.WindowState = FormWindowState.Maximized; } else { c.Text = Path.GetFileName(imgPath); c.mImg = Image.FromFile(imgPath); c.WindowState = FormWindowState.Normal; c.Width = c.mImg.Width + 16; c.Height = c.mImg.Height + 39; } c.Show(); tsmiDeleteImage.Enabled = true; tsmiSave.Enabled = true; }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { PaintForm form = new PaintForm(pen, painter); form.MdiParent = this; form.Show(); }
private void openToolStripMenuItem1_Click(object sender, EventArgs e) { if (openFileDialog1.ShowDialog() == DialogResult.OK) { PaintForm form = new PaintForm(openFileDialog1.FileName, pen, painter); form.MdiParent = this; form.Show(); } }