本文整理汇总了C++中CRegString函数的典型用法代码示例。如果您正苦于以下问题:C++ CRegString函数的具体用法?C++ CRegString怎么用?C++ CRegString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了CRegString函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetWindowText
void CHistoryCombo::SaveHistory()
{
if (m_sSection.IsEmpty())
return;
//add the current item to the history
CString sCurItem;
GetWindowText(sCurItem);
if (m_bTrim)
sCurItem.Trim();
if (!sCurItem.IsEmpty())
AddString(sCurItem, 0);
//save history to registry/inifile
int nMax = min(GetCount(), m_nMaxHistoryItems + 1);
for (int n = 0; n < nMax; n++)
{
CString sKey;
sKey.Format(_T("%s\\%s%d"), (LPCTSTR)m_sSection, (LPCTSTR)m_sKeyPrefix, n);
CRegString regkey = CRegString(sKey);
regkey = m_arEntries.GetAt(n);
}
//remove items exceeding the max number of history items
for (int n = nMax; ; n++)
{
CString sKey;
sKey.Format(_T("%s\\%s%d"), (LPCTSTR)m_sSection, (LPCTSTR)m_sKeyPrefix, n);
CRegString regkey = CRegString(sKey);
CString sText = regkey;
if (sText.IsEmpty())
break;
regkey.removeValue(); // remove entry
}
}
示例2: ISettingsPropPage
CSetDialogs::CSetDialogs()
: ISettingsPropPage(CSetDialogs::IDD)
, m_sDefaultLogs(L"")
, m_bShortDateFormat(FALSE)
, m_dwFontSize(0)
, m_sFontName(L"")
, m_bUseWCURL(FALSE)
, m_sDefaultCheckoutPath(L"")
, m_sDefaultCheckoutUrl(L"")
, m_bDiffByDoubleClick(FALSE)
, m_bUseSystemLocaleForDates(FALSE)
, m_bUseRecycleBin(TRUE)
, m_bAutoCloseLocal(FALSE)
, m_dwAutoClose(0)
{
m_regAutoClose = CRegDWORD(L"Software\\TortoiseSVN\\AutoClose");
m_regAutoCloseLocal = CRegDWORD(L"Software\\TortoiseSVN\\AutoCloseLocal");
m_regDefaultLogs = CRegDWORD(L"Software\\TortoiseSVN\\NumberOfLogs", 100);
m_regShortDateFormat = CRegDWORD(L"Software\\TortoiseSVN\\LogDateFormat", FALSE);
m_regUseSystemLocaleForDates = CRegDWORD(L"Software\\TortoiseSVN\\UseSystemLocaleForDates", TRUE);
m_regFontName = CRegString(L"Software\\TortoiseSVN\\LogFontName", L"Courier New");
m_regFontSize = CRegDWORD(L"Software\\TortoiseSVN\\LogFontSize", 8);
m_regUseWCURL = CRegDWORD(L"Software\\TortoiseSVN\\MergeWCURL", FALSE);
m_regDefaultCheckoutPath = CRegString(L"Software\\TortoiseSVN\\DefaultCheckoutPath");
m_regDefaultCheckoutUrl = CRegString(L"Software\\TortoiseSVN\\DefaultCheckoutUrl");
m_regDiffByDoubleClick = CRegDWORD(L"Software\\TortoiseSVN\\DiffByDoubleClickInLog", FALSE);
m_regUseRecycleBin = CRegDWORD(L"Software\\TortoiseSVN\\RevertWithRecycleBin", TRUE);
}
示例3: AddAnchor
BOOL CRequestPullDlg::OnInitDialog()
{
CHorizontalResizableStandAloneDialog::OnInitDialog();
CAppUtils::MarkWindowAsUnpinnable(m_hWnd);
AddAnchor(IDOK,BOTTOM_RIGHT);
AddAnchor(IDCANCEL,BOTTOM_RIGHT);
AddAnchor(IDHELP,BOTTOM_RIGHT);
AddAnchor(IDC_BUTTON_LOCAL_BRANCH, TOP_RIGHT);
AddAnchor(IDC_COMBOBOXEX_LOCAL_BRANCH, TOP_LEFT,TOP_RIGHT);
AddAnchor(IDC_COMBOBOXEX_URL, TOP_LEFT,TOP_RIGHT);
AddAnchor(IDC_REMOTE_BRANCH, TOP_LEFT,TOP_RIGHT);
EnableSaveRestore(_T("RequestPullDlg"));
CString sWindowTitle;
GetWindowText(sWindowTitle);
CAppUtils::SetWindowTitle(m_hWnd, g_Git.m_CurrentDir, sWindowTitle);
STRING_VECTOR list;
int current;
g_Git.GetBranchList(list, ¤t, CGit::BRANCH_ALL);
m_cStartRevision.SetMaxHistoryItems(0x7FFFFFFF);
for (unsigned int i = 0; i < list.size(); i++)
{
m_cStartRevision.AddString(list[i]);
}
CString WorkingDir=g_Git.m_CurrentDir;
WorkingDir.Replace(_T(':'), _T('_'));
m_RegStartRevision = CRegString(_T("Software\\TortoiseGit\\History\\RequestPull\\")+WorkingDir+_T("\\startrevision"));
if(m_StartRevision.IsEmpty()) {
m_StartRevision = m_RegStartRevision;
}
m_cStartRevision.SetWindowTextW(m_StartRevision);
// store URLs in global history, but save last used local url separately,
// because one normally has only one writable repository
m_cRepositoryURL.SetURLHistory(TRUE);
m_cRepositoryURL.LoadHistory(_T("Software\\TortoiseGit\\History\\RequestPull"), _T("url"));
m_RegRepositoryURL = CRegString(_T("Software\\TortoiseGit\\History\\RequestPull\\")+WorkingDir+_T("\\repositoryurl"));
if(m_RepositoryURL.IsEmpty())
{
m_RepositoryURL = m_RegRepositoryURL;
}
m_cRepositoryURL.SetWindowTextW(m_RepositoryURL);
m_RegEndRevision = CRegString(_T("Software\\TortoiseGit\\History\\RequestPull\\")+WorkingDir+_T("\\endrevision"), _T("HEAD"));
if(m_EndRevision.IsEmpty()) {
m_EndRevision = m_RegEndRevision;
}
m_cEndRevision.SetWindowTextW(m_EndRevision);
this->UpdateData(FALSE);
return TRUE;
}
示例4: CDialog
CodeCollaboratorSettingsDlg::CodeCollaboratorSettingsDlg(CWnd* pParent /*=NULL*/)
: CDialog(CodeCollaboratorSettingsDlg::IDD, pParent),
{
m_regCollabUser = CRegString(L"Software\\TortoiseSVN\\CodeCollaborator\\CollabUser", L"");
m_regCollabPassword = CRegString(L"Software\\TortoiseSVN\\CodeCollaborator\\CollabPassword", L"");
m_regSvnUser = CRegString(L"Software\\TortoiseSVN\\CodeCollaborator\\SvnUser", L"");
m_regSvnPassword = CRegString(L"Software\\TortoiseSVN\\CodeCollaborator\\SvnPassword", L"");
}
示例5: ISettingsPropPage
CSettingsProgsDiff::CSettingsProgsDiff()
: ISettingsPropPage(CSettingsProgsDiff::IDD)
, m_dlgAdvDiff(_T("Diff"))
, m_iExtDiff(0)
, m_iDiffViewer(0)
{
m_regDiffPath = CRegString(_T("Software\\TortoiseGit\\Diff"));
m_regDiffViewerPath = CRegString(_T("Software\\TortoiseGit\\DiffViewer"));
}
示例6: ISettingsPropPage
CSetMainPage::CSetMainPage()
: ISettingsPropPage(CSetMainPage::IDD)
, m_bLastCommitTime(FALSE)
, m_bUseAero(TRUE)
, m_dwLanguage(0)
{
m_regLanguage = CRegDWORD(L"Software\\TortoiseSVN\\LanguageID", 1033);
CString temp(SVN_CONFIG_DEFAULT_GLOBAL_IGNORES);
m_regExtensions = CRegString(L"Software\\Tigris.org\\Subversion\\Config\\miscellany\\global-ignores", temp);
m_regLastCommitTime = CRegString(L"Software\\Tigris.org\\Subversion\\Config\\miscellany\\use-commit-times", L"");
m_regUseAero = CRegDWORD(L"Software\\TortoiseSVN\\EnableDWMFrame", TRUE);
}
示例7: ISettingsPropPage
CSetMainPage::CSetMainPage()
: ISettingsPropPage(CSetMainPage::IDD)
, m_bCheckNewer(TRUE)
, m_dwLanguage(0)
{
m_regLanguage = CRegDWORD(L"Software\\TortoiseGit\\LanguageID", 1033);
m_regMsysGitPath = CRegString(REG_MSYSGIT_PATH);
m_regMsysGitExtranPath =CRegString(REG_MSYSGIT_EXTRA_PATH);
m_sMsysGitPath = m_regMsysGitPath;
m_sMsysGitExtranPath = m_regMsysGitExtranPath;
m_regCheckNewer = CRegDWORD(L"Software\\TortoiseGit\\VersionCheck", TRUE);
}
示例8: ExtendFrameIntoClientArea
BOOL CBugtraqRegexTestDlg::OnInitDialog()
{
CResizableStandAloneDialog::OnInitDialog();
CAppUtils::MarkWindowAsUnpinnable(m_hWnd);
ExtendFrameIntoClientArea(IDC_DWM);
m_aeroControls.SubclassControl(this, IDC_PROPRECURSIVE);
m_aeroControls.SubclassOkCancelHelp(this);
ProjectProperties projectprops;
projectprops.lProjectLanguage = -1;
projectprops.SetBugIDRe(m_sBugtraqRegex1);
projectprops.SetCheckRe(m_sBugtraqRegex2);
m_cLogMessage.Init(projectprops);
m_cLogMessage.SetFont((CString)CRegString(L"Software\\TortoiseSVN\\LogFontName", L"Courier New"), (DWORD)CRegDWORD(L"Software\\TortoiseSVN\\LogFontSize", 8));
CAppUtils::SetAccProperty(m_cLogMessage.GetSafeHwnd(), PROPID_ACC_ROLE, ROLE_SYSTEM_TEXT);
CAppUtils::SetAccProperty(m_cLogMessage.GetSafeHwnd(), PROPID_ACC_HELP, CString(MAKEINTRESOURCE(IDS_INPUT_ENTERLOG)));
m_cLogMessage.SetText(CString(MAKEINTRESOURCE(IDS_SAMPLEBUGTRAQTESTMSG)));
AddAnchor(IDC_SAMPLELABEL, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_LOGMESSAGE, TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_REGEXIDLABEL, BOTTOM_LEFT);
AddAnchor(IDC_BUGTRAQLOGREGEX1, BOTTOM_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_REGEXMSGLABEL, BOTTOM_LEFT);
AddAnchor(IDC_BUGTRAQLOGREGEX2, BOTTOM_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_DWM, BOTTOM_LEFT);
AddAnchor(IDOK, BOTTOM_RIGHT);
AddAnchor(IDCANCEL, BOTTOM_RIGHT);
return TRUE;
}
示例9: ISettingsPropPage
CSettingsProgsDiff::CSettingsProgsDiff()
: ISettingsPropPage(CSettingsProgsDiff::IDD)
, m_dlgAdvDiff(L"Diff")
, m_iExtDiff(0)
, m_sDiffPath(L"")
, m_iExtDiffProps(0)
, m_sDiffPropsPath(L"")
, m_regConvertBase(L"Software\\TortoiseSVN\\ConvertBase", TRUE)
, m_bConvertBase(false)
, m_sDiffViewerPath(L"")
, m_iDiffViewer(0)
{
m_regDiffPath = CRegString(L"Software\\TortoiseSVN\\Diff");
m_regDiffPropsPath = CRegString(L"Software\\TortoiseSVN\\DiffProps");
m_regDiffViewerPath = CRegString(L"Software\\TortoiseSVN\\DiffViewer");
}
示例10: ISettingsPropPage
CSettingsTBlame::CSettingsTBlame()
: ISettingsPropPage(CSettingsTBlame::IDD)
, m_dwFontSize(0)
, m_sFontName(L"")
, m_dwTabSize(4)
{
m_regNewLinesColor = CRegDWORD(L"Software\\TortoiseSVN\\BlameNewColor", BLAMENEWCOLOR);
m_regOldLinesColor = CRegDWORD(L"Software\\TortoiseSVN\\BlameOldColor", BLAMEOLDCOLOR);
m_regNewLinesColorBar = CRegDWORD(L"Software\\TortoiseSVN\\BlameLocatorNewColor", BLAMENEWCOLORBAR);
m_regOldLinesColorBar = CRegDWORD(L"Software\\TortoiseSVN\\BlameLocatorOldColor", BLAMEOLDCOLORBAR);
m_regFontName = CRegString(L"Software\\TortoiseSVN\\BlameFontName", L"Courier New");
m_regFontSize = CRegDWORD(L"Software\\TortoiseSVN\\BlameFontSize", 10);
m_regTabSize = CRegDWORD(L"Software\\TortoiseSVN\\BlameTabSize", 4);
m_regIndexColors[0] = CRegDWORD(L"Software\\TortoiseSVN\\BlameIndexColor1", BLAMEINDEXCOLOR1);
m_regIndexColors[1] = CRegDWORD(L"Software\\TortoiseSVN\\BlameIndexColor2", BLAMEINDEXCOLOR2);
m_regIndexColors[2] = CRegDWORD(L"Software\\TortoiseSVN\\BlameIndexColor3", BLAMEINDEXCOLOR3);
m_regIndexColors[3] = CRegDWORD(L"Software\\TortoiseSVN\\BlameIndexColor4", BLAMEINDEXCOLOR4);
m_regIndexColors[4] = CRegDWORD(L"Software\\TortoiseSVN\\BlameIndexColor5", BLAMEINDEXCOLOR5);
m_regIndexColors[5] = CRegDWORD(L"Software\\TortoiseSVN\\BlameIndexColor6", BLAMEINDEXCOLOR6);
m_regIndexColors[6] = CRegDWORD(L"Software\\TortoiseSVN\\BlameIndexColor7", BLAMEINDEXCOLOR7);
m_regIndexColors[7] = CRegDWORD(L"Software\\TortoiseSVN\\BlameIndexColor8", BLAMEINDEXCOLOR8);
m_regIndexColors[8] = CRegDWORD(L"Software\\TortoiseSVN\\BlameIndexColor9", BLAMEINDEXCOLOR9);
m_regIndexColors[9] = CRegDWORD(L"Software\\TortoiseSVN\\BlameIndexColor10", BLAMEINDEXCOLOR10);
m_regIndexColors[10] = CRegDWORD(L"Software\\TortoiseSVN\\BlameIndexColor11", BLAMEINDEXCOLOR11);
m_regIndexColors[11] = CRegDWORD(L"Software\\TortoiseSVN\\BlameIndexColor12", BLAMEINDEXCOLOR12);
}
示例11: _T
BOOL CBugtraqRegexTestDlg::OnInitDialog()
{
CResizableStandAloneDialog::OnInitDialog();
CAppUtils::MarkWindowAsUnpinnable(m_hWnd);
ProjectProperties projectprops;
projectprops.lProjectLanguage = -1;
projectprops.SetBugIDRe(m_sBugtraqRegex1);
projectprops.SetCheckRe(m_sBugtraqRegex2);
m_cLogMessage.Init(projectprops);
m_cLogMessage.SetFont((CString)CRegString(_T("Software\\TortoiseGit\\LogFontName"), _T("Courier New")), (DWORD)CRegDWORD(_T("Software\\TortoiseGit\\LogFontSize"), 8));
m_cLogMessage.SetText(CString(MAKEINTRESOURCE(IDS_SAMPLEBUGTRAQTESTMSG)));
m_cLogMessage.Call(SCI_SETCURRENTPOS, 0);
m_cLogMessage.Call(SCI_SETSEL, 0, 0);
AddAnchor(IDC_SAMPLELABEL, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_LOGMESSAGE, TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_REGEXIDLABEL, BOTTOM_LEFT);
AddAnchor(IDC_BUGTRAQLOGREGEX1, BOTTOM_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_REGEXMSGLABEL, BOTTOM_LEFT);
AddAnchor(IDC_BUGTRAQLOGREGEX2, BOTTOM_LEFT, BOTTOM_RIGHT);
AddAnchor(IDOK, BOTTOM_RIGHT);
AddAnchor(IDCANCEL, BOTTOM_RIGHT);
return TRUE;
}
示例12: ISettingsPropPage
CSettingsProgsAlternativeEditor::CSettingsProgsAlternativeEditor()
: ISettingsPropPage(CSettingsProgsAlternativeEditor::IDD)
, m_sAlternativeEditorPath(_T(""))
, m_iAlternativeEditor(0)
{
m_regAlternativeEditorPath = CRegString(_T("Software\\TortoiseGit\\AlternativeEditor"));
}
示例13: CHorizontalResizableStandAloneDialog
CCloneDlg::CCloneDlg(CWnd* pParent /*=NULL*/)
: CHorizontalResizableStandAloneDialog(CCloneDlg::IDD, pParent)
{
m_bRecursive = FALSE;
m_bBare = FALSE;
m_bBranch = FALSE;
m_bOrigin = FALSE;
m_bNoCheckout = FALSE;
m_bSVN = FALSE;
m_bSVNTrunk = FALSE;
m_bSVNTags = FALSE;
m_bSVNBranch = FALSE;
m_bSVNFrom = FALSE;
m_bSVNUserName = FALSE;
m_bExactPath = FALSE;
m_strSVNTrunk = _T("trunk");
m_strSVNTags = _T("tags");
m_strSVNBranchs = _T("branches");
m_regBrowseUrl = CRegDWORD(_T("Software\\TortoiseGit\\TortoiseProc\\CloneBrowse"),0);
m_regCloneDir = CRegString(_T("Software\\TortoiseGit\\TortoiseProc\\CloneDir"));
m_regUseSSHKey = CRegDWORD(_T("Software\\TortoiseGit\\TortoiseProc\\CloneUseSSHKey"), TRUE);
m_nSVNFrom = 0;
m_bAutoloadPuttyKeyFile = m_regUseSSHKey && CAppUtils::IsSSHPutty();
m_nDepth = 1;
m_bDepth = false;
m_bSaving = false;
}
示例14: CRegString
CString CHistoryCombo::LoadHistory(LPCTSTR lpszSection, LPCTSTR lpszKeyPrefix)
{
if (!lpszSection || !lpszKeyPrefix || *lpszSection == '\0')
return L"";
m_sSection = lpszSection;
m_sKeyPrefix = lpszKeyPrefix;
int n = 0;
CString sText;
do
{
//keys are of form <lpszKeyPrefix><entrynumber>
CString sKey;
sKey.Format(L"%s\\%s%d", (LPCTSTR)m_sSection, (LPCTSTR)m_sKeyPrefix, n++);
sText = CRegString(sKey);
if (!sText.IsEmpty())
AddString(sText);
} while (!sText.IsEmpty() && n < m_nMaxHistoryItems);
SetCurSel(-1);
ModifyStyleEx(WS_EX_DLGMODALFRAME | WS_EX_WINDOWEDGE, 0);
// need to resize the control for correct display
CRect rect;
GetWindowRect(rect);
GetParent()->ScreenToClient(rect);
MoveWindow(rect.left, rect.top, rect.Width(),100);
return sText;
}
示例15: CRegString
BOOL CMergeWizardRevRange::OnInitDialog()
{
CMergeWizardBasePage::OnInitDialog();
CMergeWizard * pWizard = (CMergeWizard*)GetParent();
CString sRegKey = L"Software\\TortoiseSVN\\History\\repoURLS\\MergeURLFor" + ((CMergeWizard*)GetParent())->wcPath.GetSVNPathString();
CString sMergeUrlForWC = CRegString(sRegKey);
CString sUUID = pWizard->sUUID;
m_URLCombo.SetURLHistory(true, false);
m_URLCombo.LoadHistory(L"Software\\TortoiseSVN\\History\\repoURLS\\"+sUUID, L"url");
if (!(DWORD)CRegDWORD(L"Software\\TortoiseSVN\\MergeWCURL", FALSE))
m_URLCombo.SetCurSel(0);
else if (!sMergeUrlForWC.IsEmpty())
m_URLCombo.SetWindowText(CPathUtils::PathUnescape(sMergeUrlForWC));
else if (!pWizard->url.IsEmpty())
m_URLCombo.SetWindowText(CPathUtils::PathUnescape(pWizard->url));
if (m_URLCombo.GetString().IsEmpty())
m_URLCombo.SetWindowText(CPathUtils::PathUnescape(pWizard->url));
if (!pWizard->URL1.IsEmpty())
m_URLCombo.SetWindowText(CPathUtils::PathUnescape(pWizard->URL1));
if (pWizard->revRangeArray.GetCount())
{
m_sRevRange = pWizard->revRangeArray.ToListString();
if (pWizard->pegRev.IsValid())
m_sRevRange = m_sRevRange + L"@" + pWizard->pegRev.ToString();
SetDlgItemText(IDC_REVISION_RANGE, m_sRevRange);
}
CheckRadioButton(IDC_MERGERADIO_ALL, IDC_MERGERADIO_SPECIFIC, IDC_MERGERADIO_SPECIFIC);
CString sLabel;
sLabel.LoadString(IDS_MERGEWIZARD_REVRANGESTRING);
SetDlgItemText(IDC_REVRANGELABEL, sLabel);
SetDlgItemText(IDC_WCEDIT, ((CMergeWizard*)GetParent())->wcPath.GetWinPath());
AdjustControlSize(IDC_REVERSEMERGE);
AddAnchor(IDC_MERGEREVRANGEFROMGROUP, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_URLCOMBO, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_BROWSE, TOP_RIGHT);
AddAnchor(IDC_MERGEREVRANGERANGEGROUP, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_MERGERADIO_ALL, TOP_LEFT);
AddAnchor(IDC_MERGERADIO_SPECIFIC, TOP_LEFT);
AddAnchor(IDC_REVISION_RANGE, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_SELLOG, TOP_RIGHT);
AddAnchor(IDC_REVERSEMERGE, TOP_LEFT);
AddAnchor(IDC_REVRANGELABEL, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_MERGEREVRANGEWCGROUP, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_WCEDIT, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_SHOWLOGWC, TOP_RIGHT);
StartWCCheckThread(((CMergeWizard*)GetParent())->wcPath);
return TRUE;
}