|
|
|
|
#pragma once
|
|
|
|
|
#include "MarkArea.h"
|
|
|
|
|
#include "Module.h"
|
|
|
|
|
#include "EnumDirection.h"
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
class CMarkAreaMgr :public CModule
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
CMarkAreaMgr(void);
|
|
|
|
|
~CMarkAreaMgr(void);
|
|
|
|
|
virtual void OnAppInitialize();
|
|
|
|
|
virtual void Draw(CDC* pDC);//<2F><>pDC <20><><EFBFBD><EFBFBD>һЩ<D2BB><D0A9><EFBFBD><EFBFBD>
|
|
|
|
|
virtual MODULE GetModuleType(){return _MARK_AREA_PROP;};
|
|
|
|
|
virtual void WriteWorkFileExt(vector<CLab> &LabVec);
|
|
|
|
|
virtual void ReadWorkFile(CLabVecRang &LabVecRang);
|
|
|
|
|
|
|
|
|
|
void Add();
|
|
|
|
|
void AddArea(CMarkArea &Area){m_AreaVec.push_back(Area);};
|
|
|
|
|
void InsertList(CListCtrl &List);
|
|
|
|
|
void DelSel(int &idx);
|
|
|
|
|
void DelAll();
|
|
|
|
|
void OpArea(int idx,CMarkArea &Area,bool bRead);
|
|
|
|
|
void Order(int &idx,bool bMoveUp);
|
|
|
|
|
void SetCurSelIdx(int idx){m_CurSelIdx = idx;};
|
|
|
|
|
int GetCurSelIdx();
|
|
|
|
|
bool GetbDraw(){return m_bDraw;};
|
|
|
|
|
void SetbDraw(bool b){m_bDraw = b;};
|
|
|
|
|
void SaveOrLoad(bool bSave,bool bFixed = false);
|
|
|
|
|
void SaveOrLoadExt(CArchive &ar);
|
|
|
|
|
bool Empty(){return m_AreaVec.empty();};
|
|
|
|
|
int GetHasWorkDataAreaCnt();
|
|
|
|
|
vector<CMarkArea> &GetAreaVec(){return m_AreaVec;}
|
|
|
|
|
void ArrayCreat(int CntX,int CntY,double Offset);
|
|
|
|
|
void ResetAllAreaSelState();
|
|
|
|
|
void MoveAllArea(double Val,DIRECTION dir);
|
|
|
|
|
void SelAreaByPt(Dbxy pt);
|
|
|
|
|
void SetAllMarkSize();
|
|
|
|
|
void CollectWorkData(bool bNeedSe);
|
|
|
|
|
void SelFristArea();
|
|
|
|
|
void SetbDrawIdx(bool b){m_bDrawIdx = b;};
|
|
|
|
|
void AdjustByObj();
|
|
|
|
|
void ReReadFixMarkArea();
|
|
|
|
|
void Adjust();
|
|
|
|
|
void SendDataToCard(int CardIdx);
|
|
|
|
|
bool CheckTempIdx(int idx);
|
|
|
|
|
private:
|
|
|
|
|
bool IdxValid(int idx);
|
|
|
|
|
void SwapArea(int &idx1,int idx2);
|
|
|
|
|
void ConvertTempData(vector<vector<Dbxy>> &DataVec,vector<double> &TempDataVec);
|
|
|
|
|
void ConvertPosVec(vector<vector<Dbxy>> &DataVec,vector<Dbxy> &PosVec);
|
|
|
|
|
bool IsAllPtData(vector<vector<Dbxy>> &PtDataVec);
|
|
|
|
|
private:
|
|
|
|
|
vector<CMarkArea> m_AreaVec;
|
|
|
|
|
int m_CurSelIdx;//<2F><>ǰѡ<C7B0><D1A1><EFBFBD><EFBFBD>area <20><><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
bool m_bDraw;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
bool m_bDrawIdx;//<2F>Ƿ<EFBFBD><C7B7><EFBFBD>ʾarea <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
int m_CurTempCnt;//<2F><>ǰģ<C7B0><C4A3><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
extern CMarkAreaMgr *gMarkAreaMgr;
|