Files
envi-code/SourceCode/Code2026/AdsXRx/XPushUndo.cpp
T
gjm 164968b62e chore
把非utf8-bom编码的cpp/h文件改为 utf8 bom 编码, msvc识别utf8编码时,如果不是bom格式的,会使用当前cp_oem来解码.
2026-10-04 00:04:20 +08:00

64 lines
1.7 KiB
C++

//-----------------------------------------------------------------------------+
// Copyright (C), 1998-2007, SH Software Co. Ltd.
// = FileName : XPushUndo.cpp
// = Version : ver2.0
// = Author : zjq
// = CreateDate : 2002-09-09
// = Description: 类的定义
// = Maintainers:
//
//-----------------------------------------------------------------------------+
#include "StdAfx.h"
#include "XPushUndo.h"
#include "XGlobalFunc.h"
XPushUndo::XPushUndo()
{
xg_getvar(_T("UNDOCTL"), &m_nUndoCtl);
if (m_nUndoCtl & 0x02) // Undo单步执行
{
SHads_command(RTSTR, _T("undo"), RTSTR, _T("control"), RTSTR, _T("all"), RTSTR, _T("undo"), RTSTR, _T("auto"), RTSTR, _T("off"), RTNONE);
}
if (!(m_nUndoCtl & 0x01)) // Undo不可用
{
SHads_command(RTSTR, _T("undo"), RTSTR, _T("all"), RTSTR, _T("undo"), RTSTR, _T("auto"), RTSTR, _T("off"), RTNONE);
}
if (!(m_nUndoCtl & 0x08))
{
SHads_command(RTSTR, _T("undo"), RTSTR, _T("BE"), RTNONE);
}
if (m_nUndoCtl & 0x04)
{
SHads_command(RTSTR, _T("undo"), RTSTR, _T("auto"), RTSTR, _T("off"), RTNONE);
}
}
XPushUndo::~XPushUndo()
{
//modify by zjq on 091106 解决2009平台显示无效关键字的问题
SHads_command(RTSTR,_T("redraw"),RTNONE);
if (!(m_nUndoCtl & 0x01))
{
SHads_command(RTSTR, _T("undo"), RTSTR, _T("control"), RTSTR, _T("none"), RTNONE);
}
if (m_nUndoCtl & 0x02)
{
SHads_command(RTSTR, _T("undo"), RTSTR, _T("control"), RTSTR, _T("one"), RTNONE);
}
if (!(m_nUndoCtl & 0x08)) // 无活动编组
{
SHads_command(RTSTR, _T("undo"), RTSTR, _T("E"), RTNONE);
}
if (m_nUndoCtl & 0x04)
{
SHads_command(RTSTR, _T("undo"), RTSTR, _T("auto"), RTSTR, _T("on"), RTNONE);
}
}