UserDialog.h
资源名称:warftpd.zip [点击查看]
上传用户:surprise9
上传日期:2007-01-04
资源大小:426k
文件大小:4k
源码类别:
Ftp客户端
开发平台:
Visual C++
- // UserDialog.h : header file
- //
- /////////////////////////////////////////////////////////////////////////////
- // CUserDialog dialog
- class CDllTab
- {
- public:
- int m_Num; // Tab number
- //CDllInfo *m_pDLL; // Info about the dll
- BOOL (*m_GetDlg)(CUserDialog *, CWnd *, CWarUserDlgTemplate **);
- };
- class DLL_WAR_CLIENT_ CUserDialog : public CDialog
- {
- // Construction
- public:
- static void MyErrorCallbak(int nErrorNum, CRemoteUsr *Object);
- static BOOL DoUserDialog(LPVOID Remote, int timeout, CLog *Log);
- CUserDialog(CWnd* pParent = NULL); // standard constructor
- ~CUserDialog();
- void AddUsersToTree(HTREEITEM pFather, CLinkedList& List, BOOL SuspendDelete = FALSE);
- int BldTree(HTREEITEM pFather);
- static BOOL RunDialog(CRemoteInterface *pRI, CWarClientAPI *pAPI);
- static int GetImageIndex(CUserInfo *pInfo);
- BOOL SetAccessState(HTREEITEM Item, CUserInfo *pInfo);
- void SetAccessStateOnAll(HTREEITEM Node);
- CUserInfo *GetCurrentUser();
- CUserInfo *GetParentUser();
- CRemoteInterface *GetRemoteInterface() {return m_pUserInfo->m_Remote;}
- void SetActiveTab(int Tab);
- UINT IsAccountDisabled(HTREEITEM Item);
- BOOL DoInserUser(int Type, LPCSTR ClpData = NULL);
- BOOL DoDeleteUser(HTREEITEM Current, BOOL DeleteAll);
- HTREEITEM FindUserItem(HTREEITEM Current, USER User);
- void RefreshChkButton(CButton *pButton, LPCSTR Option, USER& Origin);
- void ChkButtonClikked(CButton *pButton, LPCSTR Option);
- void RefreshSecondWin(CWnd *pWnd, LPCSTR Option, USER&Origin);
- void RefreshNumericWin(CWnd *pWnd, LPCSTR Opt, USER&Origin, DWORD Flags);
- #ifdef DLL_WAR_CLIENT_EXPORT
- // Dialog Data
- //{{AFX_DATA(CUserDialog)
- enum { IDD = IDD_USER };
- CTabCtrl m_UserViewTab;
- CTreeCtrl m_UserTree;
- CTabCtrl m_Tab1;
- //}}AFX_DATA
- #else
- CTabCtrl m_UserViewTab;
- CTreeCtrl m_UserTree;
- CTabCtrl m_Tab1;
- #endif // DLL_WAR_CLIENT_EXPORT
- CRemoteUsr *m_pUserInfo;
- CWarClientAPI *m_pAPI;
- CImageList *m_Img;
- CDialog *m_CurrentTab;
- UINT m_ClpFormat;
- CLinkedList m_DlgPlugins;
- // Overrides
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CUserDialog)
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
- //}}AFX_VIRTUAL
- // Implementation
- protected:
- // Generated message map functions
- //{{AFX_MSG(CUserDialog)
- afx_msg void OnItemexpandingTree1(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnKeydownTree1(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnSelchangedTree1(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnSetdispinfoTree1(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnGetdispinfoTree1(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnEndlabeleditTree1(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnDeleteitemTree1(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnBegindragTree1(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnRclickTree1(NMHDR* pNMHDR, LRESULT* pResult);
- virtual BOOL OnInitDialog();
- afx_msg void OnSelchangeUserview(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnCopy();
- afx_msg void OnDelete();
- afx_msg void OnEditlabel();
- afx_msg void OnInsetAlias();
- afx_msg void OnInsetClass();
- afx_msg void OnInsetGroup();
- afx_msg void OnInsetUser();
- afx_msg void OnInsetVirtualserver();
- afx_msg void OnPaste();
- afx_msg void OnBeginlabeleditTree1(NMHDR* pNMHDR, LRESULT* pResult);
- afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags);
- afx_msg void OnSelchangeTab1(NMHDR* pNMHDR, LRESULT* pResult);
- //}}AFX_MSG
- DECLARE_MESSAGE_MAP()
- };
- enum // Bitmaps
- {
- IM_DOMAIN,
- IM_CLASS,
- IM_GROUP,
- IM_FTPU_ANON,
- IM_FTPU_USER,
- IM_FTPU_ADMIN,
- IM_ERROR,
- IM_DENIED,
- IM_REMOTEADMIN,
- IM_ALIAS,
- IM_INVALID
- };
- enum // Option tabs
- {
- UOT_ACCOUNT,
- UOT_PATHS,
- UOT_LIMITS,
- UOT_INVALID
- };
- enum // Login account type
- {
- LAT_FTP,
- LAT_RA,
- LAT_INVALID
- };
- // RefreshNumericWin flags
- #define RNW_NO_INHERIT 0x0001
- #define RNW_USE_DEFPREFIX 0x0002