예제 #1
0
        private void btnShowResult_Click(object sender, EventArgs e)
        {
            AccessSpecifier compute = new AccessSpecifier();

            if (txtFirstNumber.Text == String.Empty)
            {
                MessageBox.Show("First Number cannot be empty");
                txtSecondNumber.Focus();
                return;
            }
            compute.FirstNumber  = Convert.ToDouble(txtFirstNumber.Text);
            compute.SecondNumber = Convert.ToDouble(txtSecondNumber.Text);

            MessageBox.Show("The public result is: " + Convert.ToString(compute.ShowResult()));
            txtFirstNumber.Text  = string.Empty;
            txtSecondNumber.Text = string.Empty;
        }
예제 #2
0
        private void btnShowMessage_Click(object sender, EventArgs e)
        {
            AccessSpecifier ResultMessage = new AccessSpecifier();

            MessageBox.Show(ResultMessage.ShowMessage());
        }