a
This commit is contained in:
@@ -0,0 +1,87 @@
|
||||
// SptManager.h: interface for the CSptManager class.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(AFX_SPTMANAGER_H__465419B6_5C52_4297_BBD7_6B29E88A9B45__INCLUDED_)
|
||||
#define AFX_SPTMANAGER_H__465419B6_5C52_4297_BBD7_6B29E88A9B45__INCLUDED_
|
||||
|
||||
#include "HandleProcessor.h"
|
||||
#include "Script.h"
|
||||
#include "Script2D.h"
|
||||
#include "ScriptCE.h"
|
||||
#include "Script3D.h"
|
||||
#include "LinkList.h"
|
||||
#include "GUCodeCreator.h"
|
||||
|
||||
#include "opcreatesptdlg.h"
|
||||
#include "OpCreate3DSptDlg.h"
|
||||
|
||||
#include "Browse2DScriptDlg.h"
|
||||
|
||||
#if _MSC_VER > 1000
|
||||
#pragma once
|
||||
#endif // _MSC_VER > 1000
|
||||
class COpCreateCESptDlg;
|
||||
class CScriptCE;
|
||||
|
||||
class CSptManager
|
||||
{
|
||||
public:
|
||||
void Browse2DScript(DWORD dwScId);
|
||||
void Delete3DSConInDB(DWORD dwSConID);
|
||||
void InitialCESptList(CListCtrl &sptList); //初始化1D脚本列表(sptList---in:脚本列表)
|
||||
UINT LoadScriptFromDev(CString szSptFileName, CDevice* const pDev); //从设备加载脚本(szSptFileName)
|
||||
UINT PutScriptToDev(DWORD dwSCID, CDevice* const pDev); //将脚本下传至设备(dwSCID---in:脚本ID,pDev---in:设备)
|
||||
|
||||
BOOL InitialSptListForDev(CListCtrl &sptList, CString szDeSN); //为设备初始化脚本列表(sptList---in:脚本列表,szDeSN---in:设备序列号)
|
||||
|
||||
CScript* GetScript(DWORD dwHandle); //取脚本(dwHandle---in:句柄)
|
||||
void DeleteObjInMem(DWORD dwHandle); //在内存删除对象(dwHandle---in:句柄)
|
||||
|
||||
UINT CreateCESConInDB(DWORD& dwSConID); //在数据库建立1D脚本(dwSConID---in:脚本ID)
|
||||
void DeleteCESConInDB(DWORD dwSConID); //在数据库删除1D脚本(dwSConID---in:脚本ID)
|
||||
|
||||
UINT Create2DSConInDB(DWORD& dwSConID); //在数据库建立2D脚本(dwSConID---in:脚本ID)
|
||||
void Delete2DSConInDB(DWORD dwSConID); //在数据库删除2D脚本(dwSConID---in:脚本ID)
|
||||
|
||||
// UINT Create3DSConInDB(DWORD& dwSConID); //add by waston 在数据库新建脚本
|
||||
UINT Create3DSConInDB(DWORD *dwSConID); //add by waston 为满足脚本分割的需求,将参数改为数组
|
||||
|
||||
BOOL DeleteSConInDev(CString szSCCN, CDevice* const pDev); //在设备删除脚本(szSCCN---in:脚本编号,pDev---in:设备)
|
||||
|
||||
void Initial2DSptList(CListCtrl &sptList); //初始化2D脚本列表(sptList---in:脚本列表)
|
||||
void InitialSptList(CListCtrl &sptList); //初始化脚本列表(sptList---in:脚本列表)
|
||||
|
||||
void InitialCESptListForSyn(CListCtrl &sptList, CString szDeSN); //为同步初始化1D脚本列表(sptList---in:脚本列表,szDeSN---in:设备序列号)
|
||||
void Initial2DSptListForSyn(CListCtrl &sptList, CString szDeSN); //为同步初始化2D脚本列表(sptList---in:脚本列表,szDeSN---in:设备序列号)
|
||||
|
||||
bool Export3DSConInDB(DWORD dwSConID, CString strFilePath);
|
||||
bool Export2DSConInDB(DWORD dwSConID, CString strFilePath);
|
||||
|
||||
CSptManager(_ConnectionPtr& pConnection);
|
||||
virtual ~CSptManager();
|
||||
|
||||
CLinkList<CMedium*> m_medLinkList;
|
||||
protected:
|
||||
//保存脚本测点到数据库线程
|
||||
static UINT SaveTestPointToDBThread(LPVOID lPrama);
|
||||
private:
|
||||
void Browse2DScriptColorChange(CPtrArray *f_scr_array, CPtrArray *f_tar_array);
|
||||
void InitBrowse2DView(CBrowse2DScriptDlg* f_pBrowse,DWORD f_dwScid);
|
||||
UINT AddScriptInDev(CString szSCCN, CString szSCCName,CString szType, CDevice* const pDev); //向设备增加脚本(szSCCN---in:脚本编号,pDev---in:设备)
|
||||
void InitialMedLinkList(); //初始化装置列表
|
||||
void InitialCreateSConDlg(COpCreateSptDlg* const pOpCreateSptDlg); //初始化新建脚本对话框(pOpCreateSptDlg---in:新建脚本对话框)
|
||||
void InitialCreateCESConDlg(COpCreateCESptDlg* const pOpCreateCESptDlg);//初始化新建1D脚本对话框(pOpCreateCESptDlg---in:新建1D脚本对话框)
|
||||
void InitialCreate3DSConDlg(COpCreate3DSptDlg* const pOpCreate3DSptDlg);//add by waston初始化3d脚本对话框
|
||||
|
||||
CGUCodeCreator m_guCodeCreator;
|
||||
CLinkList<CScript*> m_sptLinkList;
|
||||
CHandleProcessor m_handleProcessor;
|
||||
// PtrList m_medLinkList;
|
||||
//_ConnectionPtr m_pConnection;
|
||||
COpCreateCESptDlg* m_pOpCreateCESptDlg;
|
||||
CScriptCE* m_pNewScript;
|
||||
CChannel* m_pChannel;
|
||||
};
|
||||
|
||||
#endif // !defined(AFX_SPTMANAGER_H__465419B6_5C52_4297_BBD7_6B29E88A9B45__INCLUDED_)
|
||||
Reference in New Issue
Block a user