summaryrefslogtreecommitdiffabout
path: root/PropsServer.cpp
Unidiff
Diffstat (limited to 'PropsServer.cpp') (more/less context) (show whitespace changes)
-rw-r--r--PropsServer.cpp79
1 files changed, 79 insertions, 0 deletions
diff --git a/PropsServer.cpp b/PropsServer.cpp
new file mode 100644
index 0000000..6f1e08c
--- a/dev/null
+++ b/PropsServer.cpp
@@ -0,0 +1,79 @@
1// PropsServer.cpp : implementation file
2//
3
4#include "stdafx.h"
5#include "PumpKIN.h"
6#include "PropsServer.h"
7
8#ifdef _DEBUG
9#define new DEBUG_NEW
10#undef THIS_FILE
11static char THIS_FILE[] = __FILE__;
12#endif
13
14/////////////////////////////////////////////////////////////////////////////
15// CPropsServer property page
16
17IMPLEMENT_DYNCREATE(CPropsServer, CPropertyPage)
18
19CPropsServer::CPropsServer() : CPropertyPage(CPropsServer::IDD)
20{
21 //{{AFX_DATA_INIT(CPropsServer)
22 m_RRQMode = -1;
23 m_TFTPRoot = _T("");
24 m_TFTPSubdirs = FALSE;
25 m_WRQMode = -1;
26 //}}AFX_DATA_INIT
27}
28
29CPropsServer::~CPropsServer()
30{
31}
32
33void CPropsServer::DoDataExchange(CDataExchange* pDX)
34{
35 CPropertyPage::DoDataExchange(pDX);
36 //{{AFX_DATA_MAP(CPropsServer)
37 DDX_Control(pDX, IDC_BROWSE, m_BrowseCtl);
38 DDX_Control(pDX, IDC_PROMPTTIMEOUT, m_PromptTimeoutCtl);
39 DDX_Radio(pDX, IDC_RRQ_GIVEALL, m_RRQMode);
40 DDX_Text(pDX, IDC_TFTPROOT, m_TFTPRoot);
41 DDX_Check(pDX, IDC_TFTPSUBDIRS, m_TFTPSubdirs);
42 DDX_Radio(pDX, IDC_WRQ_TAKEALL, m_WRQMode);
43 //}}AFX_DATA_MAP
44 if(pDX->m_bSaveAndValidate)
45 m_PromptTimeOut=m_PromptTimeoutCtl.GetPos();
46 else
47 m_PromptTimeoutCtl.SetPos(m_PromptTimeOut);
48}
49
50
51BEGIN_MESSAGE_MAP(CPropsServer, CPropertyPage)
52 //{{AFX_MSG_MAP(CPropsServer)
53 ON_BN_CLICKED(IDC_BROWSE, OnBrowse)
54 //}}AFX_MSG_MAP
55END_MESSAGE_MAP()
56
57/////////////////////////////////////////////////////////////////////////////
58// CPropsServer message handlers
59
60BOOL CPropsServer::OnInitDialog()
61{
62 CPropertyPage::OnInitDialog();
63
64 m_PromptTimeoutCtl.SetRange(5,60);
65 m_BrowseCtl.SetIcon(AfxGetApp()->LoadIcon(IDI_BROWSE));
66
67 return TRUE; // return TRUE unless you set the focus to a control
68 // EXCEPTION: OCX Property Pages should return FALSE
69}
70
71void CPropsServer::OnBrowse()
72{
73CString nr = m_TFTPRoot;
74 if(Klever::BrowseForFolder(nr,IDS_SELECT_TFTPROOT,this)){
75 UpdateData(TRUE);
76 m_TFTPRoot=nr;
77 UpdateData(FALSE);
78 }
79}