SHOW:
|
|
- or go back to the newest paste.
| 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.Windows.Forms; | |
| 9 | ||
| 10 | namespace vehicleGUI | |
| 11 | {
| |
| 12 | public partial class Form1 : Form | |
| 13 | {
| |
| 14 | Customer myCustomer = new Customer(); | |
| 15 | Vehicle myVehicle = new Vehicle(); | |
| 16 | ||
| 17 | ||
| 18 | public Form1() | |
| 19 | {
| |
| 20 | InitializeComponent(); | |
| 21 | } | |
| 22 | ||
| 23 | private void clearButton_Click(object sender, EventArgs e) | |
| 24 | {
| |
| 25 | fNameBox.Text = ""; | |
| 26 | lNameBox.Text = ""; | |
| 27 | pNumberBox.Text = ""; | |
| 28 | ageBox.Text = ""; | |
| 29 | creditScoreBox.Text = ""; | |
| 30 | } | |
| 31 | ||
| 32 | private static void validateButton_Click(object sender, EventArgs e) | |
| 33 | {
| |
| 34 | /* | |
| 35 | call is_25 function | |
| 36 | ||
| 37 | if function call is valid | |
| 38 | ||
| 39 | MessageBox.Show("You have been assigned a vehicle")
| |
| 40 | ||
| 41 | else | |
| 42 | MessageBox.Show("No vehicle for you!")
| |
| 43 | */ | |
| 44 | ||
| 45 | /*public bool is_TwentyFive() | |
| 46 | {
| |
| 47 | MessageBox.Show("You've been assigned a 1999 Ford Taurus with a VIN number of 123456"), "VERIFY MSG", MessageBoxButtons.OK)
| |
| 48 | return; | |
| 49 | } | |
| 50 | ||
| 51 | else | |
| 52 | {
| |
| 53 | MessageBox.Show("You've been denied. Please try again when you're not underaged.", "UNDERAGED BANNED", MessageBoxButtons.OK)
| |
| 54 | return; | |
| 55 | }*/ | |
| 56 | ||
| 57 | Customer currentCustomer = new Customer(); | |
| 58 | currentCustomer.is_TwentyFive(); | |
| 59 | ||
| 60 | return; | |
| 61 | ||
| 62 | } | |
| 63 | ||
| 64 | private void retrieveButton_Click(object sender, EventArgs e) | |
| 65 | {
| |
| 66 | ||
| 67 | fNameBox.Text = myCustomer.firstName; //Ask about the conversions | |
| 68 | lNameBox.Text = myCustomer.lastName; | |
| 69 | pNumberBox.Text = Convert.ToString(myCustomer.phoneNumber); | |
| 70 | ageBox.Text = Convert.ToString(myCustomer.custAge); | |
| 71 | creditScoreBox.Text = Convert.ToString(myCustomer.CreditScore); | |
| 72 | ||
| 73 | ||
| 74 | } | |
| 75 | ||
| 76 | ||
| 77 | //private void button1_Click(object sender, EventArgs e) | |
| 78 | // {
| |
| 79 | ||
| 80 | // } | |
| 81 | ||
| 82 | ||
| 83 | } | |
| 84 | } |