65 lines
1.2 KiB
C++
65 lines
1.2 KiB
C++
#include "stdafx.h"
|
|
#include "ThunderEditReactor.h"
|
|
#include "ThunderCmdGroup.h"
|
|
#include "LightningRodData.h"
|
|
#include "DrawThunder2D.h"
|
|
|
|
#include "LayPinDlg.h"
|
|
|
|
TelThunderEditReactor::TelThunderEditReactor(CThunderCmdGroup *pGroup)
|
|
{
|
|
m_pCmdGroup = pGroup;
|
|
}
|
|
|
|
TelThunderEditReactor::~TelThunderEditReactor()
|
|
{
|
|
|
|
}
|
|
|
|
void TelThunderEditReactor::SetThunderDbReactor(CThunderDbReactor *pReactor)
|
|
{
|
|
m_pThunderDbReactor = pReactor;
|
|
}
|
|
|
|
void TelThunderEditReactor::commandWillStart(const TCHAR* cmdStr)
|
|
{
|
|
CString sCmd = cmdStr;
|
|
if (sCmd.CompareNoCase(_T("EXPLODE")) == 0)
|
|
{
|
|
CThunderCmdGroup::bReDrawFold = FALSE;
|
|
}
|
|
else
|
|
CThunderCmdGroup::bReDrawFold = TRUE;
|
|
}
|
|
|
|
void TelThunderEditReactor::commandEnded(const TCHAR* cmdStr)
|
|
{
|
|
if (CThunderCmdGroup::bExecute &&
|
|
CThunderCmdGroup::bIsAllowDraw )
|
|
{
|
|
CThunderCmdGroup::bExecute = FALSE;
|
|
if (_tcsicmp(cmdStr,_T("GRIP_STRETCH")) == 0)
|
|
{
|
|
if (!CThunderCmdGroup::bReDraw)
|
|
{
|
|
return;
|
|
}
|
|
else
|
|
{
|
|
CThunderCmdGroup::bReDraw = FALSE;
|
|
}
|
|
}
|
|
|
|
if (m_pCmdGroup != NULL)
|
|
{
|
|
TTempDrawState temp(FALSE);
|
|
if (m_pCmdGroup != NULL)
|
|
{
|
|
m_pCmdGroup->ThunderDraw();
|
|
acedUpdateDisplay();
|
|
actrTransactionManager->flushGraphics();
|
|
}
|
|
}
|
|
}
|
|
}
|