#ifndef __PropertyDlg_h__
#define __PropertyDlg_h__
#include <CeTab.h>
#include <CeFtp.h>
#include <CeRes.h>
#include "ftpSite.h"
#include "ftpViewRes.h"
///////////////////////////////////////////////////////////////////////////////
class CeFtpPage: public CeTabPage
{
private:
CeChildMgr m_mgr;
CeLabelEdit m_labelName;
CeLabelEdit m_labelIP;
CeLabelEdit m_labelUser;
CeLabelEdit m_labelPassword;
public:
CeFtpSite m_site;
// Construction
CeFtpPage();
// Windows messages
virtual BOOL OnInitDialog();
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam, bool& bHandled);
virtual void OnSize( UINT nType, int cx, int cy, bool& bHandled );
virtual void OnApply();
// Operations
void SetFtp(CeFtpSite & site)
{
m_site.m_strName = site.m_strName;
m_site.m_strAddress = site.m_strAddress;
m_site.m_strUser = site.m_strUser;
m_site.m_strPassword = site.m_strPassword;
m_site.m_bAnon = site.m_bAnon;
m_site.m_bPassive = site.m_bPassive;
}
};
///////////////////////////////////////////////////////////////////////////////
class CeFilePage: public CeTabPage
{
private:
CeChildMgr m_mgr;
public:
bool m_bLocal;
bool m_bChangedAttributes;
CeString m_strDirectory;
WIN32_FIND_DATA m_finddata;
SHFILEINFO m_shinfo;
public:
// Construction
CeFilePage();
// Windows messages
virtual BOOL OnInitDialog();
virtual void OnSize(UINT nType, int cx, int cy, bool & bHandled);
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam, bool& bHandled);
virtual void OnApply();
// Operations
void SetFile(CeString & strDir, WIN32_FIND_DATA & findData, bool bLocal);
bool IsShortcut() const;
};
///////////////////////////////////////////////////////////////////////////////
class CeShortcutPage: public CeTabPage
{
private:
CeChildMgr m_mgr;
public:
CeString m_strDirectory;
SHFILEINFO m_shinfo;
WIN32_FIND_DATA m_finddata;
public:
// Construction
CeShortcutPage();
// Windows messages
virtual BOOL OnInitDialog();
virtual void OnSize( UINT nType, int cx, int cy, bool& bHandled );
virtual void OnApply();
// Operations
void SetFile(CeString & strDir, WIN32_FIND_DATA & findData);
};
///////////////////////////////////////////////////////////////////////////////
class CeVersionPage: public CeTabPage
{
private:
CeChildMgr m_mgr;
public:
// Construction
CeVersionPage();
CeVersionInfo* m_pVersion;
// Windows messages
virtual BOOL OnInitDialog();
virtual void OnSize( UINT nType, int cx, int cy, bool& bHandled );
};
///////////////////////////////////////////////////////////////////////////////
class CeSystemPage: public CeTabPage
{
private:
CeChildMgr m_mgr;
CeStaticGroup m_groupVersion;
CeStaticGroup m_groupSystem;
public:
// Construction
CeSystemPage();
// Windows messages
virtual BOOL OnInitDialog();
virtual void OnSize( UINT nType, int cx, int cy, bool& bHandled );
};
///////////////////////////////////////////////////////////////////////////////
class CeTasksPage: public CeTabPage
{
private:
CeChildMgr m_mgr;
public:
// Construction
CeTasksPage();
// Windows messages
virtual BOOL OnInitDialog();
virtual void OnSize( UINT nType, int cx, int cy, bool& bHandled );
};
///////////////////////////////////////////////////////////////////////////////
class CePropertyDlg: public CeDialog
{
private:
CeChildMgr m_mgr;
CeTabSheet m_sheet;
bool m_bGeneral;
public:
CeFilePage m_pageFile;
CeFtpPage m_pageFtp;
CeShortcutPage m_pageShortcut;
CeSystemPage m_pageSystem;
CeVersionPage m_pageVersion;
CeTasksPage m_pageTask;
// Construction/Destruction
CePropertyDlg();
virtual ~CePropertyDlg();
// Windows messages
virtual BOOL OnInitDialog();
virtual LRESULT OnMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, bool& bHandled);
virtual void OnTimer( UINT nTimer, bool& bHandled );
virtual void OnSize(UINT nType, int cx, int cy, bool& bHandled);
virtual void OnSettingChange( WORD wFlag, LPCTSTR pszSection, bool& bHandled );
virtual void OnOK();
virtual void OnCancel();
// Operations
void AddFtpSiteProperty(CeFtpSite& site);
void AddFileProperty(CeString & strDir, WIN32_FIND_DATA & findData, bool bLocal);
void AddSystemProperty();
void AddTaskProperty();
};
#endif // __PropertyDlg_h__