|
|
|
|
|
#pragma once
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
|
|
|
|
|
|
|
|
|
#pragma pack(1)
|
|
|
|
|
|
struct CutImageInfo
|
|
|
|
|
|
{
|
|
|
|
|
|
LPCTSTR fileNamesSelected; //Ҫת<D2AA><D7AA><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC>б<EFBFBD><D0B1><EFBFBD>ʹ<EFBFBD>÷ֺŷָ<C5B7><D6B8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
LPCTSTR rangeCurveFileName;
|
|
|
|
|
|
int kindOfoutputDirectory; //0--Դ<><D4B4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ¼ 1--ָ<><D6B8>Ŀ¼
|
|
|
|
|
|
LPCTSTR outputDirectorySpecified;
|
|
|
|
|
|
CutImageInfo * Copy();
|
|
|
|
|
|
};
|
|
|
|
|
|
#pragma pack()
|
|
|
|
|
|
|
|
|
|
|
|
class ImageCut
|
|
|
|
|
|
{
|
|
|
|
|
|
public:
|
|
|
|
|
|
ImageCut();
|
|
|
|
|
|
void SetCutImageInfo(CutImageInfo * ciInfo);
|
|
|
|
|
|
int Execute();
|
|
|
|
|
|
void StopCutImage(bool b);
|
|
|
|
|
|
int GetIndexOfFileByCut();
|
|
|
|
|
|
int CutOutFile(CString rangeFile, CString sourceFile, CString destFile);
|
|
|
|
|
|
int CutOutFile(CXy &range_xy, CString &sourceFile, CString &destFile, int type);
|
|
|
|
|
|
int CutOutFileByLine(BYTE * buffWellPath, int bufLen, CString sourceFile, CString destFile, int type);
|
|
|
|
|
|
protected:
|
|
|
|
|
|
CCurveEx* GetRangeCurve(CXy* pxy, POSITION pos, BOOL& bDeleteCurve);
|
|
|
|
|
|
bool GetFileNamesByCuted();
|
|
|
|
|
|
void SplitStr(CString strSrc, CString strGap, CStringList &strResult);
|
|
|
|
|
|
int CutOut(CCurveEx* pRangeCurve, CString strFileName, int nOutMode);
|
|
|
|
|
|
protected:
|
|
|
|
|
|
CutImageInfo * m_ciInfo;
|
|
|
|
|
|
CStringList m_fileNamesSelected;
|
|
|
|
|
|
bool m_stopCutImage;
|
|
|
|
|
|
volatile int m_indexOfFileByCut;
|
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
bool OpenFile(CXy& xy, LPCTSTR filePath);
|
|
|
|
|
|
void Serialize(CXy& xy, CArchive& ar);
|
|
|
|
|
|
};
|