Index: src/ch/MainWnd.h =================================================================== diff -u -r633a533cb6e741d44fe28aa56339e1d2709b1b27 -r458af7bf8c35950fdeb4b906950437596324aea1 --- src/ch/MainWnd.h (.../MainWnd.h) (revision 633a533cb6e741d44fe28aa56339e1d2709b1b27) +++ src/ch/MainWnd.h (.../MainWnd.h) (revision 458af7bf8c35950fdeb4b906950437596324aea1) @@ -22,8 +22,8 @@ #include "TrayIcon.h" #include "structs.h" -#include "task.h" -#include "..\libchcore\TSharedMemory.h" +#include "../libchcore/TTaskManager.h" +#include "../libchcore/TSharedMemory.h" class CMiniViewDlg; class CStatusDlg; @@ -32,48 +32,28 @@ { public: CMainWnd(); + virtual ~CMainWnd(); + DECLARE_DYNCREATE(CMainWnd) BOOL Create(); -// Attributes -public: - CTrayIcon m_ctlTray; - - CTaskArray m_tasks; - chcore::IFeedbackHandlerFactory* m_pFeedbackFactory; - chcore::TSharedMemory m_tCHExtharedMemory; - - CMiniViewDlg* m_pdlgMiniView; - CStatusDlg* m_pdlgStatus; - - DWORD m_dwLastTime; - UINT m_uiTaskbarRestart; - -// Operations -public: - -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CMainFrame) - protected: +protected: virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); - //}}AFX_VIRTUAL -// Implementation -public: - virtual ~CMainWnd(); - -// Generated message map functions -protected: BOOL RegisterClass(); int ShowTrayIcon(); - void ShowStatusWindow(const CTaskPtr& spSelect = CTaskPtr()); + void ShowStatusWindow(const chcore::TTaskPtr& spSelect = chcore::TTaskPtr()); void PrepareToExit(); void ProcessCommandLine(const TCommandLineParser& rCommandLine); - //{{AFX_MSG(CMainWnd) + CString GetTasksDirectory() const; + + void SetupTimers(); + void CheckForUpdates(); + bool LoadTaskManager(); + afx_msg void OnPopupShowStatus(); afx_msg void OnPopupShowOptions(); afx_msg void OnClose(); @@ -89,11 +69,24 @@ afx_msg void OnPopupUnregisterdll(); afx_msg void OnAppExit(); afx_msg void OnPopupHelp(); - //}}AFX_MSG afx_msg LRESULT OnTrayNotification(WPARAM wParam, LPARAM lParam); - DECLARE_MESSAGE_MAP() -public: afx_msg void OnPopupCheckForUpdates(); + + DECLARE_MESSAGE_MAP() + +private: + chcore::TTaskManagerStatsSnapshotPtr m_spTaskMgrStats; + + CTrayIcon m_ctlTray; + + chcore::TTaskManagerPtr m_spTasks; + chcore::TSharedMemory m_tCHExtharedMemory; + + CMiniViewDlg* m_pdlgMiniView; + CStatusDlg* m_pdlgStatus; + + DWORD m_dwLastTime; + UINT m_uiTaskbarRestart; }; /////////////////////////////////////////////////////////////////////////////