Example #1
0
        public void Press_operator()
        {
            var ui = new UI();

            ui.Operator_pressed += req =>
                {
                    var opnum = (int) req.Item1[0];
                    ui.Display_result(new Tuple<IEnumerable<int>, int>(new[]{opnum}, req.Item2));
                };

            ui.ShowDialog();
        }
Example #2
0
        public void Enter_number_and_display_stack()
        {
            var ui = new UI();

            var list = new List<int>();
            ui.Number_entered += n =>
                {
                    list.Add(n);
                    ui.Display_result(new Tuple<IEnumerable<int>, int>(list, n*10));
                };

            ui.ShowDialog();
        }