📄 switch.cpp
字号:
// Switch.cpp : implementation file
//
#include "stdafx.h"
#include "dsACD_IVR.h"
#include "Switch.h"
#include "dsACD_IVRDoc.h"
#include "dsACD_IVRView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSwitch dialog
CSwitch::CSwitch(CWnd* pParent /*=NULL*/)
: CDialog(CSwitch::IDD, pParent)
{
//{{AFX_DATA_INIT(CSwitch)
m_csCondition = _T("");
m_csComment = _T("");
//}}AFX_DATA_INIT
}
void CSwitch::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSwitch)
DDX_CBString(pDX, IDC_SM_CONDITION, m_csCondition);
DDX_Text(pDX, IDC_SM_COMMENT, m_csComment);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSwitch, CDialog)
//{{AFX_MSG_MAP(CSwitch)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSwitch message handlers
BOOL CSwitch::OnInitDialog()
{
CDialog::OnInitDialog();
CComboBox *pCondition=(CComboBox *)GetDlgItem(IDC_SM_CONDITION);
CString buf, csVariableName;
m_pDsACD_IVRView->ReadVariable(buf);
while (!buf.IsEmpty())
{ csVariableName = buf.Left(buf.Find(";" ));
pCondition->AddString(csVariableName);
buf.Delete(0, buf.Find(";" )+1);
}
int nIndex = pCondition->SelectString(-1, m_csCondition);
pCondition->SetCurSel(nIndex);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CSwitch::DisplayDlg(dsACDObjectBase *pObj)
{
dsSM_INFO * pSMInfo = (dsSM_INFO*) pObj->Read();
m_csCondition = pSMInfo->Condition;
m_csComment = pSMInfo->Comment;
if(DoModal()==IDOK)
{
pSMInfo->Condition = m_csCondition;
pSMInfo->Comment = m_csComment;
}
else
return;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -