Kenkaster001

HOA6form2

Sep 23rd, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.56 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10.  
  11. namespace HOA6
  12. {
  13. public partial class Form2 : Form
  14. {
  15. public Form2()
  16. {
  17. InitializeComponent();
  18. }
  19.  
  20. private void Button1_Click(object sender, EventArgs e)
  21. {
  22. if (radioButton1.Checked)
  23. {
  24. Class1.gen_ad += 1;
  25. if (Class1.discount_rate != 0)
  26. {
  27. Class1.total_bill += 90;
  28. }
  29. else
  30. {
  31. Class1.total_bill += 100;
  32. }
  33. }
  34. if (radioButton2.Checked)
  35. {
  36. Class1.lower_box += 1;
  37. if (Class1.discount_rate != 0)
  38. {
  39. Class1.total_bill += .9*200;
  40. }
  41. else
  42. {
  43. Class1.total_bill += 200;
  44. }
  45. }
  46. if (radioButton3.Checked)
  47. {
  48. Class1.patron += 1;
  49. if (Class1.discount_rate != 0)
  50. {
  51. Class1.total_bill += .9*350;
  52. }
  53. else
  54. {
  55. Class1.total_bill += 350;
  56. }
  57. }
  58.  
  59. Hide();
  60. Form1 s = new Form1();
  61. s.Show();
  62. }
  63. }
  64. }
Add Comment
Please, Sign In to add comment