summaryrefslogtreecommitdiffabout
path: root/PropsServer.cpp
authorMichael Krelin <hacker@klever.net>2012-12-08 21:19:17 (UTC)
committer Michael Krelin <hacker@klever.net>2012-12-11 21:59:29 (UTC)
commit8808689fe340bec6e90ab13dd502292b0579cf1f (patch) (unidiff)
tree45b7c863151341f687b74e40bffcbd7ab5468783 /PropsServer.cpp
parent6e7e413ca364d79673e523c09767c18e7cff1bec (diff)
downloadpumpkin-osx/0.0.zip
pumpkin-osx/0.0.tar.gz
pumpkin-osx/0.0.tar.bz2
initial osx portosx/0.0
Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (limited to 'PropsServer.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--PropsServer.cpp98
1 files changed, 0 insertions, 98 deletions
diff --git a/PropsServer.cpp b/PropsServer.cpp
deleted file mode 100644
index a3948e0..0000000
--- a/PropsServer.cpp
+++ b/dev/null
@@ -1,98 +0,0 @@
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 m_LogFile = _T("");
27 //}}AFX_DATA_INIT
28}
29
30CPropsServer::~CPropsServer()
31{
32}
33
34void CPropsServer::DoDataExchange(CDataExchange* pDX)
35{
36 CPropertyPage::DoDataExchange(pDX);
37 //{{AFX_DATA_MAP(CPropsServer)
38 DDX_Control(pDX, IDC_LOGFILE_BROWSE, m_LogBrowseCtl);
39 DDX_Control(pDX, IDC_BROWSE, m_BrowseCtl);
40 DDX_Control(pDX, IDC_PROMPTTIMEOUT, m_PromptTimeoutCtl);
41 DDX_Radio(pDX, IDC_RRQ_GIVEALL, m_RRQMode);
42 DDX_Text(pDX, IDC_TFTPROOT, m_TFTPRoot);
43 DDX_Check(pDX, IDC_TFTPSUBDIRS, m_TFTPSubdirs);
44 DDX_Radio(pDX, IDC_WRQ_TAKEALL, m_WRQMode);
45 DDX_Text(pDX, IDC_LOGFILE, m_LogFile);
46 //}}AFX_DATA_MAP
47 if(pDX->m_bSaveAndValidate)
48 m_PromptTimeOut=m_PromptTimeoutCtl.GetPos();
49 else
50 m_PromptTimeoutCtl.SetPos(m_PromptTimeOut);
51}
52
53
54BEGIN_MESSAGE_MAP(CPropsServer, CPropertyPage)
55 //{{AFX_MSG_MAP(CPropsServer)
56 ON_BN_CLICKED(IDC_BROWSE, OnBrowse)
57 ON_BN_CLICKED(IDC_LOGFILE_BROWSE, OnLogfileBrowse)
58 //}}AFX_MSG_MAP
59END_MESSAGE_MAP()
60
61/////////////////////////////////////////////////////////////////////////////
62// CPropsServer message handlers
63
64BOOL CPropsServer::OnInitDialog()
65{
66 CPropertyPage::OnInitDialog();
67
68 m_PromptTimeoutCtl.SetRange(5,60);
69 m_BrowseCtl.SetIcon(AfxGetApp()->LoadIcon(IDI_BROWSE));
70 m_LogBrowseCtl.SetIcon(AfxGetApp()->LoadIcon(IDI_BROWSE));
71
72 return TRUE; // return TRUE unless you set the focus to a control
73 // EXCEPTION: OCX Property Pages should return FALSE
74}
75
76void CPropsServer::OnBrowse()
77{
78CString nr = m_TFTPRoot;
79 if(Klever::BrowseForFolder(nr,IDS_SELECT_TFTPROOT,this)){
80 UpdateData(TRUE);
81 m_TFTPRoot=nr;
82 UpdateData(FALSE);
83 }
84}
85
86void CPropsServer::OnLogfileBrowse()
87{
88 UpdateData(TRUE);
89 CFileDialog cfd(
90 FALSE, ".log", (LPCSTR)m_LogFile,
91 OFN_EXPLORER|OFN_HIDEREADONLY|OFN_LONGNAMES|OFN_NOCHANGEDIR|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST,
92 "Log files (*.log)|*.log|All Files (*.*)|*.*||",
93 this);
94 if(cfd.DoModal()==IDOK) {
95 m_LogFile = cfd.GetPathName();
96 UpdateData(FALSE);
97 }
98}