Ejemplo n.º 1
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;
 }
Ejemplo n.º 2
0
        //Установка функции
        public void SetFunction(Calc_Processor.Function function)
        {
            if (leftFocus)
            {
                processor.function1 = function;
            }
            else
            {
                processor.function2 = function;
            }

            editor.function = Extensions.GetFunction(function);
        }
Ejemplo n.º 3
0
        // получение функции
        public static string GetFunction(Calc_Processor.Function s)
        {
            if (s == Calc_Processor.Function.Rev)
            {
                return("^-1");
            }

            if (s == Calc_Processor.Function.Sqrt)
            {
                return("^2");
            }

            return("");
        }