| | |
| | | } |
| | | ASSERT(m_pActiveView); |
| | | if (m_pActiveView->GetContext() != (void*)pPlc) { |
| | | m_pActiveView->SetWindowText(pPlc->getName().c_str()); |
| | | CString strTitle; |
| | | strTitle.Format(_T("%s[%s:%d]"), pPlc->getName().c_str(), pPlc->getIp().c_str(), |
| | | pPlc->getPort()); |
| | | m_pActiveView->SetWindowText(strTitle); |
| | | m_pActiveView->SetContext(pPlc); |
| | | m_pActiveView->SendMessage(WM_NCPAINT, 0, 0); |
| | | } |
| | |
| | | theApp.m_model.setCurrentPlc(pPlc); |
| | | } |
| | | } |
| | | else if (RX_PLC_STATE_CHANGED == code) { |
| | | |
| | | } |
| | | else if (code == RX_CODE_ALARM_ON) { |
| | | CPLC* pPlc; |
| | | if (pAny->getPtrValue("ptr", (void*&)pPlc) && pPlc == theApp.m_model.getCurrentPlc()) { |