private void duplikujToolStripMenuItem_Click(object sender, EventArgs e) { PictureForm activeChild = (PictureForm)this.ActiveMdiChild; if (activeChild != null) { PictureForm newChild = new PictureForm(activeChild); newChild.Text = new StringBuilder("Obraz ").Append(++formCounter).ToString(); newChild.MdiParent = this; newChild.Show(); } }
private void otwórzToolStripMenuItem_Click(object sender, EventArgs e) { if (openFileDialog1.ShowDialog() != DialogResult.OK) return; PictureForm picture = new PictureForm(this ); picture.MdiParent = this; picture.Text = new StringBuilder("Obraz ").Append(++formCounter).ToString(); picture.loadImage(openFileDialog1.FileName); picture.Show(); }