void BaseForm::OnFormBackRequested(Form& source) { SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); pSceneManager->GoBackward(BackwardSceneTransition()); }
void LocationMapForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) { SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); switch (actionId) { case ID_BUTTON_SELECT: pSceneManager->GoBackward(BackwardSceneTransition()); Tizen::Ui::Controls::Frame* pFrame = Application::GetInstance()->GetAppFrame()->GetFrame(); AppLog("test====1"); if (pSceneManager->GetCurrentSceneId().Equals(SCENE_CREATION, true)) { AppLog("test====2"); CreateProfileForm *pCreateProfileForm = static_cast< CreateProfileForm* >(pFrame->GetControl(FORM_CREATION)); if (pCreateProfileForm != NULL) { pCreateProfileForm->SetMap(this->__latitude, this->__longitude); } } else if (pSceneManager->GetCurrentSceneId().Equals(SCENE_EDITION, true)) { AppLog("test====3"); EditProfileForm *pEditProfileForm = static_cast< EditProfileForm* >(pFrame->GetControl(FORM_EDITION)); AppLog("test====3-1"); if (pEditProfileForm != NULL) { pEditProfileForm->SetMap(this->__latitude, this->__longitude); } } AppLog("test====4"); break; } }
void Form2::OnFormBackRequested(Tizen::Ui::Controls::Form& source) { SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT)); }
result Enrollment::DisplayText(ByteBuffer& txBuffer, unsigned long buflen) { String data; char* pBuffer = null; result res = E_SUCCESS; txBuffer.Flip(); pBuffer = (char*) (txBuffer.GetPointer()); data.SetCapacity(buflen + 20); res = data.Append(pBuffer); TryReturn(res == E_SUCCESS, res, "Append Failed"); txBuffer.Clear(); if (data == L"__HELLO__") { EnableControl(true); __isConnected = true; return res; } if (__isConnected == false) { AppLog( "Server hasn't received Initial message so all incoming content is discarded"); // Remove created NetEndPoint delete __pUdpEndpoint; __pUdpEndpoint = null; return res; } if (data == L"__CLOSE__") { SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); pSceneManager->GoBackward(BackwardSceneTransition(SCENE_CALENDAR)); OnClose(); return res; } int i = 0; if (data.Contains(__pWorkList[i]->GetText())) { __pWorkList[i++]->SetSelected(true); } if (data.Contains(__pWorkList[i]->GetText())) { __pWorkList[i++]->SetSelected(true); } if (data.Contains(__pWorkList[i]->GetText())) { __pWorkList[i++]->SetSelected(true); } if (data.Contains(__pWorkList[i]->GetText())) { __pWorkList[i++]->SetSelected(true); } TryReturn(res == E_SUCCESS, res, "AppendText Failed"); for (int k = 0; k < MAX_WORK_COUNT; k++) { __pWorkList[k]->RequestRedraw(); } return res; }
void ProfileDetailForm::DeleteProfile(void) { ProfileListForm *pProfileListForm = static_cast< ProfileListForm* >(Application::GetInstance()->GetAppFrame()->GetFrame()->GetControl(FORM_LIST)); if (pProfileListForm != NULL) { if (pProfileListForm->DeleteProfile(__currentID)) { SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); pSceneManager->GoBackward(BackwardSceneTransition(SCENE_LIST)); } } else { MessageBox messageBox; String getError, getFailDelete; Application::GetInstance()->GetAppResource()->GetString(IDS_ERROR, getError); Application::GetInstance()->GetAppResource()->GetString(IDS_FAIL_DELETE, getFailDelete); messageBox.Construct(getError, getFailDelete, MSGBOX_STYLE_OK, 0); int doModal; messageBox.ShowAndWait(doModal); } }
void ProfileDetailForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source) { SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); pSceneManager->GoBackward(BackwardSceneTransition(SCENE_LIST)); }
void EditEventForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source) { SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); pSceneManager->GoBackward(BackwardSceneTransition()); }
void DeviceInfoForm::OnFormBackRequested(Controls::Form& source) { SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); pSceneManager->GoBackward(BackwardSceneTransition()); }
void CreateProfileForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) { SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); switch (actionId) { case ID_BUTTON_SAVE: if (__pProfileNameEditField->GetText().IsEmpty()) { int doModal; MessageBox messageBox; String getError, getProfileNameError; AppResource * pAppResource = Application::GetInstance()->GetAppResource(); pAppResource->GetString(IDS_PROFILE_NAME_ERROR, getProfileNameError); pAppResource->GetString(IDS_ERROR, getError); messageBox.Construct(getError, getProfileNameError, MSGBOX_STYLE_OK, 0); messageBox.ShowAndWait(doModal); } else { pSceneManager->GoBackward(BackwardSceneTransition()); ProfileListForm *pProfileListForm = static_cast< ProfileListForm* >(Application::GetInstance()->GetAppFrame()->GetFrame()->GetControl(FORM_LIST)); if (pProfileListForm != NULL) { long long id; DateTime startDateTime, dueDateTime; Tizen::System::SystemTime::GetTicks(id); startDateTime.SetValue(__pStartEditDate->GetYear(), __pStartEditDate->GetMonth(), __pStartEditDate->GetDay(), __pStartEditTime->GetHour(), __pStartEditTime->GetMinute(), 0); dueDateTime.SetValue(__pDueEditDate->GetYear(), __pDueEditDate->GetMonth(), __pDueEditDate->GetDay(), __pDueEditTime->GetHour(), __pDueEditTime->GetMinute(), 0); _profile_t_ profileSave = { id, __pProfileNameEditField->GetText(), startDateTime, dueDateTime, __latitude, __longitude, __pVolumeSlider->GetValue(), __pWifiCheckButton->IsSelected()?1:0, __pDescriptionEditField->GetText() }; pProfileListForm->SaveUsingmodeProfile(profileSave); //Create } } break; case ID_LOCATION_BUTTON: pSceneManager->GoForward(ForwardSceneTransition(SCENE_LOCATION)); break; default: break; } }
void ProxySensor::OpenCalculator(){ SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); //pSceneManager->GoBackward(BackwardSceneTransition(SCENE_CALCULATOR)); AppLog("detected"); pSceneManager->GoBackward(BackwardSceneTransition(SCENE_CALCULATOR)); }
void CreateProfileForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) { SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); switch (actionId) { case ID_BUTTON_SAVE: if (__pSubjectEditField->GetText().IsEmpty()) { int doModal; MessageBox messageBox; String getError, getProfileNameError; Application::GetInstance()->GetAppResource()->GetString(IDS_PROFILE_NAME_ERROR, getProfileNameError); Application::GetInstance()->GetAppResource()->GetString(IDS_ERROR, getError); messageBox.Construct(getError, getProfileNameError, MSGBOX_STYLE_OK, 0); messageBox.ShowAndWait(doModal); } else { AppLog("mobilehunter.net test!!!"); pSceneManager->GoBackward(BackwardSceneTransition()); ProfileListForm *pProfileListForm = static_cast< ProfileListForm* >(Application::GetInstance()->GetAppFrame()->GetFrame()->GetControl(FORM_LIST)); if (pProfileListForm != NULL) { pProfileListForm->SaveUsingmodeProfile(__pSubjectEditField->GetText(), __pStartEditDate->GetYear(), __pStartEditDate->GetMonth(), __pStartEditDate->GetDay(), __pStartEditTime->GetHour(), __pStartEditTime->GetMinute(), __pDueEditDate->GetYear(), __pDueEditDate->GetMonth(), __pDueEditDate->GetDay(), __pDueEditTime->GetHour(), __pDueEditTime->GetMinute(), 0, 0, __pVolumeSlider->GetValue(), __pWifiCheckButton->IsSelected()?1:0, __pDescriptionEditField->GetText()); AppLog("mobilehunter.net test!!!111"); } } break; case ID_LOCATION_BUTTON: pSceneManager->GoForward(ForwardSceneTransition(SCENE_LOCATION)); break; default: break; } }
void Enrollment::OnFormBackRequested(Controls::Form& source) { AppLog("Back Key Pressed"); SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); pSceneManager->GoBackward(BackwardSceneTransition(SCENE_CALENDAR)); OnClose(); EnableControl(false); }
void Enrollment::OnSocketClosed(Socket& socket, NetSocketClosedReason reason) { AppLog("OnSocketClosed"); AppLog(GetErrorMessage(GetLastResult())); AppLog("Reasoning %d", reason); OnClose(); AppLog("Close Socket"); EnableControl(false); SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); pSceneManager->GoBackward(BackwardSceneTransition(SCENE_CALENDAR)); }
void Form1::OnFormBackRequested(Tizen::Ui::Controls::Form& source) { // AppLog("--------------------8-----------------"); // // UiApp* pApp = UiApp::GetInstance(); // AppAssert(pApp); // pApp->Terminate(); SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT)); }
void EditEventForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) { result r = E_SUCCESS; SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); ScrollPanel* pScrollPanel = static_cast< ScrollPanel* >(GetControl(0)); AppAssert(pScrollPanel); static const int CONTEXT_POSITION = 200; switch (actionId) { case ID_BUTTON_REMINDER: __pReminderContextMenu->SetAnchorPosition(Point(__pReminderContextMenu->GetAnchorPosition().x, source.GetBounds().y + CONTEXT_POSITION - pScrollPanel->GetScrollPosition())); __pReminderContextMenu->SetFocusable(true); __pReminderContextMenu->SetShowState(true); __pReminderContextMenu->Show(); break; case ID_CONTEXT_REMINDER_MINUTE: __selectedReminder = REMINDER_TIME_UNIT_MINUTE; __pReminderContextButton->SetText(L"Minute(s)"); __pReminderContextButton->Invalidate(false); break; case ID_CONTEXT_REMINDER_HOUR: __selectedReminder = REMINDER_TIME_UNIT_HOUR; __pReminderContextButton->SetText(L"Hour(s)"); __pReminderContextButton->Invalidate(false); break; case ID_CONTEXT_REMINDER_DAY: __selectedReminder = REMINDER_TIME_UNIT_DAY; __pReminderContextButton->SetText(L"Day(s)"); __pReminderContextButton->Invalidate(false); break; case ID_CONTEXT_REMINDER_WEEK: __selectedReminder = REMINDER_TIME_UNIT_WEEK; __pReminderContextButton->SetText(L"Week(s)"); __pReminderContextButton->Invalidate(false); break; case ID_BUTTON_RECURRENCE: { ArrayList* pList = new (std::nothrow) ArrayList(); pList->Construct(); DateTime startDate = __pStartEditDate->GetDate(); DateTime endDate = __pEndEditDate->GetDate(); pList->Add(*(new (std::nothrow) DateTime(startDate))); pList->Add(*(new (std::nothrow) DateTime(endDate))); if (__pRecurrence != null) { pList->Add(*(new (std::nothrow) Recurrence(*__pRecurrence))); } pSceneManager->GoForward(ForwardSceneTransition(SCENE_EVENT_SETRECURRENCE), pList); } break; case ID_BUTTON_PRIORITY: __pPriorityContextMenu->SetAnchorPosition(Point(__pPriorityContextMenu->GetAnchorPosition().x, source.GetBounds().y + CONTEXT_POSITION - pScrollPanel->GetScrollPosition())); __pPriorityContextMenu->SetFocusable(true); __pPriorityContextMenu->SetShowState(true); __pPriorityContextMenu->Show(); break; case ID_CONTEXT_PRIORITY_HIGH: __selectedPriority = EVENT_PRIORITY_HIGH; __pPriorityContextButton->SetText(L"High"); __pPriorityContextButton->Invalidate(false); break; case ID_CONTEXT_PRIORITY_NORMAL: __selectedPriority = EVENT_PRIORITY_NORMAL; __pPriorityContextButton->SetText(L"Normal"); __pPriorityContextButton->Invalidate(false); break; case ID_CONTEXT_PRIORITY_LOW: __selectedPriority = EVENT_PRIORITY_LOW; __pPriorityContextButton->SetText(L"Low"); __pPriorityContextButton->Invalidate(false); break; case ID_BUTTON_SENSITIVITY: __pSensitivityContextMenu->SetAnchorPosition(Point(__pSensitivityContextMenu->GetAnchorPosition().x, source.GetBounds().y + CONTEXT_POSITION - pScrollPanel->GetScrollPosition())); __pSensitivityContextMenu->SetFocusable(true); __pSensitivityContextMenu->SetShowState(true); __pSensitivityContextMenu->Show(); break; case ID_CONTEXT_SENSITIVITY_PUBLIC: __selectedSensitivity = SENSITIVITY_PUBLIC; __pSensitivityContextButton->SetText(L"Public"); __pSensitivityContextButton->Invalidate(false); break; case ID_CONTEXT_SENSITIVITY_PRIVATE: __selectedSensitivity = SENSITIVITY_PRIVATE; __pSensitivityContextButton->SetText(L"Private"); __pSensitivityContextButton->Invalidate(false); break; case ID_CONTEXT_SENSITIVITY_CONFIDENTIAL: __selectedSensitivity = SENSITIVITY_CONFIDENTIAL; __pSensitivityContextButton->SetText(L"Confidential"); __pSensitivityContextButton->Invalidate(false); break; case ID_BUTTON_STATUS: __pStatusContextMenu->SetAnchorPosition(Point(__pStatusContextMenu->GetAnchorPosition().x, source.GetBounds().y + CONTEXT_POSITION - pScrollPanel->GetScrollPosition())); __pStatusContextMenu->SetFocusable(true); __pStatusContextMenu->SetShowState(true); __pStatusContextMenu->Show(); break; case ID_CONTEXT_STATUS_NONE: __selectedStatus = EVENT_STATUS_NONE; __pStatusContextButton->SetText(L"None"); __pStatusContextButton->Invalidate(false); break; case ID_CONTEXT_STATUS_CONFIRMED: __selectedStatus = EVENT_STATUS_CONFIRMED; __pStatusContextButton->SetText(L"Confirmed"); __pStatusContextButton->Invalidate(false); break; case ID_CONTEXT_STATUS_CANCELLED: __selectedStatus = EVENT_STATUS_CANCELLED; __pStatusContextButton->SetText(L"Cancelled"); __pStatusContextButton->Invalidate(false); break; case ID_CONTEXT_STATUS_TENTATIVE: __selectedStatus = EVENT_STATUS_TENTATIVE; __pStatusContextButton->SetText(L"Tentative"); __pStatusContextButton->Invalidate(false); break; case ID_CHKBUTTON_ISALLDAY_CHECKED: { if (__pStartEditTime != null) { __pStartEditTime->SetShowState(false); } if (__pEndEditTime != null) { __pEndEditTime->SetShowState(false); } } break; case ID_CHKBUTTON_ISALLDAY_UNCHECKED: { if (__pStartEditTime != null) { __pStartEditTime->SetShowState(true); } if (__pEndEditTime != null) { __pEndEditTime->SetShowState(true); } } break; case ID_FOOTER_SAVE: if (__pSubjectEditField->GetText().IsEmpty()) { MessageBox messageBox; messageBox.Construct(L"Error", "Please enter the subject", MSGBOX_STYLE_OK, 0); int doModal; messageBox.ShowAndWait(doModal); } else { if (__pCalEvent != null) { r = UpdateEvent(); TryReturnVoid(!IsFailed(r), "[%s] Failed to edit event.", GetErrorMessage(r)); } else { MessageBox messageBox; messageBox.Construct(L"Error", "Failed to edit the event.", MSGBOX_STYLE_OK, 0); int doModal; messageBox.ShowAndWait(doModal); } pSceneManager->GoBackward(BackwardSceneTransition(SCENE_EVENT_LIST)); } break; } }
void VideoviewForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source) { AppLog("You can't leave Omsk"); SceneManager* pSceneManager = SceneManager::GetInstance(); pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_ZOOM_OUT)); }
void UserForm::Leave() { SceneManager* pSceneManager = SceneManager::GetInstance(); pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT)); }