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.
25 lines
452 B
C++
25 lines
452 B
C++
#include "StdAfx.h"
|
|
#include "WorkCmd.h"
|
|
CWorkCmd::CWorkCmd(void)
|
|
{
|
|
m_FrontDelay = 0;//指令执行之前的延时(单位: 毫秒)
|
|
m_AfterDelay = 0;//指令执行之后的延时(单位: 毫秒)
|
|
m_bCancel = true;
|
|
}
|
|
CWorkCmd::~CWorkCmd(void)
|
|
{
|
|
}
|
|
bool CWorkCmd::Work(bool Cancel)
|
|
{
|
|
if(Cancel && m_bCancel)//指令被取消
|
|
return true;
|
|
|
|
Sleep(m_FrontDelay);
|
|
WirteLog();
|
|
bool ret = true;
|
|
|
|
Excute();
|
|
Sleep(m_AfterDelay);
|
|
|
|
return ret;
|
|
} |