| | |
| | | m_pTerminalDisplayDlg = nullptr; |
| | | m_pObserver = nullptr; |
| | | m_pPanelMaster = nullptr; |
| | | m_pPanelEquipment = nullptr; |
| | | m_pPanelAttributes = nullptr; |
| | | } |
| | | |
| | | void CServoDlg::DoDataExchange(CDataExchange* pDX) |
| | |
| | | } |
| | | } |
| | | } |
| | | else if (RX_CODE_SELECT_EQUIPMENT == code) { |
| | | SERVO::CEquipment* pEquipment = nullptr; |
| | | if (pAny->getPtrValue("ptr", (void*&)pEquipment)) { |
| | | ASSERT(pEquipment); |
| | | ASSERT(m_pPanelEquipment); |
| | | ASSERT(m_pPanelAttributes); |
| | | m_pPanelEquipment->SetEquipment(pEquipment); |
| | | m_pPanelAttributes->ShowWindow(SW_HIDE); |
| | | if (!m_pPanelEquipment->IsWindowVisible()) { |
| | | m_pPanelEquipment->ShowWindow(SW_SHOW); |
| | | Resize(); |
| | | } |
| | | } |
| | | } |
| | | else if (RX_CODE_SELECT_STEP == code) { |
| | | SERVO::CStep* pStep = nullptr; |
| | | if (pAny->getPtrValue("ptr", (void*&)pStep)) { |
| | | ASSERT(pStep); |
| | | ASSERT(m_pPanelEquipment); |
| | | ASSERT(m_pPanelAttributes); |
| | | m_pPanelEquipment->ShowWindow(SW_HIDE); |
| | | m_pPanelAttributes->loadDataFromStep(pStep); |
| | | if (!m_pPanelAttributes->IsWindowVisible()) { |
| | | m_pPanelAttributes->ShowWindow(SW_SHOW); |
| | |
| | | m_pPanelMaster = new CPanelMaster(); |
| | | m_pPanelMaster->Create(IDD_PANEL_MASTER, this); |
| | | m_pPanelMaster->ShowWindow(SW_SHOW); |
| | | m_pPanelEquipment = new CPanelEquipment(); |
| | | m_pPanelEquipment->Create(IDD_PANEL_EQUIPMENT, this); |
| | | m_pPanelAttributes = new CPanelAttributes(); |
| | | m_pPanelAttributes->Create(IDD_PANEL_ATTRIBUTES, this); |
| | | // m_pPanelAttributes->ShowWindow(SW_SHOW); |
| | | |
| | | |
| | | |
| | | |
| | | // 调整初始窗口位置 |
| | |
| | | m_pPanelMaster = nullptr; |
| | | } |
| | | |
| | | if (m_pPanelEquipment != nullptr) { |
| | | m_pPanelEquipment->DestroyWindow(); |
| | | delete m_pPanelEquipment; |
| | | m_pPanelEquipment = nullptr; |
| | | } |
| | | |
| | | if (m_pPanelAttributes != nullptr) { |
| | | m_pPanelAttributes->DestroyWindow(); |
| | | delete m_pPanelAttributes; |
| | |
| | | x += nPanelWidth; |
| | | } |
| | | |
| | | if (m_pPanelEquipment != nullptr && m_pPanelEquipment->IsWindowVisible()) { |
| | | nPanelWidth = m_pPanelEquipment->getPanelWidth(); |
| | | m_pPanelEquipment->MoveWindow(x, y, nPanelWidth, rcClient.Height()); |
| | | x += nPanelWidth; |
| | | } |
| | | |
| | | if (m_pPanelAttributes != nullptr && m_pPanelAttributes->IsWindowVisible()) { |
| | | nPanelWidth = m_pPanelAttributes->getPanelWidth(); |
| | | m_pPanelAttributes->MoveWindow(x, y, nPanelWidth, rcClient.Height()); |