Пример #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Calculator = new Calculator();
     }
     NumberInput.Focus();
 }
        protected void Handle_Enter(object sender, EventArgs e)
        {
            Decimal entry;

            if (Decimal.TryParse(NumberInput.Text, out entry))
            {
                MainCalculator.Push(entry);
                NumberInput.Text = "";
                NumberInput.Focus();
            }
            ErrorMessage.Text = string.Empty;
        }