forked from hiyohiyo/CrystalDiskInfo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GraphDlg.h
228 lines (196 loc) · 6.66 KB
/
GraphDlg.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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
/*---------------------------------------------------------------------------*/
// Author : hiyohiyo
// Mail : [email protected]
// Web : https://crystalmark.info/
// License : The MIT License
/*---------------------------------------------------------------------------*/
#pragma once
#include "AtaSmart.h"
#include "OptionDlg.h"
// Task Tray
enum
{
MY_UPDATE_BG_IMAGE = (WM_APP + 0x1100),
MY_UPDATE_LINE_COLOR,
};
class CGraphDlg : public CDHtmlMainDialog
{
DECLARE_DYNCREATE(CGraphDlg)
static const int SIZE_X = 640;
static const int SIZE_Y = 480;
public:
CGraphDlg(CWnd* pParent = NULL, int defaultDisk = -1);
virtual ~CGraphDlg();
CString m_SmartDir;
BOOL m_bSmartEnglish;
int m_SizeX;
int m_SizeY;
BOOL m_bGraph[CAtaSmart::MAX_DISK];
COLORREF m_LineColor[CAtaSmart::MAX_DISK + 1];
COLORREF m_DefaultLineColor[CAtaSmart::MAX_DISK + 1];
CString m_LiDisk[CAtaSmart::MAX_DISK];
DWORD m_AttributeId;
int m_DefaultDisk[CAtaSmart::MAX_DISK];
int m_DetectedDisk;
DWORD m_IeVersion;
CString m_Model[CAtaSmart::MAX_DISK];
CString m_ModelEscape[CAtaSmart::MAX_DISK];
CString m_Serial[CAtaSmart::MAX_DISK];
CString m_Drive[CAtaSmart::MAX_DISK];
COptionDlg* m_OptionDlg;
CString m_Title;
CString m_SelectAttributeId;
long m_SelectAttributeIdCtrl;
CString m_LegendPositon;
CString m_TimeFormat;
enum { IDD = IDD_GRAPH, IDH = IDR_HTML_DUMMY };
protected:
HICON m_hIcon;
HICON m_hIconMini;
time_t GetTimeT(CString time);
TIME_ZONE_INFORMATION m_TimeZoneInformation;
virtual void DoDataExchange(CDataExchange* pDX);
virtual BOOL OnInitDialog();
virtual void InitDialogComplete();
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
void UpdateDialogSize();
HRESULT OnAllOn(IHTMLElement *pElement);
HRESULT OnAllOff(IHTMLElement *pElement);
HRESULT OnReset(IHTMLElement *pElement);
HRESULT OnDisk0(IHTMLElement *pElement);
HRESULT OnDisk1(IHTMLElement *pElement);
HRESULT OnDisk2(IHTMLElement *pElement);
HRESULT OnDisk3(IHTMLElement *pElement);
HRESULT OnDisk4(IHTMLElement *pElement);
HRESULT OnDisk5(IHTMLElement *pElement);
HRESULT OnDisk6(IHTMLElement *pElement);
HRESULT OnDisk7(IHTMLElement *pElement);
HRESULT OnDisk8(IHTMLElement *pElement);
HRESULT OnDisk9(IHTMLElement *pElement);
HRESULT OnDisk10(IHTMLElement *pElement);
HRESULT OnDisk11(IHTMLElement *pElement);
HRESULT OnDisk12(IHTMLElement *pElement);
HRESULT OnDisk13(IHTMLElement *pElement);
HRESULT OnDisk14(IHTMLElement *pElement);
HRESULT OnDisk15(IHTMLElement *pElement);
HRESULT OnDisk16(IHTMLElement *pElement);
HRESULT OnDisk17(IHTMLElement *pElement);
HRESULT OnDisk18(IHTMLElement *pElement);
HRESULT OnDisk19(IHTMLElement *pElement);
HRESULT OnDisk20(IHTMLElement *pElement);
HRESULT OnDisk21(IHTMLElement *pElement);
HRESULT OnDisk22(IHTMLElement *pElement);
HRESULT OnDisk23(IHTMLElement *pElement);
HRESULT OnDisk24(IHTMLElement *pElement);
HRESULT OnDisk25(IHTMLElement *pElement);
HRESULT OnDisk26(IHTMLElement *pElement);
HRESULT OnDisk27(IHTMLElement *pElement);
HRESULT OnDisk28(IHTMLElement *pElement);
HRESULT OnDisk29(IHTMLElement *pElement);
HRESULT OnDisk30(IHTMLElement *pElement);
HRESULT OnDisk31(IHTMLElement *pElement);
HRESULT OnDisk32(IHTMLElement *pElement);
HRESULT OnDisk33(IHTMLElement *pElement);
HRESULT OnDisk34(IHTMLElement *pElement);
HRESULT OnDisk35(IHTMLElement *pElement);
HRESULT OnDisk36(IHTMLElement *pElement);
HRESULT OnDisk37(IHTMLElement *pElement);
HRESULT OnDisk38(IHTMLElement *pElement);
HRESULT OnDisk39(IHTMLElement *pElement);
HRESULT OnDisk40(IHTMLElement *pElement);
HRESULT OnDisk41(IHTMLElement *pElement);
HRESULT OnDisk42(IHTMLElement *pElement);
HRESULT OnDisk43(IHTMLElement *pElement);
HRESULT OnDisk44(IHTMLElement *pElement);
HRESULT OnDisk45(IHTMLElement *pElement);
HRESULT OnDisk46(IHTMLElement *pElement);
HRESULT OnDisk47(IHTMLElement *pElement);
HRESULT OnDisk48(IHTMLElement *pElement);
HRESULT OnDisk49(IHTMLElement *pElement);
HRESULT OnDisk50(IHTMLElement *pElement);
HRESULT OnDisk51(IHTMLElement *pElement);
HRESULT OnDisk52(IHTMLElement *pElement);
HRESULT OnDisk53(IHTMLElement *pElement);
HRESULT OnDisk54(IHTMLElement *pElement);
HRESULT OnDisk55(IHTMLElement *pElement);
HRESULT OnDisk56(IHTMLElement *pElement);
HRESULT OnDisk57(IHTMLElement *pElement);
HRESULT OnDisk58(IHTMLElement *pElement);
HRESULT OnDisk59(IHTMLElement *pElement);
HRESULT OnDisk60(IHTMLElement *pElement);
HRESULT OnDisk61(IHTMLElement *pElement);
HRESULT OnDisk62(IHTMLElement *pElement);
HRESULT OnDisk63(IHTMLElement *pElement);
HRESULT OnSelectAttributeId(IHTMLElement *pElement);
void InitMenu();
void InitMenuBar();
BOOL UpdateGraph();
BOOL CheckDisk(DWORD disk);
void SetLegendPosition(DWORD id, CString position);
void SetTimeFormat(DWORD id, CString format);
void SetPlotPoint(DWORD id, DWORD point);
void SetAttribute(DWORD id, DWORD type);
void InitVars(int defaultDisk);
void UpdateColor();
void UpdateBkImage();
CString GetModelSerial(CString &model, CString &serialNumber);
BOOL m_bFahrenheit;
BOOL m_bPaintWeekend;
DWORD m_MaxPlotPoint;
DWORD m_Attribute;
afx_msg void OnGetMinMaxInfo(MINMAXINFO* lpMMI);
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg LRESULT OnUpdateBkImage(WPARAM wParam, LPARAM lParam);
afx_msg LRESULT OnUpdateLineColor(WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
DECLARE_DHTML_EVENT_MAP()
public:
COLORREF GetLineColor(DWORD index);
afx_msg void OnExit();
afx_msg void OnNorthWest();
afx_msg void OnNorthEast();
afx_msg void OnSouthWest();
afx_msg void OnSouthEast();
afx_msg void OnPaintWeekend();
afx_msg void OnPoint100();
afx_msg void OnPoint200();
afx_msg void OnPoint300();
afx_msg void OnPoint400();
afx_msg void OnPoint500();
afx_msg void OnPoint600();
afx_msg void OnPoint700();
afx_msg void OnPoint800();
afx_msg void OnPoint900();
afx_msg void OnPoint1000();
afx_msg void OnPoint2000();
afx_msg void OnPoint3000();
afx_msg void OnPoint4000();
afx_msg void OnPoint5000();
afx_msg void OnPointAll();
afx_msg void OnCustomize();
afx_msg void OnMdhm();
afx_msg void OnMd();
afx_msg void OnYmdhm();
afx_msg void OnYmd();
afx_msg void OnDmyhm();
afx_msg void OnDmy();
afx_msg void OnDmyhm2();
afx_msg void OnDmy2();
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnHdd();
afx_msg void OnSsd();
afx_msg void OnSsdMtron();
afx_msg void OnSsdIndilinx();
afx_msg void OnSsdJmicron();
afx_msg void OnSsdIntel();
afx_msg void OnSsdSamsung();
afx_msg void OnSsdSandforce();
afx_msg void OnSsdMicron();
afx_msg void OnSsdOcz();
afx_msg void OnSsdPlextor();
afx_msg void OnSsdSanDisk();
afx_msg void OnSsdOczVector();
afx_msg void OnSsdRealtek();
afx_msg void OnSsdNVMe();
};