-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMyMessageBox.cpp
152 lines (129 loc) · 4 KB
/
MyMessageBox.cpp
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
#include "StdAfx.h"
#include "MyMessageBox.h"
#include "MainFrm.h"
#include "PropertiesViewBar.h"
#include "VisualADS.h"
#include "resource.h"
#define ID_GUI_MESSAGE 0x2050
CMainFrame *g_pMainFrame = NULL;
PMParam::PMParam(CString strParam1)
{
this->strParam1 = strParam1;
}
PMParam::PMParam(CString strParam1, CString strParam2)
{
this->strParam1 = strParam1;
this->strParam2 = strParam2;
}
void MyMessageBox_Error(CString strText, CString strCaption)
{
//return; //akisn0w
PMParam *pParam = new PMParam(strText, strCaption);
AfxGetApp()->m_pMainWnd->SendMessage(ID_GUI_MESSAGE + 0, (WPARAM) pParam, NULL);
}
void MyMessageBox_Error(CString strFunction)
{
//return; //akisn0w
PMParam *pParam = new PMParam(strFunction);
AfxGetApp()->m_pMainWnd->SendMessage(ID_GUI_MESSAGE + 0, (WPARAM) pParam, NULL);
}
void Output_ConsoleList(CString strContent)
{
PMParam *pParam = new PMParam(_T(""), strContent);
AfxGetApp()->m_pMainWnd->SendMessage(ID_GUI_MESSAGE + 1, (WPARAM) pParam, NULL);
}
void Output_RacerProCache(CString strNo, CString strContent)
{
PMParam *pParam = new PMParam(strNo, strContent);
AfxGetApp()->m_pMainWnd->SendMessage(ID_GUI_MESSAGE + 2, (WPARAM) pParam, NULL);
}
void Output_ReportList(CString strNo, CString strContent)
{
PMParam *pParam = new PMParam(strNo, strContent);
AfxGetApp()->m_pMainWnd->SendMessage(ID_GUI_MESSAGE + 3, (WPARAM) pParam, NULL);
}
void Property_AddKeyValue_Basic(CString strKey, CString strValue)
{
PMParam *pParam = new PMParam(strKey, strValue);
AfxGetApp()->m_pMainWnd->SendMessage(ID_GUI_MESSAGE + 23, (WPARAM) pParam, NULL);
}
void Property_AddKeyValue_Extend(CString strKey, CString strValue)
{
PMParam *pParam = new PMParam(strKey, strValue);
AfxGetApp()->m_pMainWnd->SendMessage(ID_GUI_MESSAGE + 24, (WPARAM) pParam, NULL);
}
void Property_AddKeyValue_Father(CString strKey, CString strValue)
{
PMParam *pParam = new PMParam(strKey, strValue);
AfxGetApp()->m_pMainWnd->SendMessage(ID_GUI_MESSAGE + 25, (WPARAM) pParam, NULL);
}
void Property_AddKeyValue_ChildGroup(CString strKey, CString strValue)
{
PMParam *pParam = new PMParam(strKey, strValue);
AfxGetApp()->m_pMainWnd->SendMessage(ID_GUI_MESSAGE + 26, (WPARAM) pParam, NULL);
}
void Property_AddKeyValue_ChildUser(CString strKey, CString strValue)
{
PMParam *pParam = new PMParam(strKey, strValue);
AfxGetApp()->m_pMainWnd->SendMessage(ID_GUI_MESSAGE + 27, (WPARAM) pParam, NULL);
}
void Property_AddKeyValue_Access(CString strKey, CString strValue)
{
PMParam *pParam = new PMParam(strKey, strValue);
AfxGetApp()->m_pMainWnd->SendMessage(ID_GUI_MESSAGE + 28, (WPARAM) pParam, NULL);
}
void Property_AddKeyValue_Network(CString strKey, CString strValue)
{
PMParam *pParam = new PMParam(strKey, strValue);
AfxGetApp()->m_pMainWnd->SendMessage(ID_GUI_MESSAGE + 29, (WPARAM) pParam, NULL);
}
void Property_ClearKeyValues()
{
AfxGetApp()->m_pMainWnd->SendMessage(ID_GUI_MESSAGE + 5, NULL, NULL);
}
void Property_UpdateKeyValues()
{
AfxGetApp()->m_pMainWnd->SendMessage(ID_GUI_MESSAGE + 6, NULL, NULL);
}
void ProgressBar_Start()
{
AfxGetApp()->m_pMainWnd->SendMessage(ID_GUI_MESSAGE + 7, NULL, NULL);
}
void ProgressBar_Stop()
{
AfxGetApp()->m_pMainWnd->SendMessage(ID_GUI_MESSAGE + 8, NULL, NULL);
/*
if (bResult == FALSE)
{
DWORD dwError = GetLastError();
MyMessageBox_Error(_T("ProgressBar_Stop"));
}
*/
}
void Canvas_Invalidate()
{
AfxGetApp()->m_pMainWnd->SendMessage(ID_GUI_MESSAGE + 9, NULL, NULL);
}
void Output_Update_Connection(UINT nEvent, void *pThis)
{
CMainFrame *pMainWnd = (CMainFrame*) AfxGetApp()->m_pMainWnd;
// PMParam *pParam = new PMParam(pThis, nEvent);
// pMainWnd->PostMessage(ID_GUI_MESSAGE + 10, (WPARAM) pParam, NULL);
pMainWnd->PostMessage(ID_GUI_MESSAGE + 10, NULL, NULL);
}
BOOL bAlreadyCheckLanguage = FALSE;
BOOL bChineseOrEnglish;
BOOL Global_GetLanguage()
{
if (bAlreadyCheckLanguage)
{
return bChineseOrEnglish;
}
else
{
bAlreadyCheckLanguage = TRUE;
CVisualADSApp *pApp = (CVisualADSApp *) AfxGetApp();
bChineseOrEnglish = pApp->getLanguage();
return bChineseOrEnglish;
}
}