Esempio n. 1
0
        private void TxtBox_SideB_TextChanged(object sender, EventArgs e)
        {
            validateInput(TxtBox_SideB, ref isValidSideB, ref sideB);

            /* check if error message needs to be outputed
             */
            if (!isValidSideB && TxtBox_SideB.Text != "")
            {
                //output error message
                Lbl_ErrorMessage_SideB.Text      = MESSAGE;
                Lbl_ErrorMessage_SideB.ForeColor = Color.Red;
                Lbl_ErrorMessage_SideB.Show();
                Lbl_OutputText.Hide();
            }
            else if (isValidSideA && isValidSideB && isValidSideC)
            {
                //get message from triangle
                Lbl_OutputText.Text = DetermineTriangle();
                //display the message
                Lbl_OutputText.Show();
                Lbl_ErrorMessage_SideB.Hide();
            }
            else
            {
                Lbl_ErrorMessage_SideB.Hide();
            }
        }
Esempio n. 2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     Lbl_ErrorMessage_SideA.Hide();
     Lbl_ErrorMessage_SideB.Hide();
     Lbl_ErrorMessage_SideC.Hide();
     Lbl_OutputText.Hide();
 }