Exemplo n.º 1
0
        /// <summary>
        /// 演算
        /// </summary>
        /// <param name="pStackValue">値スタック</param>
        public override void Calculation(ValueStack pStackValue)
        {
            CalculatorValue v1;
            CalculatorValue newValue = this.Get1Value(pStackValue, out v1);

            newValue.Value = v1.Value * 180.0 / Math.PI;
        }
Exemplo n.º 2
0
 public BufferManager(Int32 totalBytes, Int32 bufferSize)
 {
     this.totalBytes = totalBytes;
     this.currentIndex = 0;
     this.bufferSize = bufferSize;
     this.freeIndexPool = new ValueStack<int>();
 }
Exemplo n.º 3
0
        /// <summary>
        /// 演算
        /// </summary>
        /// <param name="pStackValue">値スタック</param>
        public override void Calculation(ValueStack pStackValue)
        {
            CalculatorValue v1;
            CalculatorValue newValue = this.Get1Value(pStackValue, out v1);

            newValue.Value = Math.Round(v1.Value, MidpointRounding.AwayFromZero);
        }
Exemplo n.º 4
0
        /// <summary>
        /// 演算
        /// </summary>
        /// <param name="pStackValue">値スタック</param>
        public override void Calculation(ValueStack pStackValue)
        {
            CalculatorValue v1, v2;
            CalculatorValue newValue = this.Get2Value(pStackValue, out v1, out v2);

            newValue.Value = Math.Pow(v1.Value, v2.Value);
        }
Exemplo n.º 5
0
        public ActionHandlerEx(string expression, ValueStack.ValueStack valueStack, object sender)
        {
            expression = expression.Trim();

            _valueStack = valueStack;

            if (expression.StartsWith("$") && expression.Contains("("))
                PrepareScriptCall(expression, sender);
            else
                throw new Exception("Incorrect action: " + expression);
        }
Exemplo n.º 6
0
 public ViewFactory(String rootFolder, ValueStack.ValueStack stack)
 {
     this.rootFolder = rootFolder;
     this.stack = stack;
 }
Exemplo n.º 7
0
 public HtmlView(ValueStack.ValueStack stack, String html)
 {
     _stack = stack;
     _html = html;
 }