コード例 #1
0
        private void addToListBtn_Click(object sender, EventArgs e)
        {
            try{
                if (!isEmpty())
                {
                    setNewName   = nameTxtBox.Text;
                    setNewFeet   = feetTxtBox.Text;
                    setNewInches = inchesTxtBox.Text;
                    setNewWeight = weightTxtBox.Text;

                    BmiOutput frm2 = new BmiOutput();
                    frm2.Show();

                    int    feet   = Int32.Parse(BMI_Window.setNewFeet);
                    int    inches = Int32.Parse(BMI_Window.setNewInches);
                    int    weight = Int32.Parse(BMI_Window.setNewWeight);
                    string name   = BMI_Window.setNewName;
                    double bmi    = BMI_Window.setBmi;
                }

                else
                {
                    MessageBox.Show("Input Fields Are Empty");
                }
            }
            catch (Exception)
            {
                MessageBox.Show("Input Fields Are Empty");
            }
        }
コード例 #2
0
 private void viewList_Click(object sender, EventArgs e)
 {
     try
     {
         var myForm = new BmiOutput();
         myForm.Show();
     }
     catch (Exception)
     {
         MessageBox.Show("Error Occured Retrieveing Data.");
     }
 }