ScanData.h
3.28 KB
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
#if !defined(AFX_SCANDATA_H__CD6976C2_87AB_4CD4_96F3_7E733406F5D1__INCLUDED_)
#define AFX_SCANDATA_H__CD6976C2_87AB_4CD4_96F3_7E733406F5D1__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// ScanData.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CScanData dialog
typedef enum
{
Barcode_Index = 0,
Imei_1_Index,
Imei_2_Index,
Imei_3_Index,
Imei_4_Index,
SerialNo_Index,
Bt_Index,
Wifi_Index,
Ethernet_Index,
DRMKey_MCID_Index,
Meid_Index,
Esn_Index,
OK_Index
}E_ScanData_Index;
#define MAX_SCANDATA_NUMS (OK_Index - Barcode_Index + 1)
typedef enum
{
Barcode = 0,
Imei,
SerialNo,
BT,
Wifi,
Ethernet_mac,
DRMKey_MCID,
Meid,
Esn
}E_ScanData_Type;
typedef struct
{
UINT staticID;
UINT editID;
UINT headerID;
}ScanControlID_struct;
class CScanData : public CDialog
{
// Construction
public:
CScanData(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CScanData)
enum { IDD = IDD_SCANDATA_DIALOG };
CString m_strBarcData;
CString m_strIMEI1Data;
CString m_strIMEI2Data;
CString m_strIMEI3Data;
CString m_strIMEI4Data;
CString m_strWifiData;
CString m_strBtData;
CString m_strEthernetMacData;
CString m_strDrmkeyMCIDData;
CString m_strSerialNoData;
//C2K
CString m_strMeidData;
CString m_strEsnData;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CScanData)
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(CScanData)
afx_msg void OnKillfocusBtData();
afx_msg void OnKillfocusBarcodeData();
afx_msg void OnKillfocusImei1Data();
afx_msg void OnKillfocusImei2Data();
afx_msg void OnKillfocusImei3Data();
afx_msg void OnKillfocusImei4Data();
afx_msg void OnKillfocusWifiData();
afx_msg void OnBtnScanOk();
afx_msg void OnBtnScanCancel();
virtual BOOL OnInitDialog();
afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
afx_msg void OnKillfocusEthernetMacData();
afx_msg void OnKillfocusDrmkeyMcidData();
afx_msg void OnKillfocusSerialNoData();
afx_msg void OnKillfocusMeidData();
afx_msg void OnKillfocusEsnData();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
private:
char m_strSerinalNoByIMEI[IMEI_ARRAY_LEN];
bool m_bNeedBackupIMEI;
char m_strBackupIMEI[16];
char* m_pstrScanItem;
CButton m_ScanCancelBTN;
CButton m_ScanOKBTN;
protected:
void GenSerialNoFirstStep(const char* pFirstIMEI);
void GenSerialNoSecondStep();
bool CheckSerialNoMatchWithIMEI(const char* pSerialNo);
void InitScanUI();
void RemoveWindow();
void CreateScanOrder();
void SetNextFocus(int iCurrentID, bool bCheckPass);
bool CheckAllScanData();
bool CheckScanData(const char *pStrHeader, bool bCheckHeader, const char *pInData, E_ScanData_Type dataType);
bool CheckScanDataByIndex(int index);
int GetNextScanID(const int currentID);
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SCANDATA_H__CD6976C2_87AB_4CD4_96F3_7E733406F5D1__INCLUDED_)