|
|
|
|
#include "StdAfx.h"
|
|
|
|
|
#include "WorkCmdMarkArea.h"
|
|
|
|
|
#include "MarkCtrl.h"
|
|
|
|
|
#include "MarkAreaMgr.h"
|
|
|
|
|
#include "CStringFuc.h"
|
|
|
|
|
#include "GlobalFunction.h"
|
|
|
|
|
#include "ObjComponentMgr.h"
|
|
|
|
|
#include "ExceptionMsg.h"
|
|
|
|
|
#include "Mirror.h"
|
|
|
|
|
#include "WorkTime.h"
|
|
|
|
|
#include "CommonFlowMgr.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CWorkCmdMarkArea::CWorkCmdMarkArea(CMarkArea &m)
|
|
|
|
|
:m_MarkArea(m)
|
|
|
|
|
{
|
|
|
|
|
m_bSelMark = false;//<2F>Ƿ<EFBFBD>Ϊѡ<CEAA><D1A1><EFBFBD>ӹ<EFBFBD>
|
|
|
|
|
}
|
|
|
|
|
CWorkCmdMarkArea::~CWorkCmdMarkArea(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
bool CWorkCmdMarkArea::Excute()
|
|
|
|
|
{
|
|
|
|
|
if(!gLogMgr->IsDebuging())
|
|
|
|
|
{
|
|
|
|
|
//<2F><>ȡ<EFBFBD><C8A1>ǰϵͳʱ<CDB3><CAB1>
|
|
|
|
|
CTime StartTime,CurTime;
|
|
|
|
|
CTimeSpan TimeSpan;//ʱ<><CAB1><EFBFBD><EFBFBD>
|
|
|
|
|
StartTime=CTime::GetCurrentTime();
|
|
|
|
|
CMarkCtrl MarkCtrl;
|
|
|
|
|
|
|
|
|
|
vector<vector<Dbxy>> &DataVec = m_MarkArea.GetDataVec();//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
vector<vector<Dbxy>> &SpecialDataVec = m_MarkArea.GetSpecialDataVec();//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
int AreaCycleCnt = gCommonFlowMgr->GetAreaCycleCnt();//һ<><D2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѭ<EFBFBD><D1AD><EFBFBD>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
CWorkTime WorkTime;
|
|
|
|
|
WorkTime.StartExactTime();
|
|
|
|
|
|
|
|
|
|
MarkCtrl.StartMarkPci(DataVec,SpecialDataVec,AreaCycleCnt);
|
|
|
|
|
CurTime=CTime::GetCurrentTime();
|
|
|
|
|
TimeSpan = CurTime - StartTime;
|
|
|
|
|
CString Time = Time2Str(TimeSpan.GetHours())+":"+Time2Str(TimeSpan.GetMinutes())+":"+Time2Str(TimeSpan.GetSeconds());
|
|
|
|
|
gLogMgr->WriteDebugLog(Time);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
int ExactSpanTime = WorkTime.GetExactTime();
|
|
|
|
|
CString LogStr;
|
|
|
|
|
LogStr.Format(_T("[ExactSpanTime] = [%d]"),ExactSpanTime);
|
|
|
|
|
gLogMgr->WriteDebugLog(LogStr);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD>Ƶ<EFBFBD>ǰ<EFBFBD>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD>-----------------------------------------------
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>area <20><>ѡ<EFBFBD><D1A1>״̬
|
|
|
|
|
gMarkAreaMgr->ResetAllAreaSelState();
|
|
|
|
|
//m_MarkArea.SetSelState(true);//ѡ<><D1A1><EFBFBD><EFBFBD>ǰ<EFBFBD>ӹ<EFBFBD><D3B9><EFBFBD>area
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD>markarea <20>ڵ<EFBFBD>obj Ϊ<>Ѽӹ<D1BC>״̬
|
|
|
|
|
// gObjComponentMgr->SetMarkedStateRect(m_MarkArea.GetRect(), m_bSelMark);
|
|
|
|
|
// gObjComponentMgr->SetMarkedStateRect(m_MarkArea.GetRect(),true);
|
|
|
|
|
//<2F><><EFBFBD>ܻ<EFBFBD><DCBB><EFBFBD><EFBFBD>𱨴<EFBFBD>?
|
|
|
|
|
//m_pView->MoveViewCenter();
|
|
|
|
|
//m_pView->RefreshView();
|
|
|
|
|
}
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD>ӹ<EFBFBD><D3B9><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
void CWorkCmdMarkArea::CreatWorkDataByTimes(int times)
|
|
|
|
|
{
|
|
|
|
|
if(times>1)
|
|
|
|
|
{
|
|
|
|
|
vector<vector<Dbxy>> &DataVec = m_MarkArea.GetDataVec();//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
vector<vector<Dbxy>>::iterator iter = DataVec.begin();
|
|
|
|
|
vector<vector<Dbxy>>::iterator iter_end = DataVec.end();
|
|
|
|
|
for(;iter!=iter_end;iter++)
|
|
|
|
|
{
|
|
|
|
|
vector<Dbxy> VecTmp = *iter;
|
|
|
|
|
for(int i=1;i<times;i++)
|
|
|
|
|
{
|
|
|
|
|
vector<Dbxy>::iterator iter1 = VecTmp.begin();
|
|
|
|
|
vector<Dbxy>::iterator iter1_end = VecTmp.end();
|
|
|
|
|
for(;iter1!=iter1_end;iter1++)
|
|
|
|
|
{
|
|
|
|
|
(*iter).push_back(*iter1);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
void CWorkCmdMarkArea::WirteLog()
|
|
|
|
|
{
|
|
|
|
|
CString str1 = "[WorkCmd][MarkArea]";
|
|
|
|
|
gLogMgr->WriteDebugLog(str1);
|
|
|
|
|
}
|