You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.2 KiB
C++

#pragma once
#include "stdafx.h"
#pragma pack(1)
struct CutImageInfo
{
LPCTSTR fileNamesSelected; //要转换的文件列表。使用分号分割各个文件名。
LPCTSTR rangeCurveFileName;
int kindOfoutputDirectory; //0--源码所在目录 1--指定目录
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 CutOutFileByLine(BYTE * buffWellPath, int bufLen, CString sourceFile, CString destFile);
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);
};