public TotalForm(double total, Material_List_Builder mlb) { InitializeComponent(); FormBorderStyle = FormBorderStyle.FixedDialog; this.mlb = mlb; label1.Text = "The total price of your list is $" + total; MaximizeBox = false; }
/// <summary> /// Sends user to MaterialListBuilder form with loaded information. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button1_Click(object sender, EventArgs e) { if (listBox1.Items.Count > 0) { closing = false; Material_List_Builder mlb = new Material_List_Builder(PreviewDocument); mlb.Show(); Close(); } }
/// <summary> /// Writes XML Data to file and sends user to Material_List_Builder Form. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void button1_Click(object sender, EventArgs e) { Hide(); SetVariables(); List <Tuple <string, string, string> > list = new List <Tuple <string, string, string> >(); Estimate.WriteXml(firstName, lastName, address, state, city, zipCode, list); Material_List_Builder mlb = new Material_List_Builder(Estimate.ReadXml(lastName + ".xml")); mlb.Show(); }