private void openItemClick(object sender, System.EventArgs e) { DialogResult buttonClicked = openFileDialog.ShowDialog(); if (buttonClicked.Equals(DialogResult.OK)) { MDIChild childForm; if (openFileDialog.Multiselect == true) { string[] paths = openFileDialog.FileNames; foreach (string path in paths) { childCount++; childForm = new MDIChild(path); childForm.MdiParent = this; childForm.Text = childForm.Text + " " + childCount; childForm.Show(); } } else { childCount++; string path = openFileDialog.FileName; childForm = new MDIChild(path); childForm.MdiParent = this; childForm.Text = childForm.Text + " " + childCount; childForm.Show(); } } }
private void newItemClick(object sender, System.EventArgs e) { childCount++; MDIChild childForm = new MDIChild(); childForm.MdiParent = this; childForm.Text = childForm.Text + " " + childCount; childForm.Show(); }