Exemple #1
0
 // +/- operator button
 private void button23_Click(object sender, EventArgs e)
 {
     try
     {
         ValidatorClass.ValidateEntryReturn(textBox1.Text);
         textBox1.Text = UitlityClass.AppendPlusMinusOperator(textBox1.Text);
     }
     catch (Exception)
     {
         MessageBox.Show("Invalid Operation");
     }
 }
Exemple #2
0
 //power button
 private void button20_Click(object sender, EventArgs e)
 {
     try
     {
         TextBoxNumber = ValidatorClass.ValidateEntryReturn(textBox1.Text);
         UitlityClass.ClearTextBox(textBox1);
         label3.Text = UitlityClass.AddTextToString(TextBoxNumber, " ^");
         Operation   = OperatorCode.POWER;
     }
     catch (Exception)
     {
         Console.WriteLine("Invalid Opeartion");
     }
 }
Exemple #3
0
 // Tangent button
 private void button10_Click(object sender, EventArgs e)
 {
     try
     {
         TextBoxNumber = ValidatorClass.ValidateEntryReturn(textBox1.Text);
         UitlityClass.ClearTextBox(textBox1);
         label3.Text = UitlityClass.AddTextToString("Tan() ", TextBoxNumber);
         Operation   = OperatorCode.TANGENT;
     }
     catch (Exception)
     {
         MessageBox.Show("Invalid Operation");
     }
 }
Exemple #4
0
 // subtraction button
 private void button9_Click(object sender, EventArgs e)
 {
     try
     {
         TextBoxNumber = ValidatorClass.ValidateEntryReturn(textBox1.Text);
         UitlityClass.ClearTextBox(textBox1);
         label3.Text = UitlityClass.AddTextToString(TextBoxNumber, " -");
         Operation   = OperatorCode.SUBTRATION;
     }
     catch (Exception ex)
     {
         MessageBox.Show("Invalid Operation");
     }
 }
Exemple #5
0
 // button 5
 private void button12_Click(object sender, EventArgs e)
 {
     UitlityClass.AppendToTextBox(textBox1, 5);
     //textBox1.Text = textBox1.Text + 5;
 }
Exemple #6
0
 //  backspace button
 private void button2_Click(object sender, EventArgs e)
 {
     textBox1.Text = UitlityClass.RemoveLast(textBox1);
 }