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

📄 nospamdlg.h

📁 maybe is knn or maybe not i m not sure about it it s a temp file
💻 H
字号:
// NoSpamDlg.h : header file
//

#if !defined(AFX_NOSPAMDLG_H__B9BCCB2D_5B7D_43AE_983F_E698B7D26AE9__INCLUDED_)
#define AFX_NOSPAMDLG_H__B9BCCB2D_5B7D_43AE_983F_E698B7D26AE9__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "accountinfo.h"
#include "systemtray.h"

/////////////////////////////////////////////////////////////////////////////
// CNoSpamDlg dialog

class CNoSpamDlg : public CDialog
{
// Construction
public:
	static BOOL PatternMatch(LPCTSTR text, LPCTSTR pattern);
    static int DWord2Year(DWORD dw) { return (dw & 0xffff0000) >> 16; }
    static int DWord2Month(DWORD dw) { return (dw & 0x0000ff00) >> 8; }
    static int DWord2Day(DWORD dw) { return dw & 0x000000ff; }
	void SaveRules();
	BOOL DlgEditRule(const int idx);
	BOOL DlgAddRule(LPCTSTR email, LPCTSTR name, LPCTSTR subject);
	BOOL IsDupRule(const BYTE ruleType, LPCTSTR pattern);
	BOOL AddUniqueRule(const BYTE ruleType, LPCTSTR pattern, DWORD ruleDate);
	int SortRule(int idx1, int idx2, int idxCol);
	int Sort(int idx1, int idx2, int idxCol);
	CNoSpamDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CNoSpamDlg)
	enum { IDD = IDD_NOSPAM_DIALOG };
	CListCtrl	m_mailList;
	BOOL	m_bUseTimer;
	int		m_minutes;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CNoSpamDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	static DWORD GetCurrentDate();
	static DWORD Date2DWord(int year, int month, int day);
    static BOOL IsTempEmailAddress(LPCTSTR email);
	BOOL IsSpam(LPCTSTR email, LPCTSTR name, LPCTSTR subject);
	void LoadRules();
	void GetRuleFileName(CString& fname);
	static void GetDomains(LPCTSTR addr, CStringArray& domains);
	static int SortAddr(LPCTSTR addr1, LPCTSTR addr2);

	CStringArray m_rulePatterns;
	CByteArray   m_ruleTypes;
    CDWordArray  m_ruleDate;

    CStringArray m_arrSubjects;
    CStringArray m_arrFromAddrs;
    CStringArray m_arrFromNames;

	CRect m_listMargin;
	HICON m_hIcon;

    CAccountInfo m_account;
    CSystemTray  m_trayIcon;
    UINT_PTR     m_nTimer;
    int          m_minuteCounter;

	// Generated message map functions
	//{{AFX_MSG(CNoSpamDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnCheck();
	afx_msg void OnAccount();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnItemclickMaillist(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnSetrule();
	afx_msg void OnRulelist();
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnPopupOpen();
	afx_msg void OnUseTimer();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnChangeMinutes();
	afx_msg void OnDblclkMaillist(NMHDR* pNMHDR, LRESULT* pResult);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

    static BOOL IsAddrChar(char ch);
	static void GetNameAddr(LPCTSTR cszNameAddr, CString& name, CString& addr);
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_NOSPAMDLG_H__B9BCCB2D_5B7D_43AE_983F_E698B7D26AE9__INCLUDED_)

⌨️ 快捷键说明

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