示例#1
0
        // Inserts an empty calcview
        public void InsertCalcView(int pos)
        {
            MovableCasCalcView MovCasCalcView = new MovableCasCalcView(Eval);

            MovCasCalcView.calcview.input.Activated += delegate
            {
                MovCasCalcView.calcview.Evaluate();
                Reevaluate();
                MovCasCalcView.ShowAll();
            };

            MovCasCalcView.Attach(AddLockCheckButton(MovCasCalcView), 1, 100, 1, 1);
            MovCasCalcView.Attach(AddCommandButtons(MovCasCalcView), 100, 1, 1, 1);

            if (pos == -1)
            {
                castextviews.Add(MovCasCalcView);
            }
            else
            {
                castextviews.Insert(pos, MovCasCalcView);
            }

            Clear();
            Redraw();
            ShowAll();
        }
示例#2
0
        // Inserts a calcview that has some kind of input.
        public void InsertCalcView(string input, bool locked)
        {
            MovableCasCalcView MovCasCalcView = new MovableCasCalcView(Eval);

            MovCasCalcView.calcview.input.Text       = input;
            MovCasCalcView.calcview.input.IsEditable = !locked;
            MovCasCalcView.calcview.input.Activated += delegate
            {
                MovCasCalcView.calcview.Evaluate();
                MovCasCalcView.ShowAll();
            };

            MovCasCalcView.Attach(AddLockCheckButton(MovCasCalcView), 1, 100, 1, 1);
            MovCasCalcView.Attach(AddCommandButtons(MovCasCalcView), 100, 1, 1, 1);

            castextviews.Add(MovCasCalcView);

            Clear();
            Redraw();
            ShowAll();
        }