| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206 |
- /**************************************************************************************************
- 版本所有(C), 2020-2022, 北京普达迪泰
- ***************************************************************************************************
- 文 件 名: DynamicTask.h
- 功能描述: 动态测量任务
- 版 本 号: 1.00初版
- 作 者: HYF
- 生成日期; 2021-12-20
- 最近修改:
- 函数列表:
- 修改历史:
- 1.日 期 : 2021-12-20
- 作 者 : HYF
- 修改内容 : 创建文件
- **************************************************************************************************/
- #pragma once
- // CDynamicTask 窗体视图
- #include "LABEL.H"
- #include <afxcmn.h> // MFC 对 Windows 公共控件的支持
- // CELL Border States
- #define TASK_STATUS_0 0
- #define TASK_STATUS_RUNNING 1
- #define TASK_STATUS_PAUSED 2
- class CDmsDoc;
- class OSGView;
- class DynamicTaskThread;
- class CDynamicTask : public CFormView
- {
- DECLARE_DYNCREATE(CDynamicTask)
- public:
- CDynamicTask(); // 动态创建所使用的受保护的构造函数
- virtual ~CDynamicTask();
- private :
- public:
- #ifdef AFX_DESIGN_TIME
- enum { IDD = IDD_VIEW_DYNAMIC_TASK };
- #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:
- // 背景
- CBrush m_BkBrush;
- // 标题
- CLabel m_Static_Title;
- // 开始测量
- CMFCButton m_Btn_Start;
- // 测量时间
- CLabel m_Static_MeasureTime;
- CString m_szTimeCost;
- int m_iEclapsed;
- // 偏移量
- CLabel m_Static_Angle_A_Label;
- CLabel m_Static_Angle_AX;
- CLabel m_Static_Angle_AY;
- CLabel m_Static_Angle_AZ;
- CString m_szAngleAX;
- CString m_szAngleAY;
- CString m_szAngleAZ;
- // 调校量
- CLabel m_Static_Angle_E_Label;
- CLabel m_Static_Angle_EX;
- CLabel m_Static_Angle_EY;
- CLabel m_Static_Angle_EZ;
- CString m_szAngleEX;
- CString m_szAngleEY;
- CString m_szAngleEZ;
- // 推力线
- CLabel m_Static_Thrust_Label;
- CLabel m_Static_Line_Start;
- CLabel m_Static_Line_End;
- CString m_szLineStart;
- CString m_szLineEnd;
- // 结果比对
- CMFCButton m_Btn_Compare;
- // 导出报告
- CMFCButton m_Btn_Report;
- // 新增部位:分机1、分机2......
- CLabel m_Static_AddPlace;
- // 部位
- CComboBox m_Combo_EquipPlace;
- // 类型编码Label
- CLabel m_Static_EquipTypeCode;
- // 设备编码Label
- CLabel m_Static_EquipCode;
- // 中止测量
- CMFCButton m_BtnStop;
- // 测量时间间隔LABEL
- CLabel m_Static_Label_TimeSpan;
- CLabel m_Static_Label_Second;
- // 测量时间频率选择
- CComboBox m_Combox_Frequency;
- //
- BOOL m_bStopClicked;
- private:
- // 文档对象指针
- CDmsDoc *m_pDoc;
- // 任务ID
- DWORD m_taskId;
- // 设备型号
- CString m_szEquipTypeCode;
- // 设备编号
- CString m_szEquipCode;
- // 当前选中分机索引
- int m_idxEquipPlace;
- // 任务状态
- int m_iTaskStatus;
- // 是否有执行测量
- BOOL m_bExecuted;
- protected:
- // OSG View
- OSGView* m_pOSGView;
- public:
- // 初始化UI数据
- void InitFormData(DWORD taskId);
- // 重置UI状态
- void ResetFormData();
- // 显示UI栏位
- void ShowTaskFieldStatus();
- // 初始化任务信息
- void InitTaskInfo();
-
- // 初始化设备部位列表
- void InitEquipPlaceList();
- virtual void OnInitialUpdate();
- virtual void OnUpdate(CView* /*pSender*/, LPARAM /*lHint*/, CObject* /*pHint*/);
- public:
- BOOL IsModelExist(LPCTSTR szEquipTypeCode, CStringArray& arrModel);
- BOOL FetchDynamicTaskData(LPCTSTR szEquipPlace);
- BOOL ShowDynamicTaskData(LPCTSTR szEquipPlace);
- public:
- afx_msg void OnBnClickedBtnStartTask();
- afx_msg void OnBnClickedBtnCompareResult();
- afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
- afx_msg void OnTimer(UINT_PTR nIDEvent);
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- afx_msg void OnBnClickedBtnOutputReport();
- afx_msg void OnSize(UINT nType, int cx, int cy);
- afx_msg void OnDestroy();
- afx_msg void OnBnClickedBtnBack();
- afx_msg void OnStnClickedStaticAddPlace();
- afx_msg LRESULT OnMeasureSuccess(WPARAM wp, LPARAM lp);
- afx_msg LRESULT OnMeasureFailure(WPARAM wp, LPARAM lp);
- afx_msg LRESULT OnMeasureComplete(WPARAM wp, LPARAM lp);
- afx_msg LRESULT OnReStartIDPMS(WPARAM wp, LPARAM lp);
- afx_msg void OnBnClickedBtnPause();
- afx_msg void OnCbnSelchangeComboTimespan();
- afx_msg void OnBnClickedBtnCamConfig();
- afx_msg void OnCbnSelchangeEquipPlace();
- afx_msg void OnBnClickedBtnFinish();
- CMFCButton m_Btn_Finish;
- };
|