예제 #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;
        }
예제 #2
0
 public BufferManager(Int32 totalBytes, Int32 bufferSize)
 {
     this.totalBytes = totalBytes;
     this.currentIndex = 0;
     this.bufferSize = bufferSize;
     this.freeIndexPool = new ValueStack<int>();
 }
예제 #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);
        }
예제 #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);
        }
예제 #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);
        }
예제 #6
0
 public ViewFactory(String rootFolder, ValueStack.ValueStack stack)
 {
     this.rootFolder = rootFolder;
     this.stack = stack;
 }
예제 #7
0
 public HtmlView(ValueStack.ValueStack stack, String html)
 {
     _stack = stack;
     _html = html;
 }