#pragma once
|
#include "ListCtrlEx.h"
|
#include <vector>
|
#include <utility>
|
|
|
// CProcessDataListDlg 对话框
|
|
class CProcessDataListDlg : public CDialogEx
|
{
|
DECLARE_DYNAMIC(CProcessDataListDlg)
|
|
public:
|
CProcessDataListDlg(CWnd* pParent = nullptr); // 标准构造函数
|
virtual ~CProcessDataListDlg();
|
|
public:
|
struct PathRow {
|
CString step;
|
CString chamber;
|
CString enterTime;
|
CString leaveTime;
|
bool isArmStep = false;
|
};
|
|
void setRawText(CString& strRawText);
|
void setPathRows(const std::vector<PathRow>& rows);
|
void setUnifiedData(const std::vector<std::pair<CString, CString>>& basicRows,
|
const std::vector<PathRow>& pathRows,
|
const std::vector<std::pair<CString, CString>>& processRows);
|
void setInitialTab(int tabIndex);
|
void InsertParamsToListCtrl(CListCtrl& listCtrl, const CString& data);
|
bool CopyListCtrlToClipboard(CListCtrl& listCtrl, bool includeHeader = false);
|
|
private:
|
CString m_strRawText;
|
CListCtrlEx m_listCtrl;
|
CTabCtrl m_tabCtrl;
|
std::vector<PathRow> m_pathRows;
|
std::vector<std::pair<CString, CString>> m_basicRows;
|
std::vector<std::pair<CString, CString>> m_processRows;
|
CButton m_chkShowArm;
|
bool m_showArmSteps = false;
|
int m_initialTab = 0;
|
|
private:
|
void LoadArmStepOption();
|
void SaveArmStepOption() const;
|
void SetupListCtrlStyle();
|
void BuildNameValueList(const std::vector<std::pair<CString, CString>>& rows);
|
void BuildPathList();
|
void InitUnifiedLayout();
|
void RenderUnifiedTab();
|
|
|
// 对话框数据
|
#ifdef AFX_DESIGN_TIME
|
enum { IDD = IDD_DIALOG_PROCESS_DATA_LIST };
|
#endif
|
|
protected:
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
|
|
DECLARE_MESSAGE_MAP()
|
public:
|
virtual BOOL OnInitDialog();
|
afx_msg void OnBnClickedButton1();
|
afx_msg void OnBnClickedCheckShowArm();
|
afx_msg void OnTcnSelchangeTabUnified(NMHDR* pNMHDR, LRESULT* pResult);
|
};
|