📄 querycommand.cpp
字号:
// QueryCommand.cpp : implementation file
//
#include "stdafx.h"
#include "dsACD_IVR.h"
#include "QueryCommand.h"
#include "dsACD_IVRDoc.h"
#include "dsACD_IVRView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CQueryCommand dialog
CQueryCommand::CQueryCommand(CWnd* pParent /*=NULL*/)
: CDialog(CQueryCommand::IDD, pParent)
{
//{{AFX_DATA_INIT(CQueryCommand)
m_csComment = _T("");
m_csName = _T("");
m_csContent = _T("");
m_csType = _T("");
//}}AFX_DATA_INIT
}
void CQueryCommand::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CQueryCommand)
DDX_Text(pDX, IDC_QC_COMMENT, m_csComment);
DDX_CBString(pDX, IDC_QC_CONN, m_csName);
DDX_CBString(pDX, IDC_QC_CONTENT, m_csContent);
DDX_CBString(pDX, IDC_QC_TYPE, m_csType);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CQueryCommand, CDialog)
//{{AFX_MSG_MAP(CQueryCommand)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CQueryCommand message handlers
BOOL CQueryCommand::OnInitDialog()
{
CDialog::OnInitDialog();
CComboBox *pName=(CComboBox *)GetDlgItem(IDC_QC_CONN);
CComboBox *pType=(CComboBox *)GetDlgItem(IDC_QC_TYPE);
CComboBox *pContent=(CComboBox *)GetDlgItem(IDC_QC_CONTENT);
CString buf1, buf2, csVarName, csDBConnName;
m_pDsACD_IVRView->ReadVariable(buf1);
while (!buf1.IsEmpty())
{
csVarName = buf1.Left(buf1.Find(";" ));
pContent->AddString(csVarName);
buf1.Delete(0, buf1.Find(";" )+1);
}
m_pDsACD_IVRView->ReadDBConn(buf2);
while (!buf2.IsEmpty())
{
csDBConnName = buf2.Left(buf2.Find(";" ));
pName->AddString(csDBConnName);
buf2.Delete(0, buf2.Find(";" )+1);
}
int nIndex;
nIndex = pName->SelectString(-1, m_csName);
pName->SetCurSel(nIndex);
nIndex = pType->SelectString(-1, m_csType);
pType->SetCurSel(nIndex);
nIndex = pContent->SelectString(-1, m_csContent);
pContent->SetCurSel(nIndex);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CQueryCommand::DisplayDlg(dsACDObjectBase *pObj)
{
dsQC_INFO * pInfo = (dsQC_INFO*) pObj->Read();
m_csName = pInfo->Name;
m_csType = pInfo->Type;
m_csContent = pInfo->Content;
m_csComment = pInfo->Comment;
if(DoModal()==IDOK)
{
if (m_csName == "")
m_csName = "无数据库";
if (m_csType == "")
m_csType = "自动匹配";
if (m_csContent == "")
m_csContent = "空";
pInfo->Name = m_csName;
pInfo->Type = m_csType;
pInfo->Content = m_csContent;
pInfo->Comment = m_csComment;
}
else
return;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -