//Pre: user clicks on letter tab //Post: LetterForm should appear and allow data to be selected/entered private void letterToolStripMenuItem_Click(object sender, EventArgs e) { Letter_Form letterForm = new Letter_Form(upv.AddressList); DialogResult result; result = letterForm.ShowDialog(); }
//Precondition: The letter item on the insert menu has been clicked. //Postcondition: A dialog box has been displayed requesting letter info. // If sumitted, a letter object is stored in the Parcel list. private void letterToolStripMenuItem_Click(object sender, EventArgs e) { Letter_Form letterForm = new Letter_Form(upv); //Letter dialog box form DialogResult result; //Result from dialog box result = letterForm.ShowDialog(); //Show dialog box form if (result == DialogResult.OK) //Update if user clicks OK form dialog box { upv.AddLetter(letterForm.OrigAddress, letterForm.DestAddress, letterForm.FixedCost); } }