, __pArtistLabel(null)\r
, __pProgressBar(null)\r
, __pPresentationModel(null)\r
+ , __isLongPressed(false)\r
{\r
AppLogDebug("ENTER");\r
AppLogDebug("EXIT");\r
AppLogDebug("PlayerPresentationModel::GetInstance() failed");\r
return E_FAILURE;\r
}\r
+ __pPresentationModel->AddMusicPlayerEventListener(*this);\r
\r
__pThumbnailLabel = static_cast<Label*>(GetControl(IDC_CONTENTS_THUMBNAIL));\r
__pThumbnailLabel->SetBackgroundBitmap(*__pPresentationModel->GetPlayContentThumbnail());\r
__pThumbnailLabel->AddTouchEventListener(*this);\r
\r
+\r
// String miniPlayerTitleText;\r
// miniPlayerTitleText.Format(STRING_LENGTH, L"%ls - %ls", __pPresentationModel->GetPlayContentTitle()->GetPointer(), __pPresentationModel->GetPlayContentArtist()->GetPointer());\r
//\r
__pProgressBar->SetRange(INIT_VALUE, PROGRESS_MAX_VALUE);\r
\r
delete pContentInfo;\r
+\r
+ Invalidate(true);\r
AppLogDebug("EXIT");\r
}\r
\r
pSceneManager->GoForward(ForwardSceneTransition(IDSCN_PLAYER));\r
}\r
}\r
+ else if(__pMinPlayerPrevButton->GetHashCode() == source.GetHashCode() ||\r
+ __pMinPlayerNextButton->GetHashCode() == source.GetHashCode())\r
+ {\r
+ __isLongPressed = false;\r
+ }\r
AppLogDebug("EXIT");\r
}\r
\r
AppLogDebug("ENTER");\r
if (__pMinPlayerPrevButton->GetHashCode() == source.GetHashCode() )\r
{\r
- // Empty statement\r
+ __isLongPressed = true;\r
+ __pPresentationModel->Rewind();\r
AppLogDebug("__pMinPlayerPrevButton");\r
}\r
else if (__pMinPlayerNextButton->GetHashCode() == source.GetHashCode() )\r
{\r
- // Empty statement\r
+ __isLongPressed = true;\r
+ __pPresentationModel->Forward();\r
AppLogDebug("__pMinPlayerNextButton");\r
}\r
else\r
MiniPlayer::OnTouchReleased(const Tizen::Ui::Control& source, const Tizen::Graphics::Point& currentPosition, const Tizen::Ui::TouchEventInfo& touchInfo)\r
{\r
AppLogDebug("ENTER");\r
- if (__pMinPlayerPrevButton->GetHashCode() == source.GetHashCode() )\r
+ if (__isLongPressed == true)\r
{\r
- // Empty statement\r
- AppLogDebug("__pMinPlayerPrevButton");\r
- }\r
- else if (__pMinPlayerNextButton->GetHashCode() == source.GetHashCode() )\r
- {\r
- // Empty statement\r
- AppLogDebug("__pMinPlayerNextButton");\r
+ __pPresentationModel->StopForwardRewind();\r
}\r
else\r
{\r
- // Empty statement\r
+ if (__pMinPlayerPrevButton->GetHashCode() == source.GetHashCode() )\r
+ {\r
+ if (__pPresentationModel->GetContentListCount() > 1)\r
+ {\r
+ while (__pPresentationModel->IsFileExist(__pPresentationModel->GetPreviousContentIndex()) == false\r
+ && __pPresentationModel->GetContentListCount() > 0)\r
+ {\r
+ __pPresentationModel->RemoveContent(*__pPresentationModel->GetContentPath(__pPresentationModel->GetPreviousContentIndex()));\r
+ }\r
+ }\r
+\r
+ if (__pPresentationModel->GetContentListCount() <= 1)\r
+ {\r
+ MessageBox messageBox;\r
+ messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"), MSGBOX_STYLE_NONE, 1000);\r
+\r
+ int modalResult = 0;\r
+ messageBox.ShowAndWait(modalResult);\r
+ }\r
+ else\r
+ {\r
+ __pPresentationModel->MovePreviousContent(true);\r
+ if (__pPresentationModel->GetPlayerState() != PLAYER_STATE_PAUSED)\r
+ {\r
+ __pPresentationModel->Play(__pPresentationModel->GetCurrentContentIndex(), MIN_PLAY_STATE_SLIDER_COUNT);\r
+ }\r
+ }\r
+ }\r
+ else if (__pMinPlayerNextButton->GetHashCode() == source.GetHashCode() )\r
+ {\r
+ if (__pPresentationModel->GetContentListCount() > 1)\r
+ {\r
+ while (__pPresentationModel->IsFileExist(__pPresentationModel->GetNextContentIndex()) == false\r
+ && __pPresentationModel->GetContentListCount() > 0)\r
+ {\r
+ __pPresentationModel->RemoveContent(*__pPresentationModel->GetContentPath(__pPresentationModel->GetNextContentIndex()));\r
+ }\r
+ }\r
+\r
+ if (__pPresentationModel->GetContentListCount() <= 1)\r
+ {\r
+ MessageBox messageBox;\r
+ messageBox.Construct(L"", ResourceManager::GetString(L"IDS_MUSIC_HEADER_NO_SONGS"), MSGBOX_STYLE_NONE, 1000);\r
+\r
+ int modalResult = 0;\r
+ messageBox.ShowAndWait(modalResult);\r
+ }\r
+ else\r
+ {\r
+ __pPresentationModel->MoveNextContent();\r
+ if (__pPresentationModel->GetPlayerState() != PLAYER_STATE_PAUSED)\r
+ {\r
+ __pPresentationModel->Play(__pPresentationModel->GetCurrentContentIndex(), MIN_PLAY_STATE_SLIDER_COUNT);\r
+ }\r
+ }\r
+ }\r
+ else\r
+ {\r
+ // Empty statement\r
+ }\r
}\r
AppLogDebug("EXIT");\r
}\r
AppLogDebug("ENTER");\r
__pProgressBar->SetValue(__pPresentationModel->GetPlayPosition());\r
__pProgressBar->Draw(true);\r
- __pPresentationModel->AddMusicPlayerEventListener(*this);\r
AppLogDebug("EXIT");\r
}\r
\r
MiniPlayer::MiniPlayerDeactivate(void)\r
{\r
AppLogDebug("ENTER");\r
- __pPresentationModel->RemoveMusicPlayerEventListener(*this);\r
AppLogDebug("EXIT");\r
-}
\ No newline at end of file
+}\r
static const int TRANSPARENT_COLOR = 0x00000000;
-static const int MAX_PLAY_STATE_SLIDER_COUNT = 100;
-static const int MIN_PLAY_STATE_SLIDER_COUNT = 0;
-
static const int MIN_VOLUME_SLIDER_COUNT = 0;
static const int MAX_VOLUME_SLIDER_COUNT = 15;
UpdateSplitBarState();
TogglePlayPauseImage(PLAYER_STATE_CLOSED);
+ __pPlayerPresentationModel->AddMusicPlayerEventListener(*this);
+
AppLogDebug("EXIT");
return ThumbnailBase::Construct();
}
SetKeyCapture(KEY_SIDE_DOWN);
*/
- __pPlayerPresentationModel->AddMusicPlayerEventListener(*this);
if (previousSceneId != IDSCN_MUSIC_SETTING
&& previousSceneId != IDSCN_PLAYLIST_CREATOR
&& previousSceneId != IDSCN_CONTENT_DETAIL)
const Tizen::Ui::Scenes::SceneId& nextSceneId)
{
AppLogDebug("ENTER");
- __pPlayerPresentationModel->RemoveMusicPlayerEventListener(*this);
CancelAllThumbnailRequest();
AppLogDebug("EXIT");
}
__pThumbnail = null;
pThumbnailLabel->Invalidate(true);
AppLogDebug("EXIT");
-}
\ No newline at end of file
+}