| | |
| | | // TODO: 在此添加额外的初始化 |
| | | // 创建“停止任务”按钮和“撤回”按钮 |
| | | m_btnAbortTask.Create(_T("停止任务"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, CRect(0, 0, 100, 30), this, IDC_BUTTON_ABORT_TASK); |
| | | m_btnRestore.Create(_T("撤回"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, CRect(0, 0, 100, 30), this, IDC_BUTTON_RESTORE); |
| | | m_btnRestore.Create(_T("重发指令"), WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON, CRect(0, 0, 100, 30), this, IDC_BUTTON_RESTORE); |
| | | |
| | | // 动态按钮创建后设置字体 |
| | | if (m_fontButton.GetSafeHandle() == nullptr) { |
| | |
| | | |
| | | void CRobotTaskDlg::OnBnClickedRestore() |
| | | { |
| | | int ret = AfxMessageBox(_T("物料将会被搬运回原位置,确认要回撤当前任务吗?除非发生了异常,否则请不要回撤任务!"), MB_OKCANCEL | MB_ICONEXCLAMATION); |
| | | // 回撤任务修改为重发任务 |
| | | int ret = AfxMessageBox(_T("确认要重新下发任务吗?"), MB_OKCANCEL | MB_ICONEXCLAMATION); |
| | | if (ret != IDOK) { |
| | | return; |
| | | } |
| | | |
| | | theApp.m_model.getMaster().restoreCurrentTask(); |
| | | theApp.m_model.getMaster().resendCurrentTask(); |
| | | } |