Index: src/ch/StatusDlg.h =================================================================== diff -u -r0cf74c78280b58c363868caafb9bf493a57aa006 -ra5f396da5ed5ffb3fcd9fdf22afb5a7fd07e1ab8 --- src/ch/StatusDlg.h (.../StatusDlg.h) (revision 0cf74c78280b58c363868caafb9bf493a57aa006) +++ src/ch/StatusDlg.h (.../StatusDlg.h) (revision a5f396da5ed5ffb3fcd9fdf22afb5a7fd07e1ab8) @@ -20,12 +20,13 @@ #define __STATUSDLG_H__ #include "FFListCtrl.h" +#include "TProgressCtrlEx.h" namespace chcore { - class CTaskArray; - class CTask; - typedef boost::shared_ptr CTaskPtr; + class TTaskManager; + class TTask; + typedef boost::shared_ptr TTaskPtr; } #define WM_UPDATESTATUS WM_USER+6 @@ -39,20 +40,19 @@ // Construction public: - CStatusDlg(chcore::CTaskArray* pTasks, CWnd* pParent = NULL); // standard constructor - ~CStatusDlg(); + CStatusDlg(chcore::TTaskManager* pTasks, CWnd* pParent = NULL); // standard constructor + virtual ~CStatusDlg(); void PostCloseMessage(); - void SetBufferSizesString(UINT uiValue, int iIndex); + void SetBufferSizesString(unsigned long long ullValue, int iIndex); void RefreshStatus(); - LPTSTR FormatTime(time_t timeSeconds, LPTSTR lpszBuffer, size_t stMaxBufferSize); + int GetImageFromStatus(chcore::ETaskCurrentState eState); void ApplyButtonsState(); - void ApplyDisplayDetails(bool bInitial=false); - chcore::CTaskPtr GetSelectedItemPointer(); + chcore::TTaskPtr GetSelectedItemPointer(); + size_t GetSelectedItemSessionUniqueID(); - void AddTaskInfo(int nPos, const chcore::CTaskPtr& spTask, DWORD dwCurrentTime); void EnableControls(bool bEnable=true); protected: @@ -63,13 +63,26 @@ virtual void OnLanguageChanged(); void PrepareResizableControls(); - CString GetStatusString(const chcore::TASK_DISPLAY_DATA& rTaskDisplayData); + CString GetStatusString(const chcore::TTaskStatsSnapshotPtr& spTaskStats); + void StickDialogToScreenEdge(); + + LPTSTR FormatTime(unsigned long long timeSeconds, LPTSTR lpszBuffer, size_t stMaxBufferSize); + LPTSTR FormatTimeMiliseconds(unsigned long long timeMiliSeconds, LPTSTR lpszBuffer, size_t stMaxBufferSize); + + CString GetProcessedText(unsigned long long ullProcessedCount, unsigned long long ullTotalCount, unsigned long long ullProcessedSize, unsigned long long ullTotalSize); + void UpdateTaskStatsDetails(const chcore::TTaskStatsSnapshotPtr& spTaskStats); + void SetTaskListEntry(size_t stPos, const chcore::TTaskStatsSnapshotPtr& spTaskStats); + CString GetSubtaskName(chcore::ESubOperationType eSubtask) const; + + CString GetProgressWindowTitleText() const; + CString GetSpeedString(double dSizeSpeed, double dAvgSizeSpeed, double dCountSpeed, double dAvgCountSpeed) const; + void SetWindowTitle(PCTSTR pszText); + virtual BOOL OnInitDialog(); afx_msg void OnTimer(UINT_PTR nIDEvent); afx_msg void OnPauseButton(); afx_msg void OnCancelButton(); - afx_msg void OnRollUnrollButton(); afx_msg void OnSetPriorityButton(); afx_msg void OnSetBuffersizeButton(); afx_msg void OnStartAllButton(); @@ -89,32 +102,30 @@ DECLARE_MESSAGE_MAP() public: - chcore::CTaskPtr m_spInitialSelection; + chcore::TTaskPtr m_spInitialSelection; static bool m_bLock; // locker protected: - chcore::CTaskArray* m_pTasks; - chcore::CTaskPtr m_spSelectedItem; - chcore::CTaskPtr m_spLastSelected; + chcore::TTaskManager* m_pTasks; TCHAR m_szData[_MAX_PATH]; TCHAR m_szTimeBuffer1[40]; TCHAR m_szTimeBuffer2[40]; TCHAR m_szTimeBuffer3[40]; - __int64 m_i64LastProcessed; - __int64 m_i64LastAllTasksProcessed; - DWORD m_dwLastUpdate; - CImageList m_images; + CFFListCtrl m_ctlStatusList; - CProgressCtrl m_ctlCurrentProgress; - CFFListCtrl m_ctlStatusList; - CProgressCtrl m_ctlProgressAll; +private: + TProgressCtrlEx m_ctlTaskCountProgress; + TProgressCtrlEx m_ctlTaskSizeProgress; + TProgressCtrlEx m_ctlCurrentObjectProgress; + TProgressCtrlEx m_ctlSubTaskCountProgress; + TProgressCtrlEx m_ctlSubTaskSizeProgress; + TProgressCtrlEx m_ctlProgressAll; + + chcore::TTaskManagerStatsSnapshotPtr m_spTaskMgrStats; }; -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. - #endif