Example #1
0
        /// <summary>
        /// 布局
        /// </summary>
        /// <param name="var">变量</param>
        /// <returns>状态</returns>
        private int DESIGNER_ALIGN(CVariable var)
        {
            Designer designer = m_xml as Designer;

            designer.align((int)m_indicator.getValue(var.m_parameters[0]));
            return(0);
        }
Example #2
0
        /// <summary>
        /// 开始秒表
        /// </summary>
        /// <param name="var">变量</param>
        /// <returns>状态</returns>
        private double STARTTIMER(CVariable var)
        {
            FCView control = m_xml.findControl(m_indicator.getText(var.m_parameters[0]));

            control.startTimer((int)m_indicator.getValue(var.m_parameters[1]), (int)m_indicator.getValue(var.m_parameters[2]));
            return(0);
        }
Example #3
0
        /// <summary>
        /// Windows下主板响
        /// </summary_
        /// <param name="var">变量</param>
        /// <returns>状态</returns>
        private double WIN_BEEP(CVariable var)
        {
            int frequency = 0, duration = 0;
            int vlen = var.m_parameters.Length;

            if (vlen >= 1)
            {
                frequency = (int)m_indicator.getValue(var.m_parameters[0]);
            }
            if (vlen >= 2)
            {
                duration = (int)m_indicator.getValue(var.m_parameters[1]);
            }
            Console.Beep(frequency, duration);
            return(0);
        }
Example #4
0
        /// <summary>
        /// 计算
        /// </summary>
        /// <param name="var">变量</param>
        /// <returns>结果</returns>
        public override double onCalculate(CVariable var)
        {
            switch (var.m_functionID)
            {
            case STARTINDEX:
                return(IN(var));

            case STARTINDEX + 1:
                return(OUT(var));

            case STARTINDEX + 2:
                return(SLEEP(var));

            case STARTINDEX + 3: {
                double value = m_indicator.getValue(var.m_parameters[0]);
                return(0);
            }

            default: return(0);
            }
        }
Example #5
0
 /// <summary>
 /// 睡眠
 /// </summary>
 /// <param name="var">变量</param>
 /// <returns>状态</returns>
 private double SLEEP(CVariable var)
 {
     Thread.Sleep((int)m_indicator.getValue(var.m_parameters[0]));
     return(1);
 }
Example #6
0
 /// <summary>
 /// 添加前缀
 /// </summary>
 /// <param name="var">变量</param>
 /// <returns>状态</returns>
 private double HTTP_ADDPORT(CVariable var)
 {
     FCHttpMonitor.MainMonitor.Port = (int)m_indicator.getValue(var.m_parameters[0]);
     return(0);
 }