Example #1
0
 public Cart()
 {
     InitializeComponent();
     if (Program.shoppingList.Count == 0)
     {
         this.checkedListBox1.Items.Add("Cart Empty!");
     }
     else
     {
         this.checkedListBox1.Items.AddRange(ListFunctions.CheckListArrayMaker(Program.shoppingList));
     }
 }
Example #2
0
 private void FinalTransaction()
 {
     sum = ListFunctions.GetSumOfShoppingList(Program.shoppingList);
     if (double.TryParse(textBox1.Text, out cash) && cash > sum)
     {
         change = cash - sum; //add new form and finish this method
         MessageBox.Show("Thank you for your payment.");
         System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(ThreadProc2));
         t.Start();
         this.Close();
     }
     else
     {
         textBox1.Clear();
         MessageBox.Show("Invalid entry! Please try again.");
     }
 }
 public FinalCheckout()
 {
     InitializeComponent();
     this.richTextBox1.Text = ListFunctions.FinalCheckoutWriter(Program.shoppingList);
 }
Example #4
0
 public Final()
 {
     InitializeComponent();
     richTextBox1.Text = ListFunctions.ReceiptWriter(Program.shoppingList);
 }
Example #5
0
 private void button29_Click(object sender, EventArgs e)
 {
     MessageBox.Show(ListFunctions.DescriptionWriter(14, Program.products));
 }
Example #6
0
 public Cash()
 {
     InitializeComponent();
     textBox2.Text = $"Enter cash amount > ${ListFunctions.GetSumOfShoppingList(Program.shoppingList):0.00}";
 }
Example #7
0
 private void button1_Click(object sender, EventArgs e)
 {
     ListFunctions.RemoveFromList(ref Program.shoppingList, ref checkedListBox1);
 }