public Container(params string[] files) : this() { foreach (var fileName in files) { if (File.Exists(fileName)) { MainForm newMain = new MainForm(fileName); newMain.MdiParent = this; newMain.Show(); } } }
private void openToolStripMenuItem_Click(object sender, EventArgs e) { openFileDialog1.InitialDirectory = lastLocation; if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) { foreach (var fileName in openFileDialog1.FileNames) { MainForm newMain = new MainForm(fileName); newMain.MdiParent = this; newMain.Show(); lastLocation = Path.GetDirectoryName(fileName); } } }
private void newToolStripMenuItem_Click(object sender, EventArgs e) { MainForm newMain = new MainForm(new NPC()); newMain.MdiParent = this; newMain.Show(); }