-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathImperialResultForm.cs
30 lines (25 loc) · 953 Bytes
/
ImperialResultForm.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using System;
using System.Windows.Forms;
namespace BMI_Calculator
{
public partial class ImperialResultForm : Form
{
public ImperialResultForm()
{
InitializeComponent();
}
//When new window loads show text
private void resultForm_Load(object sender, EventArgs e)
{
//Grab values from the first window
decimal height = IntroForm.imperialH;
decimal weight = IntroForm.imperialW;
double bmi = IntroForm.imperialbmi;
string category = IntroForm.imperialcategory;
impHeightLabel.Text = String.Format("Height (in): {0}", height.ToString("0"));
impWeightLabel.Text = String.Format("Weight (lbs): {0}", weight.ToString("0"));
bmiNumLabel.Text = String.Format("BMI Score: {0}", bmi.ToString("0"));
bmiCatLabel.Text = String.Format("Category: {0}", category);
}
}
}