80 lines
2.0 KiB
C++
80 lines
2.0 KiB
C++
#ifndef _LAYERSIFTDLG_H
|
|
#define _LAYERSIFTDLG_H
|
|
|
|
#include "resource.h"
|
|
|
|
|
|
// 图层过滤文件处理器基类(LayerFiltration.txt)
|
|
class CLayerFiltrationFileOperator
|
|
{
|
|
public:
|
|
CLayerFiltrationFileOperator(LPCTSTR szFileName);
|
|
~CLayerFiltrationFileOperator() {};
|
|
|
|
virtual BOOL ReadFile(CStringArray &aryLayers) const;
|
|
virtual BOOL WriteFile(const CStringArray &aryLayers) const;
|
|
|
|
static BOOL SplitString(CString sAllName, CStringArray &aryLayers);
|
|
|
|
protected:
|
|
CString m_sFileName;
|
|
};
|
|
|
|
|
|
class CLayerSiftDlg : public CModelessDialog
|
|
{
|
|
public:
|
|
DECLARE_DYNAMIC(CLayerSiftDlg);
|
|
|
|
CLayerSiftDlg(CWnd *pParent = NULL);
|
|
~CLayerSiftDlg();
|
|
|
|
enum {IDD = IDD_DLG_SIFTSET};
|
|
|
|
public:
|
|
CString GetLayerName();
|
|
void SetLayerName(const CStringArray &aryLayers);
|
|
|
|
void GetLayerInIniFiles();
|
|
|
|
public:
|
|
static BOOL m_bSelectEnt; // 标记是否当前状态是在从屏幕取实体
|
|
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX);
|
|
virtual BOOL OnInitDialog();
|
|
|
|
DECLARE_MESSAGE_MAP()
|
|
afx_msg void OnSize(UINT nType, int cx, int cy);
|
|
afx_msg void OnGetMinMaxInfo(MINMAXINFO* lpMMI);
|
|
|
|
afx_msg void OnBlickSelectOnDraw();
|
|
afx_msg void OnBnClickedOk();
|
|
|
|
private:
|
|
void InitSpaceSize(); // 填充下面的int
|
|
bool IsInitSizeData() { return SPACE != -1; }
|
|
|
|
void Layout(int cx, int cy); // 布置按钮
|
|
void LstLayerRect(CRect &rect, int dlgCx, int dlgCy);
|
|
void BtnSelectInDrawRect(CRect &rect, int dlgCx, int dlgCy);
|
|
void BtnOkRect(CRect &rect, int dlgCx, int dlgCy);
|
|
void BtnCancelRect(CRect &rect, int dlgCx, int dlgCy);
|
|
|
|
private:
|
|
int BTNHEI, BTNWID; // 按钮长宽
|
|
int SPACE, PSPACE, SPACEBTN; // 空格间距
|
|
|
|
private:
|
|
CEdit m_edtLayerName;
|
|
// 文件读取器
|
|
CLayerFiltrationFileOperator *m_pFileBase;
|
|
|
|
CStringArray m_aryTmpLayer;
|
|
static CString m_csTmpLayer; // 临时图层,防止修改后,就进行了图纸提取
|
|
static CString m_csIniFileLayer; // 防止修改后退出
|
|
static CString s_sRet;
|
|
static CString s_sSplit;
|
|
};
|
|
|
|
#endif |