Index: src/ch/MainWnd.h =================================================================== diff -u -rf703b71b8c856e2538283555e9fdbc84918677c3 -r4fe995b304ea342b50293f92d3c1992b43b820f7 --- src/ch/MainWnd.h (.../MainWnd.h) (revision f703b71b8c856e2538283555e9fdbc84918677c3) +++ src/ch/MainWnd.h (.../MainWnd.h) (revision 4fe995b304ea342b50293f92d3c1992b43b820f7) @@ -21,8 +21,8 @@ #define __MAINFRM_H__ #include "TrayIcon.h" -#include "structs.h" -#include "task.h" +#include "../libchcore/TTaskManager.h" +#include "../libchcore/TSharedMemory.h" class CMiniViewDlg; class CStatusDlg; @@ -31,44 +31,28 @@ { public: CMainWnd(); + virtual ~CMainWnd(); + DECLARE_DYNCREATE(CMainWnd) BOOL Create(); -// Attributes -public: - CTrayIcon m_ctlTray; - - CTaskArray m_tasks; - chcore::IFeedbackHandlerFactory* m_pFeedbackFactory; - - 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(); - //{{AFX_MSG(CMainWnd) + + void ProcessCommandLine(const TCommandLineParser& rCommandLine); + + CString GetTasksDirectory() const; + + void SetupTimers(); + void CheckForUpdates(); + bool LoadTaskManager(); + afx_msg void OnPopupShowStatus(); afx_msg void OnPopupShowOptions(); afx_msg void OnClose(); @@ -84,16 +68,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() -//{{AFX_INSERT_LOCATION}} -// Microsoft Developer Studio will insert additional declarations immediately before the previous line. +private: + chcore::TTaskManagerStatsSnapshotPtr m_spTaskMgrStats; + CTrayIcon m_ctlTray; + + chcore::TTaskManagerPtr m_spTasks; + chcore::TSharedMemory m_tCHExtharedMemory; + + CMiniViewDlg* m_pdlgMiniView = nullptr; + CStatusDlg* m_pdlgStatus = nullptr; + + DWORD m_dwLastTime = 0; + UINT m_uiTaskbarRestart = 0; +}; + #endif