//-----------------------------------------------------------------------------+ // 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); } }