private void oparationAction(object sender, EventArgs e) { Button button = (Button)sender; if (result != 0 && isOperationPerfored == false) { ButtonEquals.PerformClick(); isOperationPerfored = true; performence = button.Text; lblShowOperation.Text = result + " " + performence; } else { performence = button.Text; result = double.Parse(textbox_actionField.Text); lblShowOperation.Text = result + " " + performence; isOperationPerfored = true; } num1 = double.Parse(textbox_actionField.Text); firstNum = lblShowOperation.Text; }
void ReleaseDesignerOutlets() { if (ViewLabel != null) { ViewLabel.Dispose(); ViewLabel = null; } if (ButtonZero != null) { ButtonZero.Dispose(); ButtonZero = null; } if (ButtonOne != null) { ButtonOne.Dispose(); ButtonOne = null; } if (ButtonTwo != null) { ButtonTwo.Dispose(); ButtonTwo = null; } if (ButtonThree != null) { ButtonThree.Dispose(); ButtonThree = null; } if (ButtonFour != null) { ButtonFour.Dispose(); ButtonFour = null; } if (ButtonFive != null) { ButtonFive.Dispose(); ButtonFive = null; } if (ButtonSix != null) { ButtonSix.Dispose(); ButtonSix = null; } if (ButtonSeven != null) { ButtonSeven.Dispose(); ButtonSeven = null; } if (ButtonEight != null) { ButtonEight.Dispose(); ButtonEight = null; } if (ButtonNine != null) { ButtonNine.Dispose(); ButtonNine = null; } if (ButtonPlus != null) { ButtonPlus.Dispose(); ButtonPlus = null; } if (ButtonMinus != null) { ButtonMinus.Dispose(); ButtonMinus = null; } if (ButtonMultiply != null) { ButtonMultiply.Dispose(); ButtonMultiply = null; } if (ButtonDivide != null) { ButtonDivide.Dispose(); ButtonDivide = null; } if (ButtonEquals != null) { ButtonEquals.Dispose(); ButtonEquals = null; } if (ButtonClear != null) { ButtonClear.Dispose(); ButtonClear = null; } }