| | |
| | | |
| | | BEGIN_MESSAGE_MAP(CCjPage3, CCjPageBase) |
| | | ON_WM_DESTROY() |
| | | ON_EN_CHANGE(IDC_EDIT_CJ_ID, &CCjPage3::OnEnChangeEditCjId) |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | |
| | | */ |
| | | } |
| | | |
| | | void CCjPage3::OnApply() |
| | | int CCjPage3::OnApply() |
| | | { |
| | | // SERVO::CControlJob* |
| | | if (m_pContext == nullptr) return -1; |
| | | SERVO::CControlJob* pControlJob = (SERVO::CControlJob*)m_pContext; |
| | | |
| | | // 更新名称 |
| | | BOOL bOkName = TRUE; |
| | | char szBuffer[256]; |
| | | GetDlgItemText(IDC_EDIT_CJ_ID, szBuffer, 256); |
| | | pControlJob->setId(std::string(szBuffer)); |
| | | |
| | | |
| | | ContentChanged(1); |
| | | return 0; |
| | | } |
| | | |
| | | void CCjPage3::OnSetContext(void* pContext) |
| | | { |
| | | UpdateCjData(); |
| | | } |
| | | |
| | | void CCjPage3::UpdateCjData() |
| | | { |
| | | if (m_pContext == nullptr) return; |
| | | |
| | | m_bContentChangedLock = TRUE; |
| | | |
| | | SERVO::CControlJob* pControlJob = (SERVO::CControlJob*)m_pContext; |
| | | SetDlgItemText(IDC_EDIT_CJ_ID, pControlJob->id().c_str()); |
| | | |
| | | |
| | | m_bContentChangedLock = FALSE; |
| | | } |
| | | |
| | | void CCjPage3::OnEnChangeEditCjId() |
| | | { |
| | | ContentChanged(0); |
| | | } |