-
Notifications
You must be signed in to change notification settings - Fork 0
/
CPPStatistics.h
78 lines (66 loc) · 3.46 KB
/
CPPStatistics.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
#pragma once
#include "CStatVisualWnd.h"
#include "XHTMLStatic.h"
#include "CKamacDS.h"
// CPPStatistics 对话框
class CPPStatistics : public CPropertyPage
{
DECLARE_DYNAMIC(CPPStatistics)
public:
CPPStatistics(CKamacOptions& ko);
virtual ~CPPStatistics();
// 对话框数据
#ifdef AFX_DESIGN_TIME
enum { IDD = IDD_CPPSTATISTICS };
#endif
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
DECLARE_MESSAGE_MAP()
protected:
CKamacOptions& koOPtions;
CStatVisualWnd svStatVisual;
CXHTMLStatic htmlInfo;
CString strHtml, strViewChart, strError, strNavigation;
CString strHisFileName;
CKamacDS_Man dsMan;
bool bGraphShowed{ false };
const TCHAR* htmlStr = {
_T(" It's been <font color=\"#aa00ff\">%d</font> day(s) since you first ran Kamac on <a href=\"app:CMD_NAVI_OLDEST\"><font color=\"#aa00ff\"><u>%s</u></font></a>, ")
_T("including <font color=\"#aa00ff\">%d</font> day(s) of records! ")
_T("The most keystroke is on <a href=\"app:CMD_NAVI_TOP_KBD\"><font color=\"%s\"><u>%s</u></font></a>, <font color=\"%s\">%d</font> keystrokes; ")
_T("the most mouse clicking is on <a href=\"app:CMD_NAVI_TOP_MCC\"><font color=\"%s\"><u>%s</u></font></a>, <font color=\"%s\">%d</font> mouse clicks; ")
_T("the most activity is on <a href=\"app:CMD_NAVI_TOP_ACT\"><font color=\"#aa00ff\"><u>%s</u></font></a>, <font color=\"#aa00ff\">%d</font> keyboard and mouse activities; ")
_T("the longest moving is on <a href=\"app:CMD_NAVI_TOP_DIS\"><font color=\"%s\"><u>%s</u></font></a>, <font color=\"%s\">%dm</font>.<br>")
};
const TCHAR* htmlShowGraph = _T("<a href=\"app:CMD_VIEW_CHART\"><b><font color=\"blue\"><u>Show chart</u></font></b></a>");
const TCHAR* htmlNavigation = {
_T(" <a href=\"app:CMD_NAVI_OLDEST\"><font color=\"blue\"> ∣← </font></a> ")
_T(" <a href=\"app:CMD_NAVI_PREV\"><font color=\"blue\"> ← </font></a> ")
_T(" <a href=\"app:CMD_NAVI_TOP_KBD\"><font color=\"%s\"> ↑ </font></a> ")
_T(" <a href=\"app:CMD_NAVI_TOP_MCC\"><font color=\"%s\"> ↑ </font></a> ")
_T(" <a href=\"app:CMD_NAVI_TOP_DIS\"><font color=\"%s\"> ↑ </font></a> ")
_T(" <a href=\"app:CMD_NAVI_NEXT\"><font color=\"blue\"> → </font></a> ")
_T(" <a href=\"app:CMD_NAVI_NEWEST\"><font color=\"blue\"> →∣ </font></a> ")
};
const TCHAR* htmlError = _T("<center><font color=\"red\" size=\"+6\">Error: %s!</font></center>");
void MakeInfoString(CKamacDS_Man & dsMan, BOOL bChartShowed);
BOOL LoadHistory(void);
public:
void SetHisFileName(LPCTSTR hisfn) { strHisFileName = hisfn; }
virtual BOOL OnInitDialog();
void DayPassed(void);
protected:
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg LRESULT OnUserShowGraph(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnColorChanged(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnUserNaviPrev(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnUserNaviNext(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnUserNaviNewest(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnUserNaviOldest(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnUserNaviTopKBD(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnUserNaviTopMCC(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnUserNaviTopDIS(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnUserNaviTopACT(WPARAM wParam, LPARAM lParam);
virtual BOOL OnSetActive();
virtual BOOL OnKillActive();
};