Index: src/ch/MainWnd.h =================================================================== diff -u -rd5c3edd0d167db9b5d47d04248820fda49499a5e -r0d5b67ee96b435d63f7bf075dc8e28603793b187 --- src/ch/MainWnd.h (.../MainWnd.h) (revision d5c3edd0d167db9b5d47d04248820fda49499a5e) +++ src/ch/MainWnd.h (.../MainWnd.h) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) @@ -21,67 +21,40 @@ #define __MAINFRM_H__ #include "TrayIcon.h" -#include "structs.h" -#include "MiniviewDlg.h" -#include "DataBuffer.h" -#include "StatusDlg.h" -#include "FeedbackHandler.h" +#include "../libchcore/TSharedMemory.h" +#include "../libchengine/TTask.h" +#include "../libchengine/TTaskManager.h" -typedef struct _CUSTOM_COPY_PARAMS -{ - CTask* pTask; // ptr to CTask object on which we do the operation +class TShellExtMenuConfig; +class CMiniViewDlg; +class CStatusDlg; - CFileInfo* pfiSrcFile; // CFileInfo - src file - CString strDstFile; // dest path with filename - - CDataBuffer dbBuffer; // buffer handling - bool bOnlyCreate; // flag from configuration - skips real copying - only create - bool bProcessed; // has the element been processed ? (false if skipped) -} CUSTOM_COPY_PARAMS, *PCUSTOM_COPY_PARAMS; - class CMainWnd : public CWnd { public: CMainWnd(); + virtual ~CMainWnd(); + DECLARE_DYNCREATE(CMainWnd) BOOL Create(); -// Attributes -public: - CTrayIcon m_ctlTray; - CLIPBOARDMONITORDATA cmd; - - CTaskArray m_tasks; - chcore::IFeedbackHandlerFactory* m_pFeedbackFactory; +protected: + LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam) override; - CMiniViewDlg* m_pdlgMiniView; - CStatusDlg* m_pdlgStatus; + BOOL RegisterClass(); + int ShowTrayIcon(); + void ShowStatusWindow(const chengine::TTaskPtr& spSelect = chengine::TTaskPtr()); + void PrepareToExit(); - DWORD m_dwLastTime; - UINT m_uiTaskbarRestart; + void ProcessCommandLine(const TCommandLineParser& rCommandLine); -// Operations -public: + CString GetTasksDirectory() const; -// Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CMainFrame) - protected: - virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam); - //}}AFX_VIRTUAL + void SetupTimers(); + void CheckForUpdates(); + bool LoadTaskManager(); -// Implementation -public: - virtual ~CMainWnd(); - -// Generated message map functions -protected: - ATOM RegisterClass(); - int ShowTrayIcon(); - void ShowStatusWindow(const CTask* pSelect=NULL); - void PrepareToExit(); - //{{AFX_MSG(CMainWnd) afx_msg void OnPopupShowStatus(); afx_msg void OnPopupShowOptions(); afx_msg void OnClose(); @@ -97,16 +70,26 @@ 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: + chengine::TTaskManagerStatsSnapshotPtr m_spTaskMgrStats; + CTrayIcon m_ctlTray; + + chengine::TTaskManagerPtr m_spTasks; + chcore::TSharedMemory m_tCHExtharedMemory; + + CMiniViewDlg* m_pdlgMiniView = nullptr; + CStatusDlg* m_pdlgStatus = nullptr; + + DWORD m_dwLastTime = 0; + UINT m_uiTaskbarRestart = 0; + + logger::TLoggerPtr m_spLog; +}; + #endif