2022-03-20 15:14:44 +08:00
|
|
|
|
#pragma once
|
|
|
|
|
|
2022-05-31 22:21:20 +08:00
|
|
|
|
#include <chrono>
|
2022-03-20 15:14:44 +08:00
|
|
|
|
|
2022-06-02 10:08:38 +08:00
|
|
|
|
#include "MCADoc.h"
|
|
|
|
|
|
2022-03-20 15:14:44 +08:00
|
|
|
|
// CControlView 窗体视图
|
|
|
|
|
|
|
|
|
|
class CControlView : public CFormView
|
|
|
|
|
{
|
|
|
|
|
DECLARE_DYNCREATE(CControlView)
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
CControlView(); // 动态创建所使用的受保护的构造函数
|
|
|
|
|
virtual ~CControlView();
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
#ifdef AFX_DESIGN_TIME
|
|
|
|
|
enum { IDD = IDD_DIALOG_CONTROL };
|
|
|
|
|
#endif
|
|
|
|
|
#ifdef _DEBUG
|
|
|
|
|
virtual void AssertValid() const;
|
|
|
|
|
#ifndef _WIN32_WCE
|
|
|
|
|
virtual void Dump(CDumpContext& dc) const;
|
|
|
|
|
#endif
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
|
|
|
|
|
|
|
|
|
DECLARE_MESSAGE_MAP()
|
|
|
|
|
public:
|
2022-06-02 10:08:38 +08:00
|
|
|
|
CMCADoc* pDoc = nullptr;
|
|
|
|
|
int roundupPowerof2(int val);
|
|
|
|
|
double GetMilliTime();
|
|
|
|
|
void UpdateValue();
|
|
|
|
|
|
|
|
|
|
// 消息处理
|
2022-05-30 16:36:01 +08:00
|
|
|
|
afx_msg void OnSize(UINT nType, int cx, int cy);
|
2022-06-02 10:08:38 +08:00
|
|
|
|
virtual void OnInitialUpdate();
|
2022-05-31 22:21:20 +08:00
|
|
|
|
virtual void OnUpdate(CView* /*pSender*/, LPARAM /*lHint*/, CObject* /*pHint*/);
|
2022-06-02 10:08:38 +08:00
|
|
|
|
afx_msg void OnTimer(UINT_PTR nIDEvent);
|
|
|
|
|
virtual BOOL PreTranslateMessage(MSG* pMsg);
|
2022-05-31 22:21:20 +08:00
|
|
|
|
|
|
|
|
|
// 选择信息
|
2022-06-02 10:08:38 +08:00
|
|
|
|
CString m_sSource = (CString)"Cs137";
|
|
|
|
|
CString m_sAxisMode = (CString)"Linear";
|
|
|
|
|
CString m_sRangeMode = (CString)"Auto";
|
|
|
|
|
CString m_sSmoothType = (CString)"Origin";
|
|
|
|
|
|
|
|
|
|
// 量程
|
|
|
|
|
int m_nLC;
|
2022-03-20 15:14:44 +08:00
|
|
|
|
|
2022-05-31 22:21:20 +08:00
|
|
|
|
// 光标信息
|
|
|
|
|
int m_nCursor1;
|
|
|
|
|
int m_nCursor2;
|
|
|
|
|
int m_nCursorROI;
|
|
|
|
|
int m_nCursorROICount;
|
2022-03-20 15:14:44 +08:00
|
|
|
|
|
2022-05-31 22:21:20 +08:00
|
|
|
|
// 侧边信息
|
|
|
|
|
double m_nCond;
|
|
|
|
|
double m_nT0;
|
|
|
|
|
double m_nTime;
|
|
|
|
|
CString m_nTimeStr;
|
|
|
|
|
int m_nTotalCount;
|
|
|
|
|
int m_nPartCount;
|
2022-06-02 10:08:38 +08:00
|
|
|
|
int m_nMaxCount;
|
2022-05-31 22:21:20 +08:00
|
|
|
|
CComboBox m_ComboMode;
|
|
|
|
|
CComboBox m_ComboAxis;
|
|
|
|
|
|
|
|
|
|
// 菜单与工具栏响应
|
|
|
|
|
CMenu m_Menu;
|
|
|
|
|
CToolBar m_wndToolBar;
|
|
|
|
|
afx_msg void OnStaStart();
|
|
|
|
|
afx_msg void OnStaStop();
|
|
|
|
|
afx_msg void OnStaClear();
|
|
|
|
|
afx_msg void OnSimuCo();
|
|
|
|
|
afx_msg void OnSimuCs();
|
|
|
|
|
afx_msg void OnSimuNa();
|
2022-06-02 10:08:38 +08:00
|
|
|
|
afx_msg void OnAxisLinear();
|
|
|
|
|
afx_msg void OnAxisLog();
|
|
|
|
|
afx_msg void OnRangeAuto();
|
|
|
|
|
afx_msg void OnRangeD4();
|
|
|
|
|
afx_msg void OnRangeD2();
|
|
|
|
|
afx_msg void OnRangeM2();
|
|
|
|
|
afx_msg void OnRangeM4();
|
|
|
|
|
afx_msg void OnDataOrigin();
|
|
|
|
|
afx_msg void OnData3();
|
|
|
|
|
afx_msg void OnData5();
|
|
|
|
|
|
|
|
|
|
// 点击状态
|
|
|
|
|
BOOL m_bStartFlag = TRUE;
|
|
|
|
|
BOOL m_bStopFlag = FALSE;
|
|
|
|
|
BOOL m_bClearFlag = FALSE;
|
|
|
|
|
BOOL m_bCoFlag = TRUE;
|
|
|
|
|
BOOL m_bCsFlag = FALSE;
|
|
|
|
|
BOOL m_bNaFlag = TRUE;
|
|
|
|
|
BOOL m_bAutoFlag = FALSE;
|
|
|
|
|
BOOL m_bOriginFlag = FALSE;
|
|
|
|
|
BOOL m_bTSmoothFlag = TRUE;
|
|
|
|
|
BOOL m_bFSmoothFlag = TRUE;
|
|
|
|
|
|
|
|
|
|
afx_msg void OnUpdateStaStart(CCmdUI* pCmdUI);
|
|
|
|
|
afx_msg void OnUpdateStaStop(CCmdUI* pCmdUI);
|
|
|
|
|
afx_msg void OnUpdateStaClear(CCmdUI* pCmdUI);
|
|
|
|
|
afx_msg void OnUpdateSimuCo(CCmdUI* pCmdUI);
|
|
|
|
|
afx_msg void OnUpdateSimuCs(CCmdUI* pCmdUI);
|
|
|
|
|
afx_msg void OnUpdateSimuNa(CCmdUI* pCmdUI);
|
|
|
|
|
afx_msg void OnUpdateRangeAuto(CCmdUI* pCmdUI);
|
|
|
|
|
afx_msg void OnUpdateDataOrigin(CCmdUI* pCmdUI);
|
|
|
|
|
afx_msg void OnUpdateData3(CCmdUI* pCmdUI);
|
|
|
|
|
afx_msg void OnUpdateData5(CCmdUI* pCmdUI);
|
2022-05-31 22:21:20 +08:00
|
|
|
|
};
|