private void BtnNums_On_Click(object sender, RoutedEventArgs e)
        {
            Button button = e.Source as Button;

            if (button != null)
            {
                if (button.Content.ToString() == ".")
                {
                    if (!IsCalcInResetState && !ResultShowingInCalcInput && !BasicHelper.InputHasDecimal(CalcInput.Text))
                    {
                        CalcInput.Text += button.Content;
                    }
                    else if (IsCalcInResetState || ResultShowingInCalcInput)
                    {
                        CalcDisplay.Text = "";

                        CalcInput.Text = "0" + button.Content;
                    }
                }
                else
                {
                    if (ResultShowingInCalcInput)
                    {
                        CalcInput.Text = "";
                    }

                    if (IsCalcInResetState)
                    {
                        CalcDisplay.Text = "";
                        if (button.Content.ToString() != "!")
                        {
                            CalcInput.Text = "";
                        }
                    }

                    var buttonContent = button.Content.ToString();

                    if (buttonContent == "0")
                    {
                        if (BasicHelper.ValidateInputOfZero(CalcInput.Text))
                        {
                            CalcInput.Text += button.Content;
                        }
                    }
                    else if (buttonContent == "√")
                    {
                        if (!InputHasRoot && !InputHasFactorial && BasicHelper.ValidateSqrtInput(CalcInput.Text))
                        {
                            CalcInput.Text += button.Content;
                        }
                    }
                    else if (buttonContent == "!")
                    {
                        if (!InputHasFactorial && !InputHasRoot && !BasicHelper.InputHasDecimal(CalcInput.Text))
                        {
                            if (BasicHelper.CheckIfANumberExistsBefore(CalcInput.Text))
                            {
                                CalcInput.Text += button.Content;
                            }
                        }
                    }
                    else
                    {
                        CalcInput.Text += button.Content;
                    }
                }


                if (CalcInput.Text.Contains("√"))
                {
                    InputHasRoot = true;
                }

                if (CalcInput.Text.Contains("!"))
                {
                    InputHasFactorial = true;
                }

                if (Operator == "^" && CalcInput.Text != "")
                {
                    OperatorAllowed = false;
                    if (Char.IsDigit(CalcInput.Text[CalcInput.Text.Length - 1]) || CalcInput.Text[CalcInput.Text.Length - 1] == '!')
                    {
                        OnlyEqualSignAllowed = true;
                    }
                }
                else if (Operator == "^-" && CalcInput.Text != "")
                {
                    OperatorAllowed = false;
                    if (Char.IsDigit(CalcInput.Text[CalcInput.Text.Length - 1]) || CalcInput.Text[CalcInput.Text.Length - 1] == '!')
                    {
                        OnlyEqualSignAllowed = true;
                    }
                }
                else if (Operator != "^-" && Operator != "^")
                {
                    OperatorAllowed = true;
                }
                ResultShowingInCalcInput = false;
                IsCalcInResetState       = false;
            }
        }