void CCloneDlg::OnBnClickedCheckSvn() { this->UpdateData(); if(this->m_bSVN) { CString str; m_URLCombo.GetWindowText(str); str.TrimRight(L"\\/"); if(str.GetLength()>=5 && (str.Right(5).MakeLower() == _T("trunk") )) { this->m_bSVNBranch=this->m_bSVNTags=this->m_bSVNTrunk = FALSE; } else { this->m_bSVNBranch=this->m_bSVNTags=this->m_bSVNTrunk = TRUE; } m_bDepth = false; m_bBare = false; m_bRecursive = false; m_bBranch = FALSE; m_bNoCheckout = FALSE; this->UpdateData(FALSE); OnBnClickedCheckDepth(); } this->GetDlgItem(IDC_CHECK_DEPTH)->EnableWindow(!m_bSVN); this->GetDlgItem(IDC_CHECK_BARE)->EnableWindow(!m_bSVN); this->GetDlgItem(IDC_CHECK_RECURSIVE)->EnableWindow(!m_bSVN); this->GetDlgItem(IDC_CHECK_BRANCH)->EnableWindow(!m_bSVN); this->GetDlgItem(IDC_EDIT_BRANCH)->EnableWindow(!m_bSVN); this->GetDlgItem(IDC_CHECK_NOCHECKOUT)->EnableWindow(!m_bSVN); OnBnClickedCheckSvnTrunk(); OnBnClickedCheckSvnTag(); OnBnClickedCheckSvnBranch(); OnBnClickedCheckSvnFrom(); OnBnClickedCheckUsername(); }
void CCloneDlg::OnBnClickedCheckSvn() { this->UpdateData(); if(this->m_bSVN) { CString str; m_URLCombo.GetWindowText(str); str.TrimRight(L"\\/"); if (CStringUtils::EndsWithI(str, L"trunk")) this->m_bSVNBranch=this->m_bSVNTags=this->m_bSVNTrunk = FALSE; else this->m_bSVNBranch=this->m_bSVNTags=this->m_bSVNTrunk = TRUE; m_bDepth = false; m_bBare = false; m_bRecursive = false; m_bBranch = FALSE; m_bNoCheckout = FALSE; m_bUseLFS = FALSE; this->UpdateData(FALSE); OnBnClickedCheckDepth(); } this->GetDlgItem(IDC_CHECK_DEPTH)->EnableWindow(!m_bSVN); this->GetDlgItem(IDC_CHECK_BARE)->EnableWindow(!m_bSVN); this->GetDlgItem(IDC_CHECK_RECURSIVE)->EnableWindow(!m_bSVN); this->GetDlgItem(IDC_CHECK_BRANCH)->EnableWindow(!m_bSVN); this->GetDlgItem(IDC_EDIT_BRANCH)->EnableWindow(!m_bSVN); this->GetDlgItem(IDC_CHECK_NOCHECKOUT)->EnableWindow(!m_bSVN); this->GetDlgItem(IDC_CHECK_LFS)->EnableWindow(!m_bSVN); OnBnClickedCheckSvnTrunk(); OnBnClickedCheckSvnTag(); OnBnClickedCheckSvnBranch(); OnBnClickedCheckSvnFrom(); OnBnClickedCheckUsername(); }