本文整理汇总了C++中GitEntry::Load方法的典型用法代码示例。如果您正苦于以下问题:C++ GitEntry::Load方法的具体用法?C++ GitEntry::Load怎么用?C++ GitEntry::Load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GitEntry
的用法示例。
在下文中一共展示了GitEntry::Load方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnOK
void GitSettingsDlg::OnOK(wxCommandEvent& event)
{
GitEntry data;
data.Load();
data.SetGITExecutablePath(m_pathGIT->GetPath());
data.SetGITKExecutablePath(m_pathGITK->GetPath());
size_t flags = 0;
if(m_checkBoxLog->IsChecked()) flags |= GitEntry::Git_Verbose_Log;
if(m_checkBoxTerminal->IsChecked()) flags |= GitEntry::Git_Show_Terminal;
if(m_checkBoxTrackTree->IsChecked()) flags |= GitEntry::Git_Colour_Tree_View;
data.SetFlags(flags);
data.Save();
GitEntry::GitProperties props;
props.global_email = m_textCtrlGlobalEmail->GetValue();
props.global_username = m_textCtrlGlobalName->GetValue();
props.local_email = m_textCtrlLocalEmail->GetValue();
props.local_username = m_textCtrlLocalName->GetValue();
GitEntry::WriteGitProperties(m_localRepoPath, props);
// Notify about configuration changed
wxCommandEvent evt(wxEVT_GIT_CONFIG_CHANGED);
EventNotifier::Get()->AddPendingEvent(evt);
EndModal(wxID_OK);
}
示例2: GitSettingsDlgBase
GitSettingsDlg::GitSettingsDlg(wxWindow* parent, const wxString& localRepoPath)
: GitSettingsDlgBase(parent)
, m_localRepoPath(localRepoPath)
{
GitEntry data;
data.Load();
m_pathGIT->SetPath(data.GetGITExecutablePath());
m_pathGITK->SetPath(data.GetGITKExecutablePath());
m_checkBoxLog->SetValue(data.GetFlags() & GitEntry::Git_Verbose_Log);
m_checkBoxTerminal->SetValue(data.GetFlags() & GitEntry::Git_Show_Terminal);
m_checkBoxTrackTree->SetValue(data.GetFlags() & GitEntry::Git_Colour_Tree_View);
GitEntry::GitProperties props = GitEntry::ReadGitProperties(m_localRepoPath);
m_textCtrlGlobalEmail->ChangeValue(props.global_email);
m_textCtrlGlobalName->ChangeValue(props.global_username);
m_textCtrlLocalEmail->ChangeValue(props.local_email);
m_textCtrlLocalName->ChangeValue(props.local_username);
SetName("GitSettingsDlg");
WindowAttrManager::Load(this);
}