private void radical_Click(object sender, EventArgs e) { getDataFromTextBox(firstNumber); firstNumber = firstNumber.GetRadical(firstNumber, 2); setDataIntoTheTextBox(firstNumber.StringNumber); flag = 0; }
private void getRes() { if (numberOfOperation > 0 && numberOfOperation < 7) { if (!isEqualityPushed) { getDataFromTextBox(secondNumber); } else { clearTextBox(); } } if (numberOfOperation != 0) { switch (numberOfOperation) { case 1: firstNumber *= secondNumber; break; case 2: firstNumber /= secondNumber; break; case 3: firstNumber += secondNumber; break; case 4: firstNumber -= secondNumber; break; case 5: firstNumber = firstNumber.ToPow(secondNumber); break; case 6: firstNumber = firstNumber.GetRadical(secondNumber); break; case 7: firstNumber = firstNumber.Factorial(firstNumber); break; case 8: firstNumber = 1 / firstNumber; break; } setDataIntoTheTextBox(firstNumber.NumberString); } }