📄 fmodifydlg.cpp
字号:
// FModifyDlg.cpp : implementation file
//
#include "stdafx.h"
#include "XMLClassDoc.h"
#include "FModifyDlg.h"
#include "DocManage.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CFModifyDlg dialog
CFModifyDlg::CFModifyDlg(CWnd* pParent /*=NULL*/)
: CDialog(CFModifyDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CFModifyDlg)
m_strComboType = _T("");
m_strExample = _T("");
m_strDeclare = _T("");
m_strParaNote = _T("");
m_strRemark = _T("");
m_strReturn = _T("");
//}}AFX_DATA_INIT
}
void CFModifyDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CFModifyDlg)
DDX_CBString(pDX, IDC_COMBO_TYPE, m_strComboType);
DDX_Text(pDX, IDC_EDIT_EXAMPLE, m_strExample);
DDX_Text(pDX, IDC_EDIT_DECLARE, m_strDeclare);
DDX_Text(pDX, IDC_EDIT_PARANOTE, m_strParaNote);
DDX_Text(pDX, IDC_EDIT_REMARKS, m_strRemark);
DDX_Text(pDX, IDC_EDIT_RETURN, m_strReturn);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CFModifyDlg, CDialog)
//{{AFX_MSG_MAP(CFModifyDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CFModifyDlg message handlers
BOOL CFModifyDlg::InitData(CString strClassName, int ID)
{
m_strClassName = strClassName;
m_strID.Format("%d", ID);
CDocManage *pDocManage = new CDocManage();
CMapStringToString* functionMap = pDocManage->ReadFunctionInfo(strClassName, m_strID);
functionMap->Lookup("visit", m_strComboType);
functionMap->Lookup("fdeclare", m_strDeclare);
functionMap->Lookup("fremark", m_strRemark);
functionMap->Lookup("freturndesc", m_strReturn);
functionMap->Lookup("fparamdesc", m_strParaNote);
functionMap->Lookup("fexample", m_strExample);
m_strRemark.Replace("\n", "\r\n");
m_strReturn.Replace("\n", "\r\n");
m_strParaNote.Replace("\n", "\r\n");
m_strExample.Replace("\n", "\r\n");
delete functionMap;
delete pDocManage;
return true;
}
BOOL CFModifyDlg::OnInitDialog()
{
CDialog::OnInitDialog();
UpdateData(false);
((CEdit*)GetDlgItem(IDC_EDIT_REMARKS))->SetFocus( );
((CWnd*)GetDlgItem(IDC_COMBO_TYPE))->EnableWindow(false);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CFModifyDlg::OnOK()
{
UpdateData(true);
CDocManage *pDocManage = new CDocManage();
CMapStringToString* functionMap = new CMapStringToString();
functionMap->SetAt("fremark", m_strRemark);
functionMap->SetAt("freturndesc", m_strReturn);
functionMap->SetAt("fparamdesc", m_strParaNote);
functionMap->SetAt("fexample", m_strExample);
pDocManage->ModifyFunctionInfo(functionMap, m_strClassName, m_strID);
delete functionMap;
delete pDocManage;
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -