📄 mainfrm.h
字号:
// MainFrm.h : interface of the CMainFrame class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_MAINFRM_H__BE82FE12_D9D8_4C7E_8CF3_33CF6AF3C043__INCLUDED_)
#define AFX_MAINFRM_H__BE82FE12_D9D8_4C7E_8CF3_33CF6AF3C043__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include<afxinet.h>
#include <wchar.h>
#include "log.h"
#define WM_ICONNOTIFY WM_USER + 909 //图标响应消息(lParam)
#define ID_TASKBARICON 100 //参数(wParam)
#define MYWM_NOTIFYICON WM_USER+1
#define WM_STATUSMSG (WM_USER + 2)
//#include "AccountInputView.h"
class CMainFrame : public CFrameWnd
{
protected: // create from serialization only
CMainFrame();
DECLARE_DYNCREATE(CMainFrame)
// Attributes
public:
//数据库信息
CString m_DataSource ;
CString m_Initial_Catalog;
CString m_UserID ;
CString m_Password;
CString szStatusInfo;
//保存当前目录
CString szConfig;//配置文件
TCHAR szFileName[512];
CString strLocalDir;//当前目录
//数据库连接对象
_ConnectionPtr m_pConnection;
_RecordsetPtr m_pRecordset;
_RecordsetPtr m_pRecordsetDel;
//读取文件对象
CStdioFile mFile;
CFileException mExcept;
//用户自定义文件设置
CString m_FileName,m_LocalDir, m_strFTPDir,m_strExportFile;
BOOL bReadHeader,bFileSource,bAutoRun;
TCHAR szFilename[80];
TCHAR szDir[512];
//是否连接
BOOL bConnected;
TCHAR path_search[_MAX_PATH];
//FTP信息
CString strFtpServer,strFtpUser,strFtpPass,strFtpPort;
CInternetSession * m_pInetSession; //会话对象
CFtpConnection * m_pFtpConnection; //连接对象
//工具栏
CToolBar m_ToolBar;
CImageList m_ImageList;
CBitmap bitmap;
CImageList imageList;
//
BOOL bFileFind;
CString strText;
CString strTemp;
BOOL bFTPFileFind;
CString m_strFtpPath;//FTP路径
//日志变量
CLog m_log;
CString strLogText;
int m_nTimes;
int m_nSize;
CString m_strBeginTime,m_strEndTime;
// Operations
public:
void CMainFrame::OnLocalSearch() ;
//void CMainFrame::OnTimer(UINT nIDEvent);
void CMainFrame::RunProgram();
void CMainFrame::SelectFTPFile();
void CMainFrame::SetDoc(CString sInfo);
void CMainFrame::ReSetData();
BOOL CMainFrame::BrowseDir(CString strDir,CString strTarget,CFileFind* pFinder);
BOOL CMainFrame::DownFile();
void CMainFrame::OnButtonSearch() ;
CString CMainFrame::DataOperate(CString strData );
void CMainFrame::OnWriterow(CString strRowData) ;
BOOL CMainFrame::OnRead() ;
BOOL CMainFrame::ReadCSV();
void CMainFrame::Search_Directory( TCHAR * szFilename);
BOOL CMainFrame::AutoRun( );
BOOL CMainFrame::CloseAutoRun( );
BOOL CMainFrame::OnConnectFTP();
BOOL CMainFrame::ReadPoint();
BOOL CMainFrame::UpLoadFile();
void CMainFrame::AutoExport() ;
//void CMainFrame:: OnBtnMinimize() ;LRESULT CMainFrame::OnNotifyIcon(WPARAM wParam, LPARAM lParam);
//BOOL CMainFrame::ReadXls();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMainFrame)
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CMainFrame();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected: // control bar embedded members
CStatusBar m_wndStatusBar;
CToolBar m_wndToolBar;
NOTIFYICONDATA m_tnid;
//CAccountInputView * m_pAccountView;
// Generated message map functions
protected:
//{{AFX_MSG(CMainFrame)
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnSettingsql();
afx_msg void OnFtpsetting();
afx_msg void OnSetfile();
afx_msg void OnConnectSql();
afx_msg void OnCloseSql();
afx_msg void OnUpdateConnectSql(CCmdUI* pCmdUI);
afx_msg void OnUpdateCloseSql(CCmdUI* pCmdUI);
afx_msg void OnUpdateReadfile(CCmdUI* pCmdUI);
afx_msg void OnReadfile();
afx_msg void OnTimer(UINT nIDEvent);
afx_msg void OnExport();
afx_msg void OnUpdateExport(CCmdUI* pCmdUI);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
LRESULT CMainFrame::OnSTATUSMSG( WPARAM pInfo,LPARAM pNun );
};
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MAINFRM_H__BE82FE12_D9D8_4C7E_8CF3_33CF6AF3C043__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -