Exemplo n.º 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);
        }
Exemplo n.º 2
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);
        }