summaryrefslogtreecommitdiffabout
path: root/PropsServer.cpp
authorMichael Krelin <hacker@klever.net>2004-07-05 01:53:09 (UTC)
committer Michael Krelin <hacker@klever.net>2004-07-05 01:53:09 (UTC)
commit9938ea772d372ba955b7bc1f1c48a062c3a36f8a (patch) (side-by-side diff)
treea98185df944e3a763f9557aa74bc2837b343f048 /PropsServer.cpp
downloadpumpkin-9938ea772d372ba955b7bc1f1c48a062c3a36f8a.zip
pumpkin-9938ea772d372ba955b7bc1f1c48a062c3a36f8a.tar.gz
pumpkin-9938ea772d372ba955b7bc1f1c48a062c3a36f8a.tar.bz2
initial commit into svn repository
git-svn-id: http://svn.klever.net/kin/pumpkin/trunk@1 fe716a7a-6dde-0310-88d9-d003556173a8
Diffstat (limited to 'PropsServer.cpp') (more/less context) (ignore 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 @@
+// PropsServer.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "PumpKIN.h"
+#include "PropsServer.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+/////////////////////////////////////////////////////////////////////////////
+// CPropsServer property page
+
+IMPLEMENT_DYNCREATE(CPropsServer, CPropertyPage)
+
+CPropsServer::CPropsServer() : CPropertyPage(CPropsServer::IDD)
+{
+ //{{AFX_DATA_INIT(CPropsServer)
+ m_RRQMode = -1;
+ m_TFTPRoot = _T("");
+ m_TFTPSubdirs = FALSE;
+ m_WRQMode = -1;
+ //}}AFX_DATA_INIT
+}
+
+CPropsServer::~CPropsServer()
+{
+}
+
+void CPropsServer::DoDataExchange(CDataExchange* pDX)
+{
+ CPropertyPage::DoDataExchange(pDX);
+ //{{AFX_DATA_MAP(CPropsServer)
+ DDX_Control(pDX, IDC_BROWSE, m_BrowseCtl);
+ DDX_Control(pDX, IDC_PROMPTTIMEOUT, m_PromptTimeoutCtl);
+ DDX_Radio(pDX, IDC_RRQ_GIVEALL, m_RRQMode);
+ DDX_Text(pDX, IDC_TFTPROOT, m_TFTPRoot);
+ DDX_Check(pDX, IDC_TFTPSUBDIRS, m_TFTPSubdirs);
+ DDX_Radio(pDX, IDC_WRQ_TAKEALL, m_WRQMode);
+ //}}AFX_DATA_MAP
+ if(pDX->m_bSaveAndValidate)
+ m_PromptTimeOut=m_PromptTimeoutCtl.GetPos();
+ else
+ m_PromptTimeoutCtl.SetPos(m_PromptTimeOut);
+}
+
+
+BEGIN_MESSAGE_MAP(CPropsServer, CPropertyPage)
+ //{{AFX_MSG_MAP(CPropsServer)
+ ON_BN_CLICKED(IDC_BROWSE, OnBrowse)
+ //}}AFX_MSG_MAP
+END_MESSAGE_MAP()
+
+/////////////////////////////////////////////////////////////////////////////
+// CPropsServer message handlers
+
+BOOL CPropsServer::OnInitDialog()
+{
+ CPropertyPage::OnInitDialog();
+
+ m_PromptTimeoutCtl.SetRange(5,60);
+ m_BrowseCtl.SetIcon(AfxGetApp()->LoadIcon(IDI_BROWSE));
+
+ return TRUE; // return TRUE unless you set the focus to a control
+ // EXCEPTION: OCX Property Pages should return FALSE
+}
+
+void CPropsServer::OnBrowse()
+{
+CString nr = m_TFTPRoot;
+ if(Klever::BrowseForFolder(nr,IDS_SELECT_TFTPROOT,this)){
+ UpdateData(TRUE);
+ m_TFTPRoot=nr;
+ UpdateData(FALSE);
+ }
+}