Beispiel #1
0
        /// <summary>
        /// 获取调用者
        /// </summary>
        /// <param name="var">变量</param>
        /// <returns>状态</returns>
        public double GETSENDER(CVariable var)
        {
            FaceCatScript fScript = m_xml.Script as FaceCatScript;
            String        text    = fScript.getSender();
            CVariable     newVar  = new CVariable(m_indicator);

            newVar.m_expression = "'" + text + "'";
            m_indicator.setVariable(var.m_parameters[0], newVar);
            return(0);
        }
Beispiel #2
0
        /// <summary>
        /// 设置属性
        /// </summary>
        /// <param name="var">变量</param>
        /// <returns>状态</returns>
        private double SETPROPERTY(CVariable var)
        {
            FaceCatScript fScript       = m_xml.Script as FaceCatScript;
            String        name          = m_indicator.getText(var.m_parameters[0]);
            String        propertyName  = m_indicator.getText(var.m_parameters[1]);
            String        propertyValue = m_indicator.getText(var.m_parameters[2]);

            fScript.setProperty(name, propertyName, propertyValue);
            return(0);
        }
Beispiel #3
0
        /// <summary>
        /// 获取属性
        /// </summary>
        /// <param name="var">变量</param>
        /// <returns>状态</returns>
        public double GETPROPERTY(CVariable var)
        {
            FaceCatScript fScript      = m_xml.Script as FaceCatScript;
            String        name         = m_indicator.getText(var.m_parameters[1]);
            String        propertyName = m_indicator.getText(var.m_parameters[2]);
            String        text         = fScript.getProperty(name, propertyName);
            CVariable     newVar       = new CVariable(m_indicator);

            newVar.m_expression = "'" + text + "'";
            m_indicator.setVariable(var.m_parameters[0], newVar);
            return(0);
        }
Beispiel #4
0
        /// <summary>
        /// 加载界面
        /// </summary>
        public virtual void load(FCNative native, String xmlName, String windowName)
        {
            Native = native;
            String xmlPath = DataCenter.getAppPath() + "\\config\\" + xmlName + ".html";

            Script = new FaceCatScript(this);
            loadFile(xmlPath, null);
            m_window      = findControl(windowName) as WindowEx;
            m_invokeEvent = new FCInvokeEvent(invoke);
            m_window.addEvent(m_invokeEvent, FCEventID.INVOKE);
            //注册点击事件
            registerEvents(m_window);
        }
Beispiel #5
0
        /// <summary>
        /// 显示右键菜单
        /// </summary>
        /// <param name="var">变量</param>
        /// <returns>状态</returns>
        private double SHOWRIGHTMENU(CVariable var)
        {
            FaceCatScript fScript = m_xml.Script as FaceCatScript;
            FCNative      native  = m_xml.Native;
            FCView        control = m_xml.findControl(fScript.getSender());
            int           clx     = native.clientX(control);
            int           cly     = native.clientY(control);
            FCMenu        menu    = m_xml.getMenu(m_indicator.getText(var.m_parameters[0]));

            menu.Location = new FCPoint(clx, cly + control.Height);
            menu.Visible  = true;
            menu.Focused  = true;
            menu.bringToFront();
            native.invalidate();
            return(0);
        }