/// <summary> /// Event-hanler for click event of train menu item in Transport Menu. /// This is used to add new train info /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void trainToolStripMenuItem_Click(object sender, EventArgs e) { // create and show teh Transportation form frmTransport = new TransportationForm("Add New Train Info"); if (frmTransport.ShowDialog() == DialogResult.OK) { //Add the details and call the UpdateTrain List() method to write the values in File transportMngr.AddTransport(frmTransport.TransportData); UpdateTransportList("TrainDetails.txt"); } }