本文整理汇总了C++中CBrowseFolder::SetInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ CBrowseFolder::SetInfo方法的具体用法?C++ CBrowseFolder::SetInfo怎么用?C++ CBrowseFolder::SetInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CBrowseFolder
的用法示例。
在下文中一共展示了CBrowseFolder::SetInfo方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnBnClickedBugTraqbrowse
void CSetBugTraqAdv::OnBnClickedBugTraqbrowse()
{
CBrowseFolder browser;
CString sPath;
GetDlgItemText(IDC_BUGTRAQPATH, sPath);
browser.SetInfo(CString(MAKEINTRESOURCE(IDS_SETTINGS_BUGTRAQ_SELECTFOLDERPATH)));
browser.m_style = BIF_EDITBOX | BIF_NEWDIALOGSTYLE | BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS;
if (browser.Show(m_hWnd, sPath) == CBrowseFolder::OK)
SetDlgItemText(IDC_BUGTRAQPATH, sPath);
}
示例2: OnBnClickedHookbrowse
void CSetHooksAdv::OnBnClickedHookbrowse()
{
UpdateData();
CBrowseFolder browser;
CString sPath;
browser.SetInfo(CString(MAKEINTRESOURCE(IDS_SETTINGS_HOOKS_SELECTFOLDERPATH)));
browser.m_style = BIF_EDITBOX | BIF_NEWDIALOGSTYLE | BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS;
if (browser.Show(m_hWnd, sPath) == CBrowseFolder::OK)
{
m_sPath = sPath;
UpdateData(FALSE);
}
}
示例3: Execute
bool ExportCommand::Execute()
{
bool bRet = false;
// When the user clicked on a working copy, we know that the export should
// be done from that. We then have to ask where the export should go to.
// If however the user clicked on an unversioned folder, we assume that
// this is where the export should go to and have to ask from where
// the export should be done from.
bool bURL = !!SVN::PathIsURL(cmdLinePath);
svn_wc_status_kind s = SVNStatus::GetAllStatus(cmdLinePath);
if ((bURL)||(s == svn_wc_status_unversioned)||(s == svn_wc_status_none))
{
// ask from where the export has to be done
CExportDlg dlg;
if (bURL)
dlg.m_URL = cmdLinePath.GetSVNPathString();
else
dlg.m_strExportDirectory = cmdLinePath.GetWinPathString();
if (parser.HasKey(_T("revision")))
{
SVNRev Rev = SVNRev(parser.GetVal(_T("revision")));
dlg.Revision = Rev;
}
dlg.m_blockPathAdjustments = parser.HasKey(L"blockpathadjustments");
if (dlg.DoModal() == IDOK)
{
CTSVNPath exportPath(dlg.m_strExportDirectory);
CSVNProgressDlg progDlg;
theApp.m_pMainWnd = &progDlg;
progDlg.SetCommand(CSVNProgressDlg::SVNProgress_Export);
progDlg.SetAutoClose (parser);
DWORD options = dlg.m_bNoExternals ? ProgOptIgnoreExternals : ProgOptNone;
options |= dlg.m_bNoKeywords ? ProgOptIgnoreKeywords : ProgOptNone;
if (dlg.m_eolStyle.CompareNoCase(_T("CRLF"))==0)
options |= ProgOptEolCRLF;
if (dlg.m_eolStyle.CompareNoCase(_T("CR"))==0)
options |= ProgOptEolCR;
if (dlg.m_eolStyle.CompareNoCase(_T("LF"))==0)
options |= ProgOptEolLF;
progDlg.SetOptions(options);
progDlg.SetPathList(CTSVNPathList(exportPath));
progDlg.SetUrl(dlg.m_URL);
progDlg.SetRevision(dlg.Revision);
progDlg.SetDepth(dlg.m_depth);
progDlg.DoModal();
bRet = !progDlg.DidErrorsOccur();
}
}
else
{
// ask where the export should go to.
CBrowseFolder folderBrowser;
CString strTemp;
strTemp.LoadString(IDS_PROC_EXPORT_1);
folderBrowser.SetInfo(strTemp);
folderBrowser.m_style = BIF_NEWDIALOGSTYLE | BIF_RETURNFSANCESTORS | BIF_RETURNONLYFSDIRS | BIF_VALIDATE | BIF_EDITBOX;
strTemp.LoadString(IDS_PROC_EXPORT_2);
folderBrowser.SetCheckBoxText(strTemp);
strTemp.LoadString(IDS_PROC_OMMITEXTERNALS);
folderBrowser.SetCheckBoxText2(strTemp);
folderBrowser.DisableCheckBox2WhenCheckbox1IsEnabled(true);
CRegDWORD regExtended = CRegDWORD(_T("Software\\TortoiseSVN\\ExportExtended"), FALSE);
CBrowseFolder::m_bCheck = regExtended;
TCHAR saveto[MAX_PATH];
if (folderBrowser.Show(GetExplorerHWND(), saveto, _countof(saveto))==CBrowseFolder::OK)
{
CString saveplace = CString(saveto);
if (cmdLinePath.IsEquivalentTo(CTSVNPath(saveplace)))
{
// exporting to itself:
// remove all svn admin dirs, effectively unversion the 'exported' folder.
CString msg;
msg.Format(IDS_PROC_EXPORTUNVERSION, (LPCTSTR)saveplace);
bool bUnversion = false;
if (CTaskDialog::IsSupported())
{
CTaskDialog taskdlg(msg,
CString(MAKEINTRESOURCE(IDS_PROC_EXPORTUNVERSION_TASK2)),
L"TortoiseSVN",
0,
TDF_ENABLE_HYPERLINKS|TDF_USE_COMMAND_LINKS|TDF_ALLOW_DIALOG_CANCELLATION|TDF_POSITION_RELATIVE_TO_WINDOW);
taskdlg.AddCommandControl(1, CString(MAKEINTRESOURCE(IDS_PROC_EXPORTUNVERSION_TASK3)));
taskdlg.AddCommandControl(2, CString(MAKEINTRESOURCE(IDS_PROC_EXPORTUNVERSION_TASK4)));
taskdlg.SetCommonButtons(TDCBF_CANCEL_BUTTON);
taskdlg.SetDefaultCommandControl(1);
taskdlg.SetMainIcon(TD_WARNING_ICON);
bUnversion = (taskdlg.DoModal(GetExplorerHWND()) == 1);
}
else
{
bUnversion = (MessageBox(GetExplorerHWND(), msg, _T("TortoiseSVN"), MB_ICONQUESTION|MB_YESNO) == IDYES);
}
if (bUnversion)
{
CProgressDlg progress;
progress.SetTitle(IDS_PROC_UNVERSION);
progress.SetAnimation(IDR_MOVEANI);
//.........这里部分代码省略.........