|
|
|
|
#include "StdAfx.h"
|
|
|
|
|
#include "SimulateTrace.h"
|
|
|
|
|
#include "Propertie.h"
|
|
|
|
|
#include "PropertieMgr.h"
|
|
|
|
|
#include "GlobalFunction.h"
|
|
|
|
|
#include "MsgBox.h"
|
|
|
|
|
#include "AuthorityMgr.h"
|
|
|
|
|
|
|
|
|
|
CSimulateTrace *gSimulateTrace = new CSimulateTrace;
|
|
|
|
|
CSimulateTrace::CSimulateTrace(void)
|
|
|
|
|
{
|
|
|
|
|
m_bSimulate = false;//<2F>Ƿ<EFBFBD>ģ<EFBFBD><C4A3>
|
|
|
|
|
m_Delay = 10;//ģ<><C4A3><EFBFBD><EFBFBD>ʱ
|
|
|
|
|
}
|
|
|
|
|
CSimulateTrace::~CSimulateTrace(void)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
CMFCPropertyGridProperty *CSimulateTrace::CreatGridProperty()
|
|
|
|
|
{
|
|
|
|
|
CString PropertyName;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
CString Description;//<2F><><EFBFBD><EFBFBD>
|
|
|
|
|
CString Path = _T("Simulate");;//<2F>洢·<E6B4A2><C2B7>
|
|
|
|
|
CString Name;
|
|
|
|
|
//-------------------------------------------------------------------------------//
|
|
|
|
|
PropertyName = _T("<EFBFBD>켣ģ<EFBFBD><EFBFBD>");
|
|
|
|
|
CMFCPropertyGridProperty* pGroup = new CMFCPropertyGridProperty(PropertyName);
|
|
|
|
|
//-------------------------------------------------------------------------------//
|
|
|
|
|
if(gAuthorityMgr->CheckAuthority(_FACTORY))
|
|
|
|
|
{
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><D4B1><EFBFBD>ӳ<EFBFBD><D3B3>
|
|
|
|
|
Name = _T("m_Delay");//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
CPropertie *pPropertie = new CPropertie;
|
|
|
|
|
pPropertie->SetpVal((void*)&m_Delay);
|
|
|
|
|
pPropertie->SetType(_PROP_TYPE_INT);
|
|
|
|
|
pPropertie->SetpModule(this);
|
|
|
|
|
pPropertie->SetPath(Path);
|
|
|
|
|
pPropertie->SetName(Name);
|
|
|
|
|
pPropertie->WriteRead(true);//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
|
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ
|
|
|
|
|
PropertyName = _T("ģ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʱ");
|
|
|
|
|
Description = _T("<EFBFBD><EFBFBD>ʱԽ<EFBFBD>̣<EFBFBD>ģ<EFBFBD><EFBFBD><EFBFBD>ٶ<EFBFBD>Խ<EFBFBD><EFBFBD>(<28><>λ: <20><><EFBFBD><EFBFBD>)");
|
|
|
|
|
CMFCPropertyGridProperty* p1 = new CMFCPropertyGridProperty(PropertyName, (_variant_t)m_Delay, Description);
|
|
|
|
|
pGroup->AddSubItem(p1);
|
|
|
|
|
|
|
|
|
|
gDrawPropertieMgr.Insert(p1, pPropertie);
|
|
|
|
|
}
|
|
|
|
|
//-------------------------------------------------------------------------------//
|
|
|
|
|
return pGroup;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void CSimulateTrace::Delay()
|
|
|
|
|
{
|
|
|
|
|
if(m_bSimulate)
|
|
|
|
|
{
|
|
|
|
|
if(IsShiftKeyDown())//ͨ<><CDA8>shift <20><><EFBFBD><EFBFBD>ֹͣ
|
|
|
|
|
{
|
|
|
|
|
CMsgBox MsgBox;
|
|
|
|
|
if(MsgBox.ConfirmOkCancel("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>?"))
|
|
|
|
|
{
|
|
|
|
|
Switch(false);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
int times = m_Delay*100000;
|
|
|
|
|
for(int i=0;i<times;i++);
|
|
|
|
|
}
|
|
|
|
|
}
|