Esempio n. 1
0
 private void BtnDispose_Click(object sender, EventArgs e)
 {
     // clears out ojects based on which radio button is checked when the Disposed button is clicked.
     if (rdoCircle.Checked)
     {
         Circle        = null;
         txtError.Text = "Circal data removed";
     }
     else
     {
         Cylinder      = null;
         txtError.Text = "Cylinder data removed";
     }
     setupfromForCircleOrCylinder();
 }
Esempio n. 2
0
        private void runCircle()
        {
            // calculates Circale info using the clsCircle class

            txtError.Text = "Getting info for Circle";

            //initialize new Circle object
            if (Circle == null)
            {
                Circle = new clsCircle();
            }
            // Sets Properties
            Circle.Radius = Convert.ToDecimal(txtRadius.Text);

            // Updates textboxes
            txtCircumference.Text = Circle.Circumference().ToString();
            txtArea.Text          = Circle.Area().ToString();

            setupfromForCircleOrCylinder();
        }