3 #include "StandAloneDlg.h"
\r
5 #define MSG_PROGRESSDLG_UPDATE_UI (WM_USER+121)
\r
6 // CProgressDlg dialog
\r
7 #define MSG_PROGRESSDLG_START 0
\r
8 #define MSG_PROGRESSDLG_RUN 50
\r
9 #define MSG_PROGRESSDLG_END 110
\r
10 #define MSG_PROGRESSDLG_FAILED 111
\r
12 class CProgressDlg : public CResizableStandAloneDialog
\r
14 DECLARE_DYNAMIC(CProgressDlg)
\r
17 CProgressDlg(CWnd* pParent = NULL); // standard constructor
\r
18 virtual ~CProgressDlg();
\r
19 virtual BOOL OnInitDialog();
\r
21 enum { IDD = IDD_GITPROGRESS };
\r
23 std::vector<CString> m_GitCmdList;
\r
24 bool m_bAutoCloseOnSuccess;
\r
25 CString m_changeAbortButtonOnSuccessTo;
\r
29 CProgressCtrl m_Progress;
\r
33 CAnimateCtrl m_Animate;
\r
34 CStatic m_CurrentWork;
\r
35 CWinThread* m_pThread;
\r
36 volatile LONG m_bThreadRunning;
\r
38 BOOL m_bShowCommand; // whether to display the command in the log window (default true)
\r
39 CString m_PreText; // optional text to show in log window before running command
\r
44 bool m_bAltAbortPress;
\r
45 bool m_bBufferAll; // Buffer All to improve speed when there are many file add at commit
\r
47 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
\r
48 static UINT ProgressThreadEntry(LPVOID pVoid);
\r
49 UINT ProgressThread();
\r
51 void ParserCmdOutput(TCHAR ch);
\r
53 void RemoveLastLine(CString &str);
\r
55 LRESULT CProgressDlg::OnProgressUpdateUI(WPARAM wParam,LPARAM lParam);
\r
59 std::vector<TCHAR> m_Databuf;
\r
62 void InsertCRLF(); //Insert \r before \n
\r
64 DECLARE_MESSAGE_MAP()
\r
67 //Share with Sync Dailog
\r
68 static int FindPercentage(CString &log);
\r
69 static UINT RunCmdList(CWnd *pWnd,std::vector<CString> &cmdlist,bool bShowCommand,CString *pfilename,bool *bAbort,std::vector<TCHAR> *pdata=NULL);
\r
71 afx_msg void OnBnClickedOk();
\r
72 afx_msg void OnBnClickedButton1();
\r