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

            newVar.m_expression = "'" + text + "'";
            m_indicator.setVariable(var.m_parameters[0], newVar);
            return(0);
        }
Пример #2
0
        /// <summary>
        /// 设置属性
        /// </summary>
        /// <param name="var">变量</param>
        /// <returns>状态</returns>
        private double SETPROPERTY(CVariable var)
        {
            DesignerScript designerScript = m_xml.Script as DesignerScript;
            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]);

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

            newVar.m_expression = "'" + text + "'";
            m_indicator.setVariable(var.m_parameters[0], newVar);
            return(0);
        }
Пример #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 DesignerScript(this);
            loadFile(xmlPath, null);
            m_window      = findControl(windowName) as WindowEx;
            m_invokeEvent = new FCInvokeEvent(invoke);
            if (m_window != null)
            {
                m_window.addEvent(m_invokeEvent, FCEventID.INVOKE);
                //注册点击事件
                registerEvents(m_window);
            }
        }
Пример #5
0
        /// <summary>
        /// 显示右键菜单
        /// </summary>
        /// <param name="var">变量</param>
        /// <returns>状态</returns>
        private double SHOWRIGHTMENU(CVariable var)
        {
            DesignerScript designerScript = m_xml.Script as DesignerScript;
            FCNative       native         = m_xml.Native;
            FCView         control        = m_xml.findControl(designerScript.getSender());
            int            clientX        = native.clientX(control);
            int            clientY        = native.clientY(control);
            FCMenu         menu           = m_xml.getMenu(m_indicator.getText(var.m_parameters[0]));

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