-
Notifications
You must be signed in to change notification settings - Fork 90
/
Copy pathTabSetting.h
162 lines (122 loc) · 3.55 KB
/
TabSetting.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
#if !defined(AFX_TABSETTING_H__CE615BEE_30C5_4E76_8A74_4A01DDD49CA2__INCLUDED_)
#define AFX_TABSETTING_H__CE615BEE_30C5_4E76_8A74_4A01DDD49CA2__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// TabSetting.h : header file
//
#include "TabBaseInfo.h"
#include "hyperlink.h"
#include "TabFile.h"
#include "TabDomain.h"
#include "TabRdp.h"
typedef struct tagStatusIcon
{
// win icon
HICON hIconO;
HICON hIconX;
// ctrl buttons
HICON hIconStatusDomainOk;
HICON hIconStatusDomainX;
HICON hIconStatusRdpOk;
HICON hIconStatusRdpX;
HICON hIconStatusFileOk;
HICON hIconStatusFileX;
// systray icon
HICON hIconTrayRunning;
HICON hIconTrayRun;
HICON hIconTrayStopped;
}STSTATUSICON, *LPSTSTATUSICON;
typedef struct tagStatusCache
{
BOOL bCoreFwStartCached;
BOOL bCoreFwStart;
BOOL bStartProtectCached;
TCHAR szProtectChecksum[ MAX_PATH ];
BOOL bCountInfoCached;
TCHAR szCountInfoChecksum[ MAX_PATH ];
}STSTATUSCACHE, *LPSTSTATUSCACHE;
/////////////////////////////////////////////////////////////////////////////
// CTabSetting dialog
class CTabSetting :
public CDialog,
public CTabBaseInfo
{
// Construction
public:
CTabSetting(CWnd* pParent = NULL); // standard constructor
virtual ~CTabSetting();
VOID StartFirewall();
VOID StopFirewall();
static unsigned __stdcall _threadDisplayCoreStatus( PVOID arglist );
VOID DisplayCoreStatusProc( BOOL bWarningIsapi, BOOL bFlashIcon = TRUE );
VOID DisplayCoreStatusSub( BOOL bFlashIcon );
VOID DisplayCtrlButtonsStatus();
VOID DisplayCoreCountInfo();
BOOL IsFwStart();
BOOL IsCoreRunning();
BOOL IsCoreStart();
LONGLONG GetCoreBlockCount( DWORD dwCountType );
UINT GetCoreCfgCount( DWORD dwCountType );
BOOL LoadConfig();
BOOL SaveConfig();
VOID FreeAllIconsResources();
CHyperLink m_LinkAboutMore;
CHyperLink m_CtlLinkFirewall;
CHyperLink m_CtlLinkFile;
CHyperLink m_CtlLinkFileSet;
CHyperLink m_CtlLinkDomain;
CHyperLink m_CtlLinkDomainSet;
CHyperLink m_CtlLinkRdp;
CHyperLink m_CtlLinkRdpSet;
STVWFIREWALLCONFIG m_stConfig;
STSTATUSCACHE m_stStatusCache;
TCHAR m_szAppName[ MAX_PATH ];
TCHAR m_szCaption[ MAX_PATH ];
TCHAR m_szString[ MAX_PATH ];
HWND m_hParentWind;
CXingBalloon * m_pxballoon;
STSTATUSICON m_stStatusIcon;
CDeThreadSleep m_cThSleepDisplayCoreStatus;
// Dialog Data
//{{AFX_DATA(CTabSetting)
enum { IDD = IDD_TAB_SETTING };
CStatic m_stcCtlLinkRdpSp;
CStatic m_stcCtlLinkFileSp;
CStatic m_stcCtlLinkDomainSp;
CStatic m_stcPFileBlockCount;
CStatic m_stcStatusFile;
CStatic m_stcStatusFileTxt;
CStatic m_stcPRdpBlockCount;
CStatic m_stcStatusRdpTxt;
CStatic m_stcStatusRdp;
CStatic m_stcPDomainBlockCount;
CStatic m_stcStatusDomainTxt;
CStatic m_stcStatusDomain;
CButton m_btnStop;
CButton m_btnStart;
CStatic m_stcFirewallStatus;
CStatic m_stcStatus;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CTabSetting)
public:
virtual BOOL PreTranslateMessage(MSG* pMsg);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CTabSetting)
virtual BOOL OnInitDialog();
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
virtual LRESULT OnCtrlButton( WPARAM wParam, LPARAM lParam );
afx_msg void OnTimer(UINT nIDEvent);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TABSETTING_H__CE615BEE_30C5_4E76_8A74_4A01DDD49CA2__INCLUDED_)