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 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 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; } }
Tizen::Ui::Controls::Form* ProfileFormFactory::CreateFormN(const Tizen::Base::String& formId, const Tizen::Ui::Scenes::SceneId& sceneId) { SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); Tizen::Ui::Controls::Form* pNewForm = null; if (formId == FORM_LIST) { ProfileListForm* pForm = new (std::nothrow) ProfileListForm(); pForm->Initialize(); pSceneManager->AddSceneEventListener(sceneId, *pForm); pNewForm = pForm; } else if (formId == FORM_CREATION) { CreateProfileForm* pForm = new (std::nothrow) CreateProfileForm(); pForm->Initialize(); pNewForm = pForm; } else if (formId == FORM_DETAIL) { ProfileDetailForm* pForm = new (std::nothrow) ProfileDetailForm(); pForm->Initialize(); pSceneManager->AddSceneEventListener(sceneId, *pForm); pNewForm = pForm; } else if (formId == FORM_EDITION) { EditProfileForm* pForm = new (std::nothrow) EditProfileForm(); pForm->Initialize(); pSceneManager->AddSceneEventListener(sceneId, *pForm); pNewForm = pForm; } else if (formId == FORM_LOCATION) { LocationMapForm* pForm = new (std::nothrow) LocationMapForm(); pForm->Initialize(); pNewForm = pForm; } return pNewForm; }