123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- #if !defined _SCRIPTOBJECT_H_
- #define _SCRIPTOBJECT_H_
- #include "computer.h"
- // 定义一个脚本存储结构体
- class ScriptParam: public CObject
- {
- public:
- CRealComputer m_calc; // 用来计算脚本条件的计算器
- BOOL m_bValid; // 是否投入运行
- BOOL m_bCircle; // 是否循环运行
- BOOL m_bCondition; // 是否条件运行
- int m_curcleTime; // 循环时间
- CString m_strExpression; // 条件表达式
- CString m_strScript; // 脚本
- SYSTEMTIME m_stLastRunTime; //上次运行时间
- public:
- BOOL ShouldRun(); // 是否应该运行
- ScriptParam();
- };
- typedef CTypedPtrList<CObList, ScriptParam*> ScriptParamList;
- // 脚本执行类
- class CScriptObject : public CCmdTarget
- {
- DECLARE_DYNCREATE(CScriptObject)
- CScriptObject();
- // Attributes
- public:
- // Operations
- public:
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CScriptObject)
- public:
- virtual void OnFinalRelease();
- //}}AFX_VIRTUAL
- // Implementation
- public:
- virtual ~CScriptObject();
- // Generated message map functions
- //{{AFX_MSG(CScriptObject)
- // NOTE - the ClassWizard will add and remove member functions here.
- //}}AFX_MSG
- protected:
- DECLARE_MESSAGE_MAP()
- // Generated OLE dispatch map functions
- //{{AFX_DISPATCH(CScriptObject)
- afx_msg double GetYCValue(LPCTSTR varName);
- afx_msg void SetYCValue(LPCTSTR varName, double value);
- afx_msg short GetYXValue(LPCTSTR varName);
- afx_msg void SetYXValue(LPCTSTR varName, short value);
- afx_msg double ShowResult(LPCTSTR prompt);
- afx_msg void Sleeps(short mSeconds);
- //}}AFX_DISPATCH
- DECLARE_DISPATCH_MAP()
- DECLARE_INTERFACE_MAP()
- };
- /////////////////////////////////////////////////////////////////////////////
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
- #endif // _SCRIPTOBJECT_H_
|