author | Michael Krelin <hacker@klever.net> | 2006-02-02 23:07:50 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2006-02-02 23:07:50 (UTC) |
commit | 39bb4331674cc77560a546f4f9b14b143603d4be (patch) (side-by-side diff) | |
tree | fbbc1006c655888a5483ddd359c52b863e7a27ab /PropsServer.cpp | |
parent | fedc32eb7d20e5278a2125ead3ed125dc63b5746 (diff) | |
download | pumpkin-39bb4331674cc77560a546f4f9b14b143603d4be.zip pumpkin-39bb4331674cc77560a546f4f9b14b143603d4be.tar.gz pumpkin-39bb4331674cc77560a546f4f9b14b143603d4be.tar.bz2 |
- version bump to 2.7
- year bump to 2006
- ip-based access control
- server switchable off
- logging to file
git-svn-id: http://svn.klever.net/kin/pumpkin/trunk@144 fe716a7a-6dde-0310-88d9-d003556173a8
-rw-r--r-- | PropsServer.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/PropsServer.cpp b/PropsServer.cpp index 6f1e08c..a3948e0 100644 --- a/PropsServer.cpp +++ b/PropsServer.cpp @@ -22,8 +22,9 @@ CPropsServer::CPropsServer() : CPropertyPage(CPropsServer::IDD) m_RRQMode = -1;
m_TFTPRoot = _T("");
m_TFTPSubdirs = FALSE;
m_WRQMode = -1;
+ m_LogFile = _T("");
//}}AFX_DATA_INIT
}
CPropsServer::~CPropsServer()
@@ -33,14 +34,16 @@ CPropsServer::~CPropsServer() void CPropsServer::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CPropsServer)
+ DDX_Control(pDX, IDC_LOGFILE_BROWSE, m_LogBrowseCtl);
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);
+ DDX_Text(pDX, IDC_LOGFILE, m_LogFile);
//}}AFX_DATA_MAP
if(pDX->m_bSaveAndValidate)
m_PromptTimeOut=m_PromptTimeoutCtl.GetPos();
else
@@ -50,8 +53,9 @@ void CPropsServer::DoDataExchange(CDataExchange* pDX) BEGIN_MESSAGE_MAP(CPropsServer, CPropertyPage)
//{{AFX_MSG_MAP(CPropsServer)
ON_BN_CLICKED(IDC_BROWSE, OnBrowse)
+ ON_BN_CLICKED(IDC_LOGFILE_BROWSE, OnLogfileBrowse)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
@@ -62,8 +66,9 @@ BOOL CPropsServer::OnInitDialog() CPropertyPage::OnInitDialog();
m_PromptTimeoutCtl.SetRange(5,60);
m_BrowseCtl.SetIcon(AfxGetApp()->LoadIcon(IDI_BROWSE));
+ m_LogBrowseCtl.SetIcon(AfxGetApp()->LoadIcon(IDI_BROWSE));
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
@@ -76,4 +81,18 @@ CString nr = m_TFTPRoot; m_TFTPRoot=nr;
UpdateData(FALSE);
}
}
+
+void CPropsServer::OnLogfileBrowse()
+{
+ UpdateData(TRUE);
+ CFileDialog cfd(
+ FALSE, ".log", (LPCSTR)m_LogFile,
+ OFN_EXPLORER|OFN_HIDEREADONLY|OFN_LONGNAMES|OFN_NOCHANGEDIR|OFN_OVERWRITEPROMPT|OFN_PATHMUSTEXIST,
+ "Log files (*.log)|*.log|All Files (*.*)|*.*||",
+ this);
+ if(cfd.DoModal()==IDOK) {
+ m_LogFile = cfd.GetPathName();
+ UpdateData(FALSE);
+ }
+}
|