LAPTOP-SNT8I5JK\Boounion
2025-03-10 469bf4af5180cdee2808b595e2d48d6266992235
SourceCode/Bond/Servo/ServoDlg.cpp
@@ -626,6 +626,33 @@
}
void CServoDlg::OnBnClickedButtonAlarm()
{
   m_bShowAlarmWnd = !m_bShowAlarmWnd;
   // 如果要显示报警窗口,则隐藏日志窗口
   if (m_bShowLogWnd) {
      m_bShowLogWnd = false;
      if (m_pLogDlg != nullptr) {
         m_pLogDlg->ShowWindow(SW_HIDE);
         UpdateLogBtn();
      }
   }
   if (m_pAlarmDlg == nullptr) {
      m_pAlarmDlg = new CAlarmDlg();
      m_pAlarmDlg->Create(IDD_DIALOG_ALARM, this);
      CRect rcWnd;
      GetWindowRect(&rcWnd);
      m_pAlarmDlg->MoveWindow(rcWnd.left, rcWnd.bottom - 8, rcWnd.Width(), 200);
   }
   ASSERT(m_pAlarmDlg);
   m_pAlarmDlg->ShowWindow(m_bShowAlarmWnd ? SW_SHOW : SW_HIDE);
   UpdateAlarmBtn();
}
void CServoDlg::OnBnClickedButtonLog()
{
   m_bShowLogWnd = !m_bShowLogWnd;
@@ -848,14 +875,16 @@
   y += rcItem.Height();
   y += 8;
   x = 8;
   x = rcClient.right - 8;
   pItem = GetDlgItem(IDC_BUTTON_LOG);
   pItem->GetClientRect(&rcItem);
   x -= rcItem.Width();
   pItem->MoveWindow(x, rcClient.bottom - 8 - rcItem.Height(), rcItem.Width(), rcItem.Height());
   x -= 8;
   x = 20 + rcItem.Width();
   pItem = GetDlgItem(IDC_BUTTON_ALARM);
   pItem->GetClientRect(&rcItem);
   x -= rcItem.Width();
   pItem->MoveWindow(x, rcClient.bottom - 8 - rcItem.Height(), rcItem.Width(), rcItem.Height());
}
@@ -945,14 +974,6 @@
   }
   
   return CDialogEx::OnEraseBkgnd(pDC);
}
void CServoDlg::OnBnClickedButtonAlarm()
{
   // TODO: 在此添加控件通知处理程序代码
   CAlarmDlg dlg;
   dlg.DoModal();
}
void CServoDlg::OnGraphItemClicked(NMHDR* pNMHDR, LRESULT* pResult)