예제 #1
0
        // "DEL" Button
        private void C_Button_Click(object sender, EventArgs e)
        {
            // if condition
            if (Principal.Text.Length > 1)
            {
                Principal.Text = Principal.Text.Remove(Principal.Text.Length - 1, 1);
            }

            // else
            else
            {
                Principal.Clear(); // Empty / Clear the TextBox
            }
        }
예제 #2
0
 // "-" Button
 private void Sust_Button_Click(object sender, EventArgs e)
 {
     operation = "-";
     num1      = Convert.ToDouble(Principal.Text);
     Principal.Clear();
 }
예제 #3
0
 // "10x" Button
 private void Tentox_Button_Click(object sender, EventArgs e)
 {
     operation = "10x";
     Principal.Clear();
 }