public void toeventcreationform(Form thisform, MultipleOutput mo) { EventCreationForm ecf = new EventCreationForm(mo); ecf.MdiParent = thisform; ecf.Show(); }
private void btnImportEvent_Click(object sender, EventArgs e) { Stream myStream = null; MultipleOutput mo = new MultipleOutput(); OpenFileDialog ofd = new OpenFileDialog { InitialDirectory = "C:\\Users\\Matthijs\\Downloads", Filter = "CSV Files (*.csv)|*.csv" }; EventsController ec = new EventsController(); if (ofd.ShowDialog() == DialogResult.OK) { using (myStream = ofd.OpenFile()) { mo = ec.ImportEvent(myStream); } EventCreationForm ecf = new EventCreationForm(mo); this.Hide(); ecf.Show(); } }