示例#1
0
        //Установка операции
        public void SetOperation(Calc_Processor.Operation operation)
        {
            editor.operation = Extensions.GetOperand(operation);

            nextOperation = operation;

            if (!leftFocus)
            {
                return;
            }

            processor.operation = operation;
        }
示例#2
0
        // получение операнда
        public static string GetOperand(Calc_Processor.Operation c)
        {
            switch (c)
            {
            case Calc_Processor.Operation.Add:
                return(plus);

            case Calc_Processor.Operation.Sub:
                return(minus);

            case Calc_Processor.Operation.Mul:
                return(mul);

            case Calc_Processor.Operation.Dvd:
                return(divide);
            }
            return("");
        }
示例#3
0
 //конструктор создания новой записи
 public Calc_Record(int p, int c, string number1, string number2, Calc_Processor.Function function1, Calc_Processor.Function function2, Calc_Processor.Operation operation, string result)
 {
     this.p         = p;
     this.c         = c;
     this.number1   = number1;
     this.number2   = number2;
     this.function1 = function1;
     this.function2 = function2;
     this.operation = operation;
     this.result    = result;
 }