xj qian
2024-06-28 a5e61ee40488b55a4ae53dc9222a2f9ba7564ae9
update frame
已添加1个文件
已修改1个文件
118 ■■■■■ 文件已修改
jrj/ext-jrj/ext-jrj.vcxproj 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jrj/project/business/Public/search.dialog.cpp 90 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jrj/ext-jrj/ext-jrj.vcxproj
@@ -331,10 +331,38 @@
    <ClCompile Include="..\project\business\Supplier3.list.cpp">
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">false</ExcludedFromBuild>
    </ClCompile>
    <ClCompile Include="..\project\printview\Maint.Template.PrintEx.cpp">
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
    </ClCompile>
    <ClCompile Include="..\project\printview\Template.Print.Dialog.cpp">
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
    </ClCompile>
    <ClCompile Include="..\project\printview\Template.Print.ViewEx.cpp">
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
    </ClCompile>
    <ClCompile Include="..\project\start.vframe.vbusiness.cpp" />
    <ClCompile Include="..\project\viewobject\view.base.hpp" />
    <ClCompile Include="..\project\vindexform.cpp" />
    <ClCompile Include="..\project\vindexmenu.cpp" />
    <ClCompile Include="..\project\workflow\workflow.actionlog.cpp">
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
    </ClCompile>
    <ClCompile Include="..\project\workflow\workflow.actionlog_vd.cpp">
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
    </ClCompile>
    <ClCompile Include="..\project\workflow\workflow.chkdlg.cpp">
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
    </ClCompile>
    <ClCompile Include="..\project\workflow\workflow.chkdlg_vd.cpp">
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
    </ClCompile>
    <ClCompile Include="..\xframe\src\nmemory.cpp" />
    <ClCompile Include="..\xframe\src\nstring.cpp" />
    <ClCompile Include="..\xframe\src\xstring.cpp" />
jrj/project/business/Public/search.dialog.cpp
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,90 @@
class SearchDlg :  public xframe
    {
        xnode    m_agentNode;    //Agent Condition
        xcontrol sle_1;
        int SetAgent()
        {
            string xfNodeAgentArea  = "agentarea";
            xnode anode = GetAgentNode(xfNodeAgentArea);
            if(m_agentNode)
            {
                SetAgentNodeContent (anode,m_agentNode);
            }
            else
            {
                msxml::IXMLDOMElement xframeElement =  GetElement();
                msxml::IXMLDOMElement agent = xframeElement.selectSingleNode("agent/"+xfNodeAgentArea+"[1]/*");
                if(agent)
                {
                    string s = agent.xml;
                    m_agentNode =  SetAgentNodeContent (anode,s);
                }
            }
            return 1;
        }
        //焦点激活处理函数
        int OnSetFocus(ref TEvent evt,int param)
        {
            //重置工具条
            //SetAgent();
            return 1;
        }
        int OnOk()
        {
            if(GetParam())
            {
                xaserverarg arg = GetParam();
                arg.AddArg("text",GetControl("sl_search").GetText());
                CloseWindow();
            }
            return 1;
        }
        //命令发布函数
        int OnCmdDispatch(string comdid)
        {
            if(comdid=="xmCancel")
            {
                CloseWindow();
                return 1;
            }
            else if(comdid=="xmOk") return OnOk();
            return 0;
        }
        //命令处理事件
        int OnXCommand(ref TXCommandEvent evt,int param)
        {
            return OnCmdDispatch(evt.pStrID);
        }
        int OnAttachEvent()
        {
            //绑定工具条点击事件
            AttachEvent("WM_XCOMMAND",OnXCommand);
            //获取焦点事件,用于重置工具条
            AttachEvent("WM_SETFOCUS",OnSetFocus);
        }
        int onload()
        {
            sle_1 = GetControl("sl_search");
            int x = win32::GetWindowLong(sle_1.GetId(), -16); //GWL_STYLE
            x = x+ 0x0008;
            win32::SetWindowLong(sle_1.GetId(), -16,x);//sle_1是编辑窗口控件
            OnAttachEvent();
            if(GetParam())
            {
                xaserverarg arg = GetParam();
                GetControl("sl_search").SetText(arg.GetArgString("text"));
            }
            return 1;
        }
    };