Advertisement
Guest User

Untitled

a guest
Feb 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. public static class GlobalValueOne
  2. { public static int price; }
  3. public static class GlobalValueTwo
  4. { public static int quantity; }
  5. public static class GlobalValueThree
  6. { public static int total; }
  7. public static class GlobalBusiness
  8. { public static int select;}
  9. public static class GlobalPersonal
  10. { public static int otherselect; }
  11. namespace ThreeScreenDropBox
  12. {
  13. /// <summary>
  14. /// An empty page that can be used on its own or navigated to within a Frame.
  15. /// </summary>
  16. public sealed partial class MainPage : Page
  17. {
  18. public MainPage()
  19. {
  20. this.InitializeComponent();
  21. }
  22.  
  23. private void TotalButton_Click(object sender, RoutedEventArgs e)
  24. {
  25. GlobalValueOne.price = int.Parse(PriceBox.Text);
  26. GlobalValueTwo.quantity = int.Parse(QuantityBox.Text);
  27. GlobalValueThree.total = GlobalValueOne.price * GlobalValueTwo.quantity;
  28. TotalBox.Text = GlobalValueThree.total.ToString();
  29. }
  30.  
  31. private void BusinessButton_Checked(object sender, RoutedEventArgs e)
  32. {
  33. GlobalBusiness.select++;
  34. }
  35.  
  36. private void PersonalButton_Checked(object sender, RoutedEventArgs e)
  37. {
  38. GlobalPersonal.otherselect++;
  39. }
  40.  
  41. private void NextPageButton_Click(object sender, RoutedEventArgs e)
  42. {
  43. Frame.Navigate(typeof(Page2));
  44. }
  45.  
  46. }
  47. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement