12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- #pragma once
- #include "afxcmn.h"
- #include "MyExcel.h"
- // CDlg_ZuTaiAdd 对话框
- class CDlg_ZuTaiAdd : public CDialog
- {
- DECLARE_DYNAMIC(CDlg_ZuTaiAdd)
- public:
- CDlg_ZuTaiAdd(CWnd* pParent = NULL); // 标准构造函数
- virtual ~CDlg_ZuTaiAdd();
- // 对话框数据
- enum { IDD = IDD_DLG_ZUTAI_ADD };
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
- DECLARE_MESSAGE_MAP()
- public:
- virtual BOOL OnInitDialog();
- afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
- afx_msg BOOL OnEraseBkgnd(CDC* pDC);
- int m_nDevAddr;
- int m_nCommPort;
- int m_nEdit_DevNumber;
- DWORD m_nNetIP;
- int m_nNetPort;
- afx_msg void OnBnClickedBtnTest();
- afx_msg void OnBnClickedBtnCreate();
- afx_msg void OnBnClickedBtnQuit();
- CTreeCtrl m_ctrlDevFolder;
- CImageList m_imagelistTree;
- void MyExpandTree(HTREEITEM hTreeItem);
- CString m_sMainType;//主类
- CString m_sSlaveType;//次类
- CString m_sDevBrand;//设备品牌
- CString m_sDevVersion;//设备型号
- int m_nChooseItem;//选择的序号 在g_DVP中
- int GetCommunicationTreaty( CString sData );
- int GetBaudRateIndex( CString sBaudRate );
- int GetCommDataBitIndex( CString sDataBit );
- bool OpenDevExcel();//打开设备文件
- bool OpenVarExcel( CString sPath );//打开变量文件
- void ListDeviceTypes(HTREEITEM hItemParent = TVI_ROOT);
- afx_msg void OnTvnSelchangedTreeDeviceFolder(NMHDR *pNMHDR, LRESULT *pResult);
- int SelChangedTreeDeviceFolder(HTREEITEM hItemSelect);
- int AddVarToDB( );
- int AddDeviceToDB( CString sDevName,CString sDevUid,int nCommPort,int nDevAddr,DWORD nNetIP,int nNetPort );
- void GetDevIDFromUID( CString sDevUid,int &nDevDriveID, int &nDevFactoryID, int &nDevTypeID );
- void ChangeVarInfo( CString sDevUid,int nDevIndex );
- void ChangeVarToPic( CString &sVarName );
- bool ChangePicRelevanceVar( CString sPicPath,CString sPicName );
- bool m_bIsJubgeHaveBit;//是否已经判断过有没有BIT位信息
- bool m_bHaveBit;//是否有位信息
- bool m_bChangeVarToPic;//判断是否更改画面文件变量成功
- bool m_bIsExistExcel;
- CMyExcel m_ExcelMain;
- afx_msg void OnClose();
- bool m_bReadResourceFinish;//判断是否已经加载资源
- void ReadResource();
- CString m_sFilePath;
- bool m_bIsUserZuTai;//是否用了组态,用于记录
- };
|