您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ wxMessageBoxEx函数代码示例

51自学网 2021-06-03 10:11:10
  C++
这篇教程C++ wxMessageBoxEx函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中wxMessageBoxEx函数的典型用法代码示例。如果您正苦于以下问题:C++ wxMessageBoxEx函数的具体用法?C++ wxMessageBoxEx怎么用?C++ wxMessageBoxEx使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了wxMessageBoxEx函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: XRCCTRL

void CFilterDialog::OnRename(wxCommandEvent& event){	wxChoice* pChoice = XRCCTRL(*this, "ID_SETS", wxChoice);	int old_pos = pChoice->GetSelection();	if (old_pos == -1)		return;	if (!old_pos) {		wxMessageBoxEx(_("This filter set cannot be renamed."));		return;	}	CInputDialog dlg;	wxString msg = wxString::Format(_("Please enter a new name for the filter set /"%s/""), pChoice->GetStringSelection());	dlg.Create(this, _("Enter new name for filterset"), msg);	if (dlg.ShowModal() != wxID_OK)		return;	wxString name = dlg.GetValue();	if (name == pChoice->GetStringSelection()) {		// Nothing changed		return;	}	if (name.empty()) {		wxMessageBoxEx(_("No name for the filterset given."), _("Cannot save filterset"), wxICON_INFORMATION);		return;	}	int pos = pChoice->FindString(name);	if (pos != wxNOT_FOUND) {		if (wxMessageBoxEx(_("Given filterset name already exists, overwrite filter set?"), _("Filter set already exists"), wxICON_QUESTION | wxYES_NO) != wxYES)			return;	}	// Remove old entry	pChoice->Delete(old_pos);	CFilterSet set = m_filterSets[old_pos];	m_filterSets.erase(m_filterSets.begin() + old_pos);	pos = pChoice->FindString(name);	if (pos == wxNOT_FOUND) {		pos = m_filterSets.size();		m_filterSets.push_back(set);		pChoice->Append(name);	}	else		m_filterSets[pos] = set;	m_filterSets[pos].name = name;	pChoice->SetSelection(pos);	m_currentFilterSet = pos;	GetSizer()->Fit(this);}
开发者ID:juaristi,项目名称:filezilla,代码行数:59,


示例2: mutex

bool CSiteManager::ClearBookmarks(wxString sitePath){	if (sitePath[0] != '0')		return false;	sitePath = sitePath.Mid(1);	// We have to synchronize access to sitemanager.xml so that multiple processed don't write	// to the same file or one is reading while the other one writes.	CInterProcessMutex mutex(MUTEX_SITEMANAGER);	CXmlFile file;	TiXmlElement* pDocument = file.Load(_T("sitemanager"));	if (!pDocument)	{		wxString msg = file.GetError() + _T("/n") + _("The bookmarks could not be cleared.");		wxMessageBoxEx(msg, _("Error loading xml file"), wxICON_ERROR);		return false;	}	TiXmlElement* pElement = pDocument->FirstChildElement("Servers");	if (!pElement)		return false;	std::list<wxString> segments;	if (!UnescapeSitePath(sitePath, segments))	{		wxMessageBoxEx(_("Site path is malformed."), _("Invalid site path"));		return 0;	}	TiXmlElement* pChild = GetElementByPath(pElement, segments);	if (!pChild || strcmp(pChild->Value(), "Server"))	{		wxMessageBoxEx(_("Site does not exist."), _("Invalid site path"));		return 0;	}	TiXmlElement *pBookmark = pChild->FirstChildElement("Bookmark");	while (pBookmark)	{		pChild->RemoveChild(pBookmark);		pBookmark = pChild->FirstChildElement("Bookmark");	}	wxString error;	if (!file.Save(&error))	{		if (COptions::Get()->GetOptionVal(OPTION_DEFAULT_KIOSKMODE) == 2)			return true;		wxString msg = wxString::Format(_("Could not write /"%s/", the selected sites could not be exported: %s"), file.GetFileName().GetFullPath().c_str(), error.c_str());		wxMessageBoxEx(msg, _("Error writing xml file"), wxICON_ERROR);	}	return true;}
开发者ID:bartojak,项目名称:osp-filezilla,代码行数:59,


示例3: XRCCTRL

bool CBookmarksDialog::Verify(){	wxTreeItemId item = m_pTree->GetSelection();	if (!item)		return true;	CBookmarkItemData *data = (CBookmarkItemData *)m_pTree->GetItemData(item);	if (!data)		return true;	const CServer *server;	if (m_pTree->GetItemParent(item) == m_bookmarks_site)		server = m_server;	else		server = 0;	const wxString remotePathRaw = XRCCTRL(*this, "ID_BOOKMARK_REMOTEDIR", wxTextCtrl)->GetValue();	if (!remotePathRaw.empty())	{		CServerPath remotePath;		if (server)			remotePath.SetType(server->GetType());		if (!remotePath.SetPath(remotePathRaw))		{			XRCCTRL(*this, "ID_BOOKMARK_REMOTEDIR", wxTextCtrl)->SetFocus();			if (server)			{				wxString msg;				if (server->GetType() != DEFAULT)					msg = wxString::Format(_("Remote path cannot be parsed. Make sure it is a valid absolute path and is supported by the current site's servertype (%s)."), server->GetNameFromServerType(server->GetType()));				else					msg = _("Remote path cannot be parsed. Make sure it is a valid absolute path.");				wxMessageBoxEx(msg);			}			else				wxMessageBoxEx(_("Remote path cannot be parsed. Make sure it is a valid absolute path."));			return false;		}	}	const wxString localPath = XRCCTRL(*this, "ID_BOOKMARK_LOCALDIR", wxTextCtrl)->GetValue();	if (remotePathRaw.empty() && localPath.empty())	{		XRCCTRL(*this, "ID_BOOKMARK_LOCALDIR", wxTextCtrl)->SetFocus();		wxMessageBoxEx(_("You need to enter at least one path, empty bookmarks are not supported."));		return false;	}	bool sync = XRCCTRL(*this, "ID_BOOKMARK_SYNC", wxCheckBox)->GetValue();	if (sync && (localPath.empty() || remotePathRaw.empty()))	{		wxMessageBoxEx(_("You need to enter both a local and a remote path to enable synchronized browsing for this bookmark."), _("New bookmark"), wxICON_EXCLAMATION, this);		return false;	}	return true;}
开发者ID:juaristi,项目名称:filezilla,代码行数:58,


示例4: wxGetLocale

void CFileZillaApp::InitLocale(){	wxString language = COptions::Get()->GetOption(OPTION_LANGUAGE);	const wxLanguageInfo* pInfo = wxLocale::FindLanguageInfo(language);	if (!language.empty()) {#ifdef __WXGTK__		if (CInitializer::error) {			wxString error;			wxLocale *loc = wxGetLocale();			const wxLanguageInfo* currentInfo = loc ? loc->GetLanguageInfo(loc->GetLanguage()) : 0;			if (!loc || !currentInfo) {				if (!pInfo)					error.Printf(_("Failed to set language to %s, using default system language."),						language);				else					error.Printf(_("Failed to set language to %s (%s), using default system language."),						pInfo->Description, language);			}			else {				wxString currentName = currentInfo->CanonicalName;				if (!pInfo)					error.Printf(_("Failed to set language to %s, using default system language (%s, %s)."),						language, loc->GetLocale(),						currentName);				else					error.Printf(_("Failed to set language to %s (%s), using default system language (%s, %s)."),						pInfo->Description, language, loc->GetLocale(),						currentName);			}			error += _T("/n");			error += _("Please make sure the requested locale is installed on your system.");			wxMessageBoxEx(error, _("Failed to change language"), wxICON_EXCLAMATION);			COptions::Get()->SetOption(OPTION_LANGUAGE, _T(""));		}#else		if (!pInfo || !SetLocale(pInfo->Language)) {			for( language = GetFallbackLocale(language); !language.empty(); language = GetFallbackLocale(language) ) {				const wxLanguageInfo* fallbackInfo = wxLocale::FindLanguageInfo(language);				if( fallbackInfo && SetLocale(fallbackInfo->Language )) {					COptions::Get()->SetOption(OPTION_LANGUAGE, language.ToStdWstring());					return;				}			}			COptions::Get()->SetOption(OPTION_LANGUAGE, std::wstring());			if (pInfo && !pInfo->Description.empty())				wxMessageBoxEx(wxString::Format(_("Failed to set language to %s (%s), using default system language"), pInfo->Description, language), _("Failed to change language"), wxICON_EXCLAMATION);			else				wxMessageBoxEx(wxString::Format(_("Failed to set language to %s, using default system language"), language), _("Failed to change language"), wxICON_EXCLAMATION);		}#endif	}}
开发者ID:zedfoxus,项目名称:filezilla-client,代码行数:56,


示例5: while

wxString CLocalTreeView::GetDirFromItem(wxTreeItemId item){	const wxString separator = wxFileName::GetPathSeparator();	wxString dir;	while (item)	{#ifdef __WXMSW__		if (item == m_desktop) {			wxChar path[MAX_PATH + 1];			if (SHGetFolderPath(0, CSIDL_DESKTOPDIRECTORY, 0, SHGFP_TYPE_CURRENT, path) != S_OK) {				if (SHGetFolderPath(0, CSIDL_DESKTOP, 0, SHGFP_TYPE_CURRENT, path) != S_OK) {					wxMessageBoxEx(_("Failed to get desktop path"));					return _T("/");				}			}			dir = path;			if (dir.empty() || dir.Last() != separator)				dir += separator;			return dir;		}		else if (item == m_documents) {			wxChar path[MAX_PATH + 1];			if (SHGetFolderPath(0, CSIDL_PERSONAL, 0, SHGFP_TYPE_CURRENT, path) != S_OK) {				wxMessageBoxEx(_("Failed to get 'My Documents' path"));				return _T("/");			}			dir = path;			if (dir.empty() || dir.Last() != separator)				dir += separator;			return dir;		}		else if (item == m_drives)			return _T("/");		else if (GetItemParent(item) == m_drives) {			wxString text = GetItemText(item);			int pos = text.Find(_T(" "));			if (pos == -1)				return text + separator + dir;			else				return text.Left(pos) + separator + dir;		}		else#endif		if (item == GetRootItem())			return _T("/") + dir;		dir = GetItemText(item) + separator + dir;		item = GetItemParent(item);	}	return separator;}
开发者ID:wujishouwan,项目名称:FileZilla3,代码行数:53,


示例6: mutex

bool CBookmarksDialog::AddBookmark(const wxString &name, const wxString &local_dir, const CServerPath &remote_dir, bool sync){	if (local_dir.empty() && remote_dir.empty())		return false;	if ((local_dir.empty() || remote_dir.empty()) && sync)		return false;	CInterProcessMutex mutex(MUTEX_GLOBALBOOKMARKS);	CXmlFile file(wxGetApp().GetSettingsFile(_T("bookmarks")));	TiXmlElement* pDocument = file.Load();	if (!pDocument) {		wxString msg = file.GetError() + _T("/n/n") + _("The bookmark could not be added.");		wxMessageBoxEx(msg, _("Error loading xml file"), wxICON_ERROR);		return false;	}	TiXmlElement *pInsertBefore = 0;	TiXmlElement *pBookmark;	for (pBookmark = pDocument->FirstChildElement("Bookmark"); pBookmark; pBookmark = pBookmark->NextSiblingElement("Bookmark")) {		wxString remote_dir_raw;		wxString old_name = GetTextElement(pBookmark, "Name");		if (!name.CmpNoCase(old_name)) {			wxMessageBoxEx(_("Name of bookmark already exists."), _("New bookmark"), wxICON_EXCLAMATION);			return false;		}		if (name < old_name && !pInsertBefore)			pInsertBefore = pBookmark;	}	if (pInsertBefore)		pBookmark = pDocument->InsertBeforeChild(pInsertBefore, TiXmlElement("Bookmark"))->ToElement();	else		pBookmark = pDocument->LinkEndChild(new TiXmlElement("Bookmark"))->ToElement();	AddTextElement(pBookmark, "Name", name);	if (!local_dir.empty())		AddTextElement(pBookmark, "LocalDir", local_dir);	if (!remote_dir.empty())		AddTextElement(pBookmark, "RemoteDir", remote_dir.GetSafePath());	if (sync)		AddTextElementRaw(pBookmark, "SyncBrowsing", "1");	if (!file.Save(false)) {		wxString msg = wxString::Format(_("Could not write /"%s/", the bookmark could not be added: %s"), file.GetFileName(), file.GetError());		wxMessageBoxEx(msg, _("Error writing xml file"), wxICON_ERROR);		return false;	}	return true;}
开发者ID:juaristi,项目名称:filezilla,代码行数:53,


示例7: RenameFile

bool RenameFile(wxWindow* parent, wxString dir, wxString from, wxString to){	if (dir.Right(1) != _T("//") && dir.Right(1) != _T("/"))		dir += wxFileName::GetPathSeparator();#ifdef __WXMSW__	to = to.Left(255);	if ((to.Find('/') != -1) ||		(to.Find('//') != -1) ||		(to.Find(':') != -1) ||		(to.Find('*') != -1) ||		(to.Find('?') != -1) ||		(to.Find('"') != -1) ||		(to.Find('<') != -1) ||		(to.Find('>') != -1) ||		(to.Find('|') != -1))	{		wxMessageBoxEx(_("Filenames may not contain any of the following characters: / // : * ? /" < > |"), _("Invalid filename"), wxICON_EXCLAMATION, parent);		return false;	}	SHFILEOPSTRUCT op;	memset(&op, 0, sizeof(op));	from = dir + from + _T(" ");	from.SetChar(from.Length() - 1, '/0');	op.pFrom = from.wc_str();	to = dir + to + _T(" ");	to.SetChar(to.Length()-1, '/0');	op.pTo = to.wc_str();	op.hwnd = (HWND)parent->GetHandle();	op.wFunc = FO_RENAME;	op.fFlags = FOF_ALLOWUNDO;	return SHFileOperation(&op) == 0;#else	if ((to.Find('/') != -1) ||		(to.Find('*') != -1) ||		(to.Find('?') != -1) ||		(to.Find('<') != -1) ||		(to.Find('>') != -1) ||		(to.Find('|') != -1))	{		wxMessageBoxEx(_("Filenames may not contain any of the following characters: / * ? < > |"), _("Invalid filename"), wxICON_EXCLAMATION, parent);		return false;	}	return wxRename(dir + from, dir + to) == 0;#endif}
开发者ID:zedfoxus,项目名称:filezilla-client,代码行数:50,


示例8: SetDefaultValues

COptions::COptions(){	m_theOptions = this;	m_pXmlFile = 0;	m_pLastServer = 0;	SetDefaultValues();	m_save_timer.SetOwner(this);	auto const nameOptionMap = GetNameOptionMap();	LoadGlobalDefaultOptions(nameOptionMap);	CLocalPath const dir = InitSettingsDir();	CInterProcessMutex mutex(MUTEX_OPTIONS);	m_pXmlFile = new CXmlFile(dir.GetPath() + _T("filezilla.xml"));	if (!m_pXmlFile->Load()) {		wxString msg = m_pXmlFile->GetError() + _T("/n/n") + _("For this session the default settings will be used. Any changes to the settings will not be saved.");		wxMessageBoxEx(msg, _("Error loading xml file"), wxICON_ERROR);		delete m_pXmlFile;		m_pXmlFile = 0;	}	else		CreateSettingsXmlElement();	LoadOptions(nameOptionMap);}
开发者ID:Typz,项目名称:FileZilla,代码行数:28,


示例9: GetNextItem

void CLocalListView::OnMenuEnter(wxCommandEvent &event){	int item = GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);	if (item == -1)	{		wxBell();		return;	}	if (GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED) != -1)	{		wxBell();		return;	}	CLocalFileData *data = GetData(item);	if (!data || !data->dir)	{		wxBell();		return;	}	wxString error;	if (!m_pState->SetLocalDir(data->name, &error))	{		if (error != _T(""))			wxMessageBoxEx(error, _("Failed to change directory"), wxICON_INFORMATION);		else			wxBell();	}}
开发者ID:bartojak,项目名称:osp-filezilla,代码行数:31,


示例10: OnData

	virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def)	{		if (def == wxDragError ||			def == wxDragNone ||			def == wxDragCancel)			return def;		if( def == wxDragLink ) {			def = wxDragCopy;		}		wxTreeItemId hit = GetHit(wxPoint(x, y));		if (!hit)			return wxDragNone;		const CLocalPath path(GetDirFromItem(hit));		if (path.empty() || !path.IsWriteable())			return wxDragNone;		if (!GetData())			return wxDragError;		CDragDropManager* pDragDropManager = CDragDropManager::Get();		if (pDragDropManager)			pDragDropManager->pDropTarget = m_pLocalTreeView;		if (m_pDataObject->GetReceivedFormat() == m_pFileDataObject->GetFormat())			m_pLocalTreeView->m_pState->HandleDroppedFiles(m_pFileDataObject, path, def == wxDragCopy);		else		{			if (m_pRemoteDataObject->GetProcessId() != (int)wxGetProcessId())			{				wxMessageBoxEx(_("Drag&drop between different instances of FileZilla has not been implemented yet."));				return wxDragNone;			}			if (!m_pLocalTreeView->m_pState->GetServer() || !m_pRemoteDataObject->GetServer().EqualsNoPass(*m_pLocalTreeView->m_pState->GetServer()))			{				wxMessageBoxEx(_("Drag&drop between different servers has not been implemented yet."));				return wxDragNone;			}			if (!m_pLocalTreeView->m_pState->DownloadDroppedFiles(m_pRemoteDataObject, path))				return wxDragNone;		}		return def;	}
开发者ID:wujishouwan,项目名称:FileZilla3,代码行数:47,


示例11: _

void CFilterDialog::OnSaveAs(wxCommandEvent& event){	CInputDialog dlg;	dlg.Create(this, _("Enter name for filterset"), _("Please enter a unique name for this filter set"));	if (dlg.ShowModal() != wxID_OK)		return;	wxString name = dlg.GetValue();	if (name.empty())	{		wxMessageBoxEx(_("No name for the filterset given."), _("Cannot save filterset"), wxICON_INFORMATION);		return;	}	wxChoice* pChoice = XRCCTRL(*this, "ID_SETS", wxChoice);	CFilterSet set;	int old_pos = pChoice->GetSelection();	if (old_pos > 0)		set = m_filterSets[old_pos];	else		set = m_filterSets[0];	int pos = pChoice->FindString(name);	if (pos != wxNOT_FOUND)	{		if (wxMessageBoxEx(_("Given filterset name already exists, overwrite filter set?"), _("Filter set already exists"), wxICON_QUESTION | wxYES_NO) != wxYES)			return;	}	if (pos == wxNOT_FOUND)	{		pos = m_filterSets.size();		m_filterSets.push_back(set);		pChoice->Append(name);	}	else		m_filterSets[pos] = set;	m_filterSets[pos].name = name;	pChoice->SetSelection(pos);	m_currentFilterSet = pos;	SetCtrlState();	GetSizer()->Fit(this);}
开发者ID:bugiii,项目名称:filezilla3ex,代码行数:47,


示例12: wxMessageBoxEx

bool COptionsPage::DisplayError(wxWindow* pWnd, const wxString& error){	if (pWnd)		pWnd->SetFocus();	wxMessageBoxEx(error, _("Failed to validate settings"), wxICON_EXCLAMATION, this);	return false;}
开发者ID:zedfoxus,项目名称:filezilla-client,代码行数:9,


示例13: OnCheck

	void OnCheck(wxCommandEvent& event)	{		if (!event.GetSelection() && !event.IsChecked())		{			wxCheckListBox* pListBox = XRCCTRL(*this, "ID_ACTIVE", wxCheckListBox);			pListBox->Check(0);			wxMessageBoxEx(_("The filename column can neither be hidden nor moved."), _("Column properties"));		}	}
开发者ID:juaristi,项目名称:filezilla,代码行数:9,


示例14: wxGetApp

void CContextControl::CreateTab(){	wxGetApp().AddStartupProfileRecord(_T("CContextControl::CreateTab"));	Freeze();	CState* pState = 0;	// See if we can reuse an existing context	for (size_t i = 0; i < m_context_controls.size(); i++)	{		if (m_context_controls[i].tab_index != -1)			continue;		if (m_context_controls[i].pState->IsRemoteConnected() ||			!m_context_controls[i].pState->IsRemoteIdle())			continue;		pState = m_context_controls[i].pState;		m_context_controls.erase(m_context_controls.begin() + i);		if (m_current_context_controls > (int)i)			m_current_context_controls--;		break;	}	if (!pState)	{		pState = CContextManager::Get()->CreateState(m_pMainFrame);		if (!pState->CreateEngine())		{			wxMessageBoxEx(_("Failed to initialize FTP engine"));		}	}	// Restore last server and path	CServer last_server;	CServerPath last_path;	if (COptions::Get()->GetLastServer(last_server) && last_path.SetSafePath(COptions::Get()->GetOption(OPTION_LASTSERVERPATH)))		pState->SetLastServer(last_server, last_path);	CreateContextControls(pState);	pState->GetRecursiveOperationHandler()->SetQueue(m_pMainFrame->GetQueue());	wxString localDir = COptions::Get()->GetOption(OPTION_LASTLOCALDIR);	if (!pState->SetLocalDir(localDir))		pState->SetLocalDir(_T("/"));	CContextManager::Get()->SetCurrentContext(pState);	if (!m_pMainFrame->RestoreSplitterPositions())		m_pMainFrame->SetDefaultSplitterPositions();	if (m_tabs)		m_tabs->SetSelection(m_tabs->GetPageCount() - 1);	Thaw();}
开发者ID:bartojak,项目名称:osp-filezilla,代码行数:56,


示例15: mutex

void CFilterDialog::SaveFilters(){	CInterProcessMutex mutex(MUTEX_FILTERS);	CXmlFile xml(wxGetApp().GetSettingsFile(_T("filters")));	TiXmlElement* pDocument = xml.Load();	if (!pDocument) {		wxString msg = xml.GetError() + _T("/n/n") + _("Any changes made to the filters could not be saved.");		wxMessageBoxEx(msg, _("Error loading xml file"), wxICON_ERROR);		return;	}	TiXmlElement *pFilters = pDocument->FirstChildElement("Filters");	while (pFilters) {		pDocument->RemoveChild(pFilters);		pFilters = pDocument->FirstChildElement("Filters");	}	pFilters = pDocument->LinkEndChild(new TiXmlElement("Filters"))->ToElement();	for (auto const& filter : m_globalFilters) {		TiXmlElement* pElement = new TiXmlElement("Filter");		SaveFilter(pElement, filter);		pFilters->LinkEndChild(pElement);	}	TiXmlElement *pSets = pDocument->FirstChildElement("Sets");	while (pSets) {		pDocument->RemoveChild(pSets);		pSets = pDocument->FirstChildElement("Sets");	}	pSets = pDocument->LinkEndChild(new TiXmlElement("Sets"))->ToElement();	SetTextAttribute(pSets, "Current", wxString::Format(_T("%d"), m_currentFilterSet));	for (auto const& set : m_globalFilterSets) {		TiXmlElement* pSet = pSets->LinkEndChild(new TiXmlElement("Set"))->ToElement();		if (!set.name.empty()) {			AddTextElement(pSet, "Name", set.name);		}		for (unsigned int i = 0; i < set.local.size(); ++i) {			TiXmlElement* pItem = pSet->LinkEndChild(new TiXmlElement("Item"))->ToElement();			AddTextElement(pItem, "Local", set.local[i] ? _T("1") : _T("0"));			AddTextElement(pItem, "Remote", set.remote[i] ? _T("1") : _T("0"));		}	}	xml.Save(true);	m_filters_disabled = false;}
开发者ID:juaristi,项目名称:filezilla,代码行数:54,


示例16: wxMessageBoxEx

bool COptionsPageConnectionSFTP::LoadProcess(){	if (m_initialized)		return m_pProcess != 0;	m_initialized = true;	wxString executable = m_pOptions->GetOption(OPTION_FZSFTP_EXECUTABLE);	int pos = executable.Find(wxFileName::GetPathSeparator(), true);	if (pos == -1)	{		wxMessageBoxEx(_("fzputtygen could not be started./nPlease make sure this executable exists in the same directory as the main FileZilla executable."), _("Error starting program"), wxICON_EXCLAMATION);		return false;	}	else	{		executable = executable.Left(pos + 1) + _T("fzputtygen");#ifdef __WXMSW__		executable += _T(".exe");#endif		// Restore quotes		if (!executable.empty() && executable[0] == '"')			executable += '"';	}	m_pProcess = new wxProcess(this);	m_pProcess->Redirect();	if (!wxExecute(executable, wxEXEC_ASYNC, m_pProcess))	{		delete m_pProcess;		m_pProcess = 0;		wxMessageBoxEx(_("fzputtygen could not be started./nPlease make sure this executable exists in the same directory as the main FileZilla executable."), _("Error starting program"), wxICON_EXCLAMATION);		return false;	}	return true;}
开发者ID:Typz,项目名称:FileZilla,代码行数:39,


示例17: MenuMkdir

// Create a new Directory and enter the new Directoryvoid CLocalListView::OnMenuMkdirChgDir(wxCommandEvent& event) {	wxString newdir = MenuMkdir();	if (newdir.empty()) {		return;	}		// OnMenuEnter	wxString error;	if (!m_pState->SetLocalDir(newdir, &error))	{		if (error != _T(""))			wxMessageBoxEx(error, _("Failed to change directory"), wxICON_INFORMATION);		else			wxBell();	}}
开发者ID:bartojak,项目名称:osp-filezilla,代码行数:18,


示例18: _T

void CLocalViewHeader::OnTextEnter(wxCommandEvent&){#ifdef __WXGTK__	m_autoCompletionText = _T("");#endif	wxString dir = m_pComboBox->GetValue();	wxString error;	if (!m_pState->SetLocalDir(dir, &error))	{		if (!error.empty())			wxMessageBoxEx(error, _("Failed to change directory"), wxICON_INFORMATION);		else			wxBell();		m_pComboBox->SetValue(m_pState->GetLocalDir().GetPath());	}}
开发者ID:wy182000,项目名称:filezilla-filezillserver-vs2013,代码行数:18,


示例19: wxCHECK

bool CXmlFile::Save(bool printError){	m_error.clear();	wxCHECK(!m_fileName.empty(), false);	wxCHECK(m_pDocument, false);	bool res = SaveXmlFile();	m_modificationTime = CLocalFileSystem::GetModificationTime(m_fileName);	if (!res && printError) {		wxASSERT(!m_error.empty());		wxString msg = wxString::Format(_("Could not write /"%s/":"), m_fileName);		wxMessageBoxEx(msg + _T("/n") + m_error, _("Error writing xml file"), wxICON_ERROR);	}	return res;}
开发者ID:Typz,项目名称:FileZilla,代码行数:18,


示例20: version

int CUpdateDialog::ShowModal(){	wxString version(PACKAGE_VERSION, wxConvLocal);	if (version.empty() || version[0] < '0' || version[0] > '9')	{		wxMessageBoxEx(_("Executable contains no version info, cannot check for updates."), _("Check for updates failed"), wxICON_ERROR, parent_);		return wxID_CANCEL;	}	if (!Load(parent_, _T("ID_UPDATE_DIALOG")))		return wxID_CANCEL;	LoadPanel(_T("ID_CHECKING_PANEL"));	LoadPanel(_T("ID_FAILURE_PANEL"));	LoadPanel(_T("ID_NEWVERSION_PANEL"));	LoadPanel(_T("ID_LATEST_PANEL"));	if( panels_.size() != 4 ) {		return wxID_CANCEL;	}	wxAnimation a = CThemeProvider::Get()->CreateAnimation(_T("ART_THROBBER"), wxSize(16,16));	XRCCTRL(*this, "ID_WAIT_CHECK", wxAnimationCtrl)->SetMinSize(a.GetSize());	XRCCTRL(*this, "ID_WAIT_CHECK", wxAnimationCtrl)->SetAnimation(a);	XRCCTRL(*this, "ID_WAIT_CHECK", wxAnimationCtrl)->Play();	XRCCTRL(*this, "ID_WAIT_DOWNLOAD", wxAnimationCtrl)->SetMinSize(a.GetSize());	XRCCTRL(*this, "ID_WAIT_DOWNLOAD", wxAnimationCtrl)->SetAnimation(a);	XRCCTRL(*this, "ID_WAIT_DOWNLOAD", wxAnimationCtrl)->Play();	Wrap();	XRCCTRL(*this, "ID_DETAILS", wxTextCtrl)->Hide();	UpdaterState s = updater_.GetState();	UpdaterStateChanged( s, updater_.AvailableBuild() );	updater_.AddHandler(*this);	updater_.RunIfNeeded();	int ret = wxDialogEx::ShowModal();	updater_.RemoveHandler(*this);	return ret;}
开发者ID:RanesJan,项目名称:it340midterm,代码行数:44,


示例21: _T

bool COptionsPageConnectionSFTP::Send(const wxString& cmd){	if (!m_pProcess)		return false;	const wxWX2MBbuf buf = (cmd + _T("/n")).mb_str();	const size_t len = strlen(buf);	wxOutputStream* stream = m_pProcess->GetOutputStream();	stream->Write((const char*)buf, len);	if (stream->GetLastError() != wxSTREAM_NO_ERROR || stream->LastWrite() != len)	{		wxMessageBoxEx(_("Could not send command to fzputtygen."), _("Command failed"), wxICON_EXCLAMATION);		return false;	}	return true;}
开发者ID:Typz,项目名称:FileZilla,代码行数:19,


示例22: GetPathFromItem

void CRemoteTreeView::OnMenuDelete(wxCommandEvent&){	if (!m_pState->IsRemoteIdle())		return;	if (!m_contextMenuItem)		return;	const CServerPath& path = GetPathFromItem(m_contextMenuItem);	if (path.empty())		return;	if (wxMessageBoxEx(_("Really delete all selected files and/or directories from the server?"), _("Confirmation needed"), wxICON_QUESTION | wxYES_NO, this) != wxYES)		return;	const bool hasParent = path.HasParent();	CRecursiveOperation* pRecursiveOperation = m_pState->GetRecursiveOperationHandler();	CServerPath startDir;	if (hasParent)	{		const wxString& name = GetItemText(m_contextMenuItem);		startDir = path.GetParent();		pRecursiveOperation->AddDirectoryToVisit(startDir, name);	}	else	{		startDir = path;		pRecursiveOperation->AddDirectoryToVisit(startDir, _T(""));	}	CServerPath currentPath;	const wxTreeItemId selected = GetSelection();	if (selected)		currentPath = GetPathFromItem(selected);	if (!currentPath.empty() && (path == currentPath || path.IsParentOf(currentPath, false)))		currentPath = startDir;	CFilterManager filter;	pRecursiveOperation->StartRecursiveOperation(CRecursiveOperation::recursive_delete, startDir, filter.GetActiveFilters(false), !hasParent, currentPath);}
开发者ID:oneminot,项目名称:filezilla3,代码行数:42,


示例23: wxCHECK

bool CXmlFile::Save(bool printError){	m_error.clear();	wxCHECK(!m_fileName.empty(), false);	wxCHECK(m_document, false);	UpdateMetadata();	bool res = SaveXmlFile();	m_modificationTime = fz::local_filesys::get_modification_time(fz::to_native(m_fileName));	if (!res && printError) {		assert(!m_error.empty());		wxString msg = wxString::Format(_("Could not write /"%s/":"), m_fileName);		wxMessageBoxEx(msg + _T("/n") + m_error, _("Error writing xml file"), wxICON_ERROR);	}	return res;}
开发者ID:zedfoxus,项目名称:filezilla-client,代码行数:20,


示例24: wxBell

void CLocalListView::OnNavigationEvent(bool forward){	if (!forward)	{		if (!m_hasParent)		{			wxBell();			return;		}		wxString error;		if (!m_pState->SetLocalDir(_T(".."), &error))		{			if (error != _T(""))				wxMessageBoxEx(error, _("Failed to change directory"), wxICON_INFORMATION);			else				wxBell();		}	}}
开发者ID:bartojak,项目名称:osp-filezilla,代码行数:20,


示例25: XRCCTRL

void CFilterDialog::OnFilterSelect(wxCommandEvent& event){	wxCheckListBox* pLocal = XRCCTRL(*this, "ID_LOCALFILTERS", wxCheckListBox);	wxCheckListBox* pRemote = XRCCTRL(*this, "ID_REMOTEFILTERS", wxCheckListBox);	int item = event.GetSelection();	const CFilter& filter = m_filters[item];	const bool localOnly = filter.IsLocalFilter();	if (localOnly && event.GetEventObject() != pLocal)	{		pRemote->Check(item, false);		wxMessageBoxEx(_("Selected filter only works for local files."), _("Cannot select filter"), wxICON_INFORMATION);		return;	}	if (m_shiftClick)	{		if (event.GetEventObject() == pLocal)		{			if (!localOnly)				pRemote->Check(item, pLocal->IsChecked(event.GetSelection()));		}		else			pLocal->Check(item, pRemote->IsChecked(event.GetSelection()));	}	if (m_currentFilterSet)	{		m_filterSets[0] = m_filterSets[m_currentFilterSet];		m_currentFilterSet = 0;		wxChoice* pChoice = XRCCTRL(*this, "ID_SETS", wxChoice);		pChoice->SetSelection(0);	}	bool localChecked = pLocal->IsChecked(event.GetSelection());	bool remoteChecked = pRemote->IsChecked(event.GetSelection());	m_filterSets[0].local[item] = localChecked;	m_filterSets[0].remote[item] = remoteChecked;}
开发者ID:bugiii,项目名称:filezilla3ex,代码行数:41,


示例26: wxMessageBoxEx

void CBookmarksDialog::OnEndLabelEdit(wxTreeEvent& event){	if (event.IsEditCancelled())		return;	wxTreeItemId item = event.GetItem();	if (item != m_pTree->GetSelection())	{		if (!Verify())		{			event.Veto();			return;		}	}	if (!item || item == m_bookmarks_global || item == m_bookmarks_site)	{		event.Veto();		return;	}	wxString name = event.GetLabel();	wxTreeItemId parent = m_pTree->GetItemParent(item);	wxTreeItemIdValue cookie;	for (wxTreeItemId child = m_pTree->GetFirstChild(parent, cookie); child.IsOk(); child = m_pTree->GetNextChild(parent, cookie))	{		if (child == item)			continue;		if (!name.CmpNoCase(m_pTree->GetItemText(child)))		{			wxMessageBoxEx(_("Name already exists"), _("Cannot rename entry"), wxICON_EXCLAMATION, this);			event.Veto();			return;		}	}	m_pTree->SortChildren(parent);}
开发者ID:juaristi,项目名称:filezilla,代码行数:40,


示例27: XRCCTRL

bool COptionsPageLanguage::SavePage(){	if (!m_was_selected)		return true;	wxListBox* pListBox = XRCCTRL(*this, "ID_LANGUAGES", wxListBox);	if (pListBox->GetSelection() == wxNOT_FOUND)		return true;	const int selection = pListBox->GetSelection();	wxString code;	if (selection > 0)		code = m_locale[selection - 1].code;#ifdef __WXGTK__	m_pOptions->SetOption(OPTION_LANGUAGE, code);#else	bool successful = false;	if (code == _T(""))	{		wxGetApp().SetLocale(wxLANGUAGE_DEFAULT);		// Default language cannot fail, has to silently fall back to English		successful = true;	}	else	{		const wxLanguageInfo* pInfo = wxLocale::FindLanguageInfo(code);		if (pInfo)			successful = wxGetApp().SetLocale(pInfo->Language);	}	if (successful)		m_pOptions->SetOption(OPTION_LANGUAGE, code);	else		wxMessageBoxEx(wxString::Format(_("Failed to set language to %s, using default system language"), pListBox->GetStringSelection().c_str()), _("Failed to change language"), wxICON_EXCLAMATION, this);#endif	return true;}
开发者ID:bartojak,项目名称:osp-filezilla,代码行数:40,



注:本文中的wxMessageBoxEx函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ wxMilliSleep函数代码示例
C++ wxMessageBox函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。