本文整理汇总了C++中CGUIDialog::Show方法的典型用法代码示例。如果您正苦于以下问题:C++ CGUIDialog::Show方法的具体用法?C++ CGUIDialog::Show怎么用?C++ CGUIDialog::Show使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CGUIDialog
的用法示例。
在下文中一共展示了CGUIDialog::Show方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProcessMessage
//.........这里部分代码省略.........
g_application.PlayMedia(*((*list)[0]), playlist);
else
{
// Handle "shuffled" option if present
if (list->HasProperty("shuffled") && list->GetProperty("shuffled").isBoolean())
g_playlistPlayer.SetShuffle(playlist, list->GetProperty("shuffled").asBoolean(), false);
// Handle "repeat" option if present
if (list->HasProperty("repeat") && list->GetProperty("repeat").isInteger())
g_playlistPlayer.SetRepeat(playlist, (PLAYLIST::REPEAT_STATE)list->GetProperty("repeat").asInteger(), false);
g_playlistPlayer.Add(playlist, (*list));
g_playlistPlayer.Play(pMsg->param1);
}
}
delete list;
}
else if (pMsg->param1 == PLAYLIST_MUSIC || pMsg->param1 == PLAYLIST_VIDEO)
{
if (g_playlistPlayer.GetCurrentPlaylist() != pMsg->param1)
g_playlistPlayer.SetCurrentPlaylist(pMsg->param1);
PlayListPlayerPlay(pMsg->param2);
}
}
break;
case TMSG_MEDIA_RESTART:
g_application.Restart(true);
break;
case TMSG_PICTURE_SHOW:
{
CGUIWindowSlideShow *pSlideShow = (CGUIWindowSlideShow *)g_windowManager.GetWindow(WINDOW_SLIDESHOW);
if (!pSlideShow) return ;
// stop playing file
if (g_application.m_pPlayer->IsPlayingVideo()) g_application.StopPlaying();
if (g_windowManager.GetActiveWindow() == WINDOW_FULLSCREEN_VIDEO)
g_windowManager.PreviousWindow();
g_application.ResetScreenSaver();
g_application.WakeUpScreenSaverAndDPMS();
g_graphicsContext.Lock();
if (g_windowManager.GetActiveWindow() != WINDOW_SLIDESHOW)
g_windowManager.ActivateWindow(WINDOW_SLIDESHOW);
if (URIUtils::IsZIP(pMsg->strParam) || URIUtils::IsRAR(pMsg->strParam)) // actually a cbz/cbr
{
CFileItemList items;
CURL pathToUrl;
if (URIUtils::IsZIP(pMsg->strParam))
pathToUrl = URIUtils::CreateArchivePath("zip", CURL(pMsg->strParam), "");
else
pathToUrl = URIUtils::CreateArchivePath("rar", CURL(pMsg->strParam), "");
CUtil::GetRecursiveListing(pathToUrl.Get(), items, g_advancedSettings.m_pictureExtensions, XFILE::DIR_FLAG_NO_FILE_DIRS);
if (items.Size() > 0)
{
pSlideShow->Reset();
for (int i=0;i<items.Size();++i)
{
pSlideShow->Add(items[i].get());
}
示例2: ProcessMessage
//.........这里部分代码省略.........
}
g_playlistPlayer.ClearPlaylist(playlist);
g_playlistPlayer.SetCurrentPlaylist(playlist);
//For single item lists try PlayMedia. This covers some more cases where a playlist is not appropriate
//It will fall through to PlayFile
if (list->Size() == 1 && !(*list)[0]->IsPlayList())
g_application.PlayMedia(*((*list)[0]), playlist);
else
{
g_playlistPlayer.Add(playlist, (*list));
g_playlistPlayer.Play(pMsg->dwParam1);
}
}
delete list;
}
else if (pMsg->dwParam1 == PLAYLIST_MUSIC || pMsg->dwParam1 == PLAYLIST_VIDEO)
{
if (g_playlistPlayer.GetCurrentPlaylist() != (int)pMsg->dwParam1)
g_playlistPlayer.SetCurrentPlaylist(pMsg->dwParam1);
PlayListPlayerPlay(pMsg->dwParam2);
}
}
break;
case TMSG_MEDIA_RESTART:
g_application.Restart(true);
break;
case TMSG_PICTURE_SHOW:
{
CGUIWindowSlideShow *pSlideShow = (CGUIWindowSlideShow *)g_windowManager.GetWindow(WINDOW_SLIDESHOW);
if (!pSlideShow) return ;
// stop playing file
if (g_application.IsPlayingVideo()) g_application.StopPlaying();
if (g_windowManager.GetActiveWindow() == WINDOW_FULLSCREEN_VIDEO)
g_windowManager.PreviousWindow();
g_application.ResetScreenSaver();
g_application.WakeUpScreenSaverAndDPMS();
g_graphicsContext.Lock();
if (g_windowManager.GetActiveWindow() != WINDOW_SLIDESHOW)
g_windowManager.ActivateWindow(WINDOW_SLIDESHOW);
if (URIUtils::IsZIP(pMsg->strParam) || URIUtils::IsRAR(pMsg->strParam)) // actually a cbz/cbr
{
CFileItemList items;
CStdString strPath;
if (URIUtils::IsZIP(pMsg->strParam))
URIUtils::CreateArchivePath(strPath, "zip", pMsg->strParam.c_str(), "");
else
URIUtils::CreateArchivePath(strPath, "rar", pMsg->strParam.c_str(), "");
CUtil::GetRecursiveListing(strPath, items, g_settings.m_pictureExtensions);
if (items.Size() > 0)
{
pSlideShow->Reset();
for (int i=0;i<items.Size();++i)
{
pSlideShow->Add(items[i].get());
}