⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 operationlogfile.h

📁 实时监控
💻 H
字号:
// OperationLogFile.h : header file
//


#ifndef __OPERATIONLOGFILE_H__
#define __OPERATIONLOGFILE_H__

#include "msflexgrid.h"
#include "../utils/TransCK.h"

/////////////////////////////////////////////////////////////////////////////
// COperationLogFile dialog
template <class T>
class showoperation
{
public:
	int openfile(char* m_path,char* m_param,T m_tem[],int length);
};

template <class T>
int showoperation<T>::openfile(char* m_path,char* m_param,T m_tem[],int m_length)
{
	
  for(int m=0;m<m_length;m++)
       m_tem[m].clear();

    FILE *m_file;
    m_file=fopen(m_path,m_param);
	if(m_file==NULL)
	{
		AfxMessageBox(IDS_OPEN_FILE);
		return 0;
	}

	for(int i=0; ;i++)
	{
		if(fread(&m_tem[i],sizeof(T),1,m_file)!=1)
		{
			fclose(m_file);
			return i;
		}
	}
	fclose(m_file);

}



class COperationLogFile : public CPropertyPage
{
	DECLARE_DYNCREATE(COperationLogFile)

// Construction
public:
	COperationLogFile();
	~COperationLogFile();
	int test_log_file(log_file &m_log_file, int year, int month, int day);
	FILE * m_log_real_file;
	 
// Dialog Data
	//{{AFX_DATA(COperationLogFile)

	CTransCK	m_timebtn;
	CTransCK	m_timestartbtn;
	CTransButton	m_showlogbtn;
	CLabel	m_lable3;
	CLabel	m_lable2;
	CLabel	m_lable1;
	CTransGroup m_grp1;
	CTransGroup m_grp2;
	CBrush      m_brush;
	CComboBox   m_log_list;
    CTime	    m_time1;
	CTime	    m_time2;
	int         m_length;
	CMSFlexGrid	m_dbgrid;
	BOOL m_starttimebool,m_timebool;

	CString m_list;
	enum { IDD = IDD_PROPPAGE8 };
		// NOTE - ClassWizard will add data members here.
		//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_DATA
    

// Overrides
	// ClassWizard generate virtual function overrides
	//{{AFX_VIRTUAL(COperationLogFile)
	protected:

	afx_msg void OnSetfocuslog();
	afx_msg void OnSelchangelog();
	afx_msg void Onshowlog();
	virtual BOOL OnInitDialog();
	virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
	//virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	// Generated message map functions
	//{{AFX_MSG(COperationLogFile)
		// NOTE: the ClassWizard will add member functions here
	afx_msg void Ontime();
	afx_msg void Onstarttime();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

};


/////////////////////////////////////////////////////////////////////////////
// CAlarmLogFile dialog

class CAlarmLogFile : public CPropertyPage
{
	DECLARE_DYNCREATE(CAlarmLogFile)

// Construction
public:
	void OnProperties();
	CAlarmLogFile();
	~CAlarmLogFile();
    int check_query_alarm(log_alarmfile & m_log_alarm);
	FILE * m_alarm_file_p;
	CString checkchannel(int m_nub);
// Dialog Data
	//{{AFX_DATA(CAlarmLogFile)
	enum { IDD = IDD_PROPPAGE9 };

	CTransCK m_btn1;
    CTransCK m_btn2;
    CTransCK m_btn3;
	CTransCK m_btn4;
	CTransButton m_showlogbtn;
    CLabel	m_lable4;
	CLabel	m_lable3;
	CLabel	m_lable2;
	CLabel	m_lable1;
	CTransGroup m_grp1;
	CTransGroup m_grp2;
	CBrush      m_brush;
	CComboBox   m_ip_listctl;
	CComboBox   m_alarm_listctl;
	CComboBox   m_log_list;
    CTime	    m_time1;
	int         m_length;
	CMSFlexGrid	m_dbgrid;
	//bool m_starttimebool,m_timebool;
	CString m_list;
	CString m_ip_list;
	CString   m_alarm_list;
	BOOL m_timebool1,m_timebool2,m_timebool3,m_timebool4;
	// NOTE - ClassWizard will add data members here.
	//    DO NOT EDIT what you see in these blocks of generated code !
	//}}AFX_DATA


// Overrides
	// ClassWizard generate virtual function overrides
	//{{AFX_VIRTUAL(CAlarmLogFile)
	protected:
	virtual BOOL OnInitDialog();
	afx_msg void Onshowlog();

	afx_msg void OnSetfocuslog();
	afx_msg void OnSelchangelog();
	afx_msg void OnSetfocusalarm();
	afx_msg void OnSelchangealarm();
	afx_msg void OnSetfocusip();
	afx_msg void OnSelchangeip();
    afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	// Generated message map functions
	//{{AFX_MSG(CAlarmLogFile)
		// NOTE: the ClassWizard will add member functions here
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

};



#endif // __OPERATIONLOGFILE_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -