-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDlgNet.cpp
More file actions
71 lines (58 loc) · 1.59 KB
/
DlgNet.cpp
File metadata and controls
71 lines (58 loc) · 1.59 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
// DlgNet.cpp : implementation file
//
#include "stdafx.h"
#include "krs.h"
#include "DlgNet.h"
#include "DB.h"
#include "CONV.h"
#include "SERV.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
CDlgNet::CDlgNet(CWnd* pParent /*=NULL*/)
: CDialog(CDlgNet::IDD, pParent)
{
m_PathDB = _T("");
m_PathKonv = _T("");
m_PathServer = _T("");
m_PortKonv = 0;
m_PortDB = 0;
m_PortServer = 0;
}
void CDlgNet::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Text(pDX, IDC_EDIT_PATH_DB, m_PathDB);
DDX_Text(pDX, IDC_EDIT_PATH_KONV, m_PathKonv);
DDX_Text(pDX, IDC_EDIT_PATH_SERVER, m_PathServer);
DDX_Text(pDX, IDC_EDIT_PORT_KONV, m_PortKonv);
DDX_Text(pDX, IDC_EDIT_PORT_DB, m_PortDB);
DDX_Text(pDX, IDC_EDIT_PORT_SERVER, m_PortServer);
}
BEGIN_MESSAGE_MAP(CDlgNet, CDialog)
END_MESSAGE_MAP()
void CDlgNet::OnOK()
{
UpdateData(true);
DB_connection_info.m_server_ip = m_PathDB;
CONV_connection_info.m_server_ip = m_PathKonv;
SERV_connection_info.m_server_ip = m_PathServer;
DB_connection_info.m_server_port = m_PortDB;
CONV_connection_info.m_server_port = m_PortKonv;
SERV_connection_info.m_server_port = m_PortServer;
CDialog::OnOK();
}
BOOL CDlgNet::OnInitDialog()
{
CDialog::OnInitDialog();
m_PathDB = DB_connection_info.m_server_ip;
m_PathKonv = CONV_connection_info.m_server_ip;
m_PathServer = SERV_connection_info.m_server_ip;
m_PortDB = DB_connection_info.m_server_port;
m_PortKonv = CONV_connection_info.m_server_port;
m_PortServer = SERV_connection_info.m_server_port;
UpdateData(false);
return TRUE;
}