OSDN Git Service

SyncDlg show animate when press push button and hide input control.
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / SyncDlg.cpp
index 7a04f71..f5be994 100644 (file)
@@ -81,7 +81,7 @@ void CSyncDlg::OnBnClickedButtonPush()
 {\r
        // TODO: Add your control notification handler code here\r
        this->m_regPushButton=this->m_ctrlPush.GetCurrentEntry();\r
-\r
+       this->SwitchToRun();\r
 }\r
 \r
 void CSyncDlg::OnBnClickedButtonApply()\r
@@ -93,11 +93,43 @@ void CSyncDlg::OnBnClickedButtonEmail()
 {\r
        // TODO: Add your control notification handler code here\r
 }\r
-\r
+void CSyncDlg::ShowProgressCtrl(bool bShow)\r
+{\r
+       int b=bShow?SW_NORMAL:SW_HIDE;\r
+       this->m_ctrlAnimate.ShowWindow(b);\r
+       this->m_ctrlProgress.ShowWindow(b);\r
+       this->m_ctrlAnimate.Open(IDR_DOWNLOAD);\r
+       if(b == SW_NORMAL)\r
+               this->m_ctrlAnimate.Play(0,-1,-1);\r
+       else\r
+               this->m_ctrlAnimate.Stop();\r
+}\r
+void CSyncDlg::ShowInputCtrl(bool bShow)\r
+{\r
+       int b=bShow?SW_NORMAL:SW_HIDE;\r
+       this->m_ctrlURL.ShowWindow(b);\r
+       this->m_ctrlLocalBranch.ShowWindow(b);\r
+       this->m_ctrlRemoteBranch.ShowWindow(b);\r
+       this->GetDlgItem(IDC_BUTTON_LOCAL_BRANCH)->ShowWindow(b);\r
+       this->GetDlgItem(IDC_BUTTON_REMOTE_BRANCH)->ShowWindow(b);\r
+       this->GetDlgItem(IDC_STATIC_LOCAL_BRANCH)->ShowWindow(b);\r
+       this->GetDlgItem(IDC_STATIC_REMOTE_BRANCH)->ShowWindow(b);\r
+       this->GetDlgItem(IDC_BUTTON_MANAGE)->ShowWindow(b);\r
+       this->GetDlgItem(IDC_CHECK_PUTTY_KEY)->ShowWindow(b);\r
+       this->GetDlgItem(IDC_CHECK_FORCE)->ShowWindow(b);\r
+       this->GetDlgItem(IDC_STATIC_REMOTE_URL)->ShowWindow(b);\r
+       \r
+}\r
 BOOL CSyncDlg::OnInitDialog()\r
 {\r
        CResizableStandAloneDialog::OnInitDialog();\r
 \r
+       /*\r
+       this->m_ctrlAnimate.ShowWindow(SW_NORMAL);\r
+       this->m_ctrlAnimate.Open(IDR_DOWNLOAD);\r
+       this->m_ctrlAnimate.Play(0,-1,-1);\r
+    */\r
+\r
        //Create Tabctrl\r
        CWnd *pwnd=this->GetDlgItem(IDC_BUTTON_TABCTRL);\r
        CRect rectDummy;\r
@@ -147,11 +179,11 @@ BOOL CSyncDlg::OnInitDialog()
        AddAnchor(IDC_BUTTON_PUSH,BOTTOM_LEFT);\r
        AddAnchor(IDC_BUTTON_APPLY,BOTTOM_LEFT);\r
        AddAnchor(IDC_BUTTON_EMAIL,BOTTOM_LEFT);\r
-       AddAnchor(IDC_PROGRESS_SYNC,BOTTOM_LEFT,BOTTOM_RIGHT);\r
+       AddAnchor(IDC_PROGRESS_SYNC,TOP_LEFT,TOP_RIGHT);\r
        AddAnchor(IDOK,BOTTOM_RIGHT);\r
        AddAnchor(IDHELP,BOTTOM_RIGHT);\r
        AddAnchor(IDC_STATIC_STATUS,BOTTOM_LEFT);\r
-       AddAnchor(IDC_ANIMATE_SYNC,TOP_RIGHT);\r
+       AddAnchor(IDC_ANIMATE_SYNC,TOP_LEFT);\r
        \r
        BRANCH_COMBOX_ADD_ANCHOR();\r
 \r