Ejemplo n.º 1
0
        public void btn_yes_Click(object sender, RoutedEventArgs e)
        {
            string yesContent = btn_yes.Content.ToString();

            if (yesContent.Equals("Yes, I want to pay"))
            {
                this.Close();
                GrayedOutWindow gw = new GrayedOutWindow();
                PaymentScreen   ps = new PaymentScreen();
                gw.Show();
                ps.ShowDialog();
                gw.Close();
            }
            else
            {
                oldMain.Close();
                MainScreen ms = new MainScreen();
                this.Close();
            }
        }
Ejemplo n.º 2
0
        private void btn_payNow_Click(object sender, RoutedEventArgs e)
        {
            ms.allTabs.RemoveTab(ms.focusedTab);
            ms.grid_addTabs.Children.Remove(ms.focusedTab.GetTabButton());
            ms.tabButtonsList.Remove(ms.focusedTab.GetTabButton());
            ms.newTabThickness -= 75;
            int  marginTop   = 150;
            int  i           = 0;
            bool foundButton = false;

            foreach (Button btn  in ms.tabButtonsList)
            {
                //if (btn == ms.focusedTab.GetTabButton())
                //{
                //    foundButton = true;
                //}
                //if (foundButton)
                //{
                btn.Margin = new Thickness(0, marginTop, 0, 0);
                i++;
                marginTop += 75;
                //}
            }
            if (ms.allTabs.GetTabs().Count > 0)
            {
                UserTab ut = ms.allTabs.GetTabs()[0];
                ms.lbl_tabTotal.Content    = "Total: $" + ut.amountOwing;
                ms.lbl_tabName.Content     = ut.ToString();
                ms.grid_summary.Background = ut.GetTabButton().Background;
                ms.focusedTab = ut;
                this.Close();
            }
            else
            {
                //that was the last tab
                this.Close();
                ClosingScreen cs = new ClosingScreen(3000);
                ms.Close();
                MainScreen mainScreen = new MainScreen();
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// This will close the application.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnClose_Click(object sender, EventArgs e)
 {
     mainScreen.Close();
 }