LAPTOP-SNT8I5JK\Boounion
2025-08-20 bc782c0cb9e6fa6a5740178fd67131244a5d0450
SourceCode/Bond/Servo/ServoDlg.cpp
@@ -39,6 +39,8 @@
/* 运行时间定时器 */
#define TIMER_ID_UPDATE_RUMTIME         2
/* Test */
#define TIMER_ID_TEST               3
// 用于应用程序“关于”菜单项的 CAboutDlg 对话框
@@ -235,7 +237,15 @@
                  pEq2 = theApp.m_model.getMaster().getEquipment(pTask->getTarPosition());
                  if (pEq1 != nullptr && pEq2 != nullptr) {
                     CString strText;
                     strText.Format(_T("%s --> %s"), pEq1->getName().c_str(), pEq2->getName().c_str());
                     if (theApp.m_model.getMaster().getContinuousTransferCount() > 0) {
                        strText.Format(_T("[%d]%s --> %s"),
                           theApp.m_model.getMaster().getContinuousTransferCount(),
                           pEq1->getName().c_str(), pEq2->getName().c_str());
                     }
                     else {
                        strText.Format(_T("%s --> %s"),
                           pEq1->getName().c_str(), pEq2->getName().c_str());
                     }
                     m_pMyStatusbar->setCurTaskBtnText((LPTSTR)(LPCTSTR)strText);
                  }
               }
@@ -324,7 +334,7 @@
   // model init
   theApp.m_model.init();
   SetTimer(TIMER_ID_TEST, 1000, nullptr);
   // 菜单
   CMenu menu;
@@ -341,7 +351,8 @@
   HMENU hMenu = m_pTopToolbar->GetOperatorMenu();
   ASSERT(hMenu);
   ::EnableMenuItem(hMenu, ID_OPEATOR_SWITCH, MF_BYCOMMAND | MF_DISABLED | MF_GRAYED);
   m_pTopToolbar->GetBtn(IDC_BUTTON_JOBS)->EnableWindow(TRUE);
   // Tab
   m_pPageGraph1 = new CPageGraph1();
@@ -867,6 +878,13 @@
      m_pMyStatusbar->setRunTimeText((LPTSTR)(LPCTSTR)strText);
   }
   else if(TIMER_ID_TEST == nIDEvent){
      static __int64 tttt = 0;
      tttt++;
      theApp.m_model.m_hsmsPassive.setVariableValue("CJobSpace", tttt % 10);
      theApp.m_model.m_hsmsPassive.setVariableValue("PJobSpace", tttt % 5);
   }
   CDialogEx::OnTimer(nIDEvent);
}
@@ -960,6 +978,9 @@
         m_pTopToolbar->GetBtn(IDC_BUTTON_STOP)->EnableWindow(FALSE);
      }
   }
   else if (id == IDC_BUTTON_JOBS) {
      AfxMessageBox("IDC_BUTTON_CJOBS");
   }
   else if (id == IDC_BUTTON_PORT_CONFIG) {
      CPortConfigurationDlg dlg;
      dlg.DoModal();