101 lines
2.3 KiB
C++
101 lines
2.3 KiB
C++
#if !defined(AFX_SPLITDWGDLG_H__66351DBE_BB5C_4E21_A7E8_974D99E74259__INCLUDED_)
|
|
#define AFX_SPLITDWGDLG_H__66351DBE_BB5C_4E21_A7E8_974D99E74259__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
// SplitDwgDlg.h : header file
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CSplitDwgDlg dialog
|
|
#include "Resource.h"
|
|
#include "WDGRID.h"
|
|
|
|
class TGridSplitDwgInfo : public WRowData
|
|
{
|
|
public:
|
|
XPoly2D m_poly;
|
|
AcDbObjectId m_id;
|
|
};
|
|
|
|
struct TSplitDwgCell
|
|
{
|
|
public:
|
|
XPoly2D m_poly;
|
|
CString m_sName;
|
|
CString m_sNumber;
|
|
CString m_sDWGName;
|
|
AcDbObjectId m_id;//图框的id,图块或者pline
|
|
};
|
|
|
|
class TGridSplitDwg: public WDGrid
|
|
{
|
|
protected:
|
|
virtual bool OnCellButtonDown(WDGridCell &cell, CString &res);
|
|
public:
|
|
TGridSplitDwg();
|
|
void GetFileList();
|
|
XStringList m_lstName;
|
|
};
|
|
|
|
|
|
|
|
class CSplitDwgDlg : public CDialog
|
|
{
|
|
// Construction
|
|
public:
|
|
CSplitDwgDlg(CWnd* pParent = NULL); // standard constructor
|
|
|
|
// Dialog Data
|
|
//{{AFX_DATA(CSplitDwgDlg)
|
|
enum { IDD = IDD_SPLIT_DWG };
|
|
CString m_csPath;
|
|
BOOL m_bOpen;
|
|
//}}AFX_DATA
|
|
CString m_sDwgPath, m_sDwgName;
|
|
TGridSplitDwg m_grid;
|
|
//DList<XPoly2D> ;
|
|
void UpdateGrid();
|
|
void GetFinalFileName();
|
|
PickSet m_ssTitle;
|
|
|
|
std::vector<TSplitDwgCell> m_lstCell;
|
|
static bool SortByNumber(const TSplitDwgCell& element1, const TSplitDwgCell& element2);
|
|
static int GetDigitFromStr(CString str);
|
|
|
|
BOOL IsValidFileName(CString strP);
|
|
|
|
// Overrides
|
|
// ClassWizard generated virtual function overrides
|
|
//{{AFX_VIRTUAL(CSplitDwgDlg)
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
|
//}}AFX_VIRTUAL
|
|
|
|
// Implementation
|
|
protected:
|
|
|
|
|
|
// Generated message map functions
|
|
//{{AFX_MSG(CSplitDwgDlg)
|
|
virtual BOOL OnInitDialog();
|
|
afx_msg void OnButtonPath();
|
|
virtual void OnOK();
|
|
afx_msg void OnBnClickedRadioName();
|
|
afx_msg void OnBnClickedRadioNum();
|
|
afx_msg void OnBnClickedCheckName();
|
|
afx_msg void OnBnClickedCheckNum();
|
|
//}}AFX_MSG
|
|
DECLARE_MESSAGE_MAP()
|
|
private:
|
|
BOOL m_bckName;
|
|
BOOL m_bckNum;
|
|
int m_nNameType; // cet 2018.1.25 命名方式
|
|
};
|
|
|
|
//{{AFX_INSERT_LOCATION}}
|
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
|
|
|
#endif // !defined(AFX_SPLITDWGDLG_H__66351DBE_BB5C_4E21_A7E8_974D99E74259__INCLUDED_)
|