LRESULT CDuiFrameWnd::OnEndReached(HWND hwnd, WPARAM wParam, LPARAM lParam ) { Play(GetNextPath(true)); return TRUE; }
std::string RecpathConfig::GetNextPath() { return GetNextPath(std::string()); }
void CDuiFrameWnd::OnClick( TNotifyUI& msg ) { if( msg.pSender->GetName() == _T("btnPlaylistShow") ) { ShowPlaylist(true); } else if( msg.pSender->GetName() == _T("btnPlaylistHide") ) { ShowPlaylist(false); } else if( msg.pSender->GetName() == _T("btnFastBackward") ) { m_cAVPlayer.SeekBackward(); ::PostMessage(*this, WM_USER_POS_CHANGED, 0, m_cAVPlayer.GetPos()); } else if( msg.pSender->GetName() == _T("btnFastForward") ) { m_cAVPlayer.SeekForward(); ::PostMessage(*this, WM_USER_POS_CHANGED, 0, m_cAVPlayer.GetPos()); } else if( msg.pSender->GetName() == _T("btnPrevious") ) { Play(GetNextPath(false)); } else if( msg.pSender->GetName() == _T("btnNext") ) { Play(GetNextPath(true)); } else if( msg.pSender->GetName() == _T("btnPlay") ) { Play(true); } else if( msg.pSender->GetName() == _T("btnPause") ) { Play(false); } else if( msg.pSender->GetName() == _T("btnStop") ) { Stop(); } else if( msg.pSender->GetName() == _T("btnOpen") || msg.pSender->GetName() == _T("btnOpenMini") ) { OpenFileDialog(); } else if( msg.pSender->GetName() == _T("btnRefresh") ) { CEditUI* pUI = static_cast<CEditUI*>(m_PaintManager.FindControl(_T("editURL"))); Play(pUI->GetText()); } else if( msg.pSender->GetName() == _T("btnScreenFull") ) { FullScreen(true); } else if( msg.pSender->GetName() == _T("btnScreenNormal") ) { FullScreen(false); } else if( msg.pSender->GetName() == _T("btnVolume") ) { m_cAVPlayer.Volume(0); m_PaintManager.FindControl(_T("btnVolumeZero"))->SetVisible(true); msg.pSender->SetVisible(false); } else if( msg.pSender->GetName() == _T("btnVolumeZero") ) { CSliderUI* pUI = static_cast<CSliderUI*>(m_PaintManager.FindControl(_T("sliderVol"))); m_cAVPlayer.Volume(pUI->GetValue()); m_PaintManager.FindControl(_T("btnVolume"))->SetVisible(true); msg.pSender->SetVisible(false); } else if( msg.pSender->GetName() == _T("btnPlayMode") ) { CMenuWnd *pMenu = new CMenuWnd(_T("menu.xml")); POINT pt = {msg.ptMouse.x, msg.ptMouse.y}; CDuiRect rc = msg.pSender->GetPos(); pt.x = rc.left; pt.y = rc.bottom; pMenu->Init(&m_PaintManager, pt); pMenu->ShowWindow(TRUE); } else if (msg.pSender->GetName() == _T("btnAdd")) { OpenFileDialog(); } else if (msg.pSender->GetName() == _T("btnDelete")) { DeleteFileItem(); } else if (msg.pSender->GetTag() == U_TAG_PLAYLIST) { CDuiString strPath = msg.pSender->GetName(); Play(strPath.GetData()); } __super::OnClick(msg); }