void LoginForm::doLogin() { String strEmail; String strPw; MessageBox msgBox; int modalResult; strEmail = pTextEmail->GetText(); strPw = pTextPw->GetText(); if(strEmail == null && strPw == null) { msgBox.Construct(L"Login", L"이메일과 패스워드를 입력해주세요.", MSGBOX_STYLE_OK); msgBox.ShowAndWait(modalResult); } else if(strEmail == null) { msgBox.Construct(L"Login", L"이메일을 입력해주세요.", MSGBOX_STYLE_OK); msgBox.ShowAndWait(modalResult); } else if(strPw == null) { msgBox.Construct(L"Login", L"패스워드를 입력해주세요.", MSGBOX_STYLE_OK); msgBox.ShowAndWait(modalResult); } else { login(strEmail, strPw); } }
void TizenScummVM::OnUserEventReceivedN(RequestId requestId, IList *args) { logEntered(); MessageBox messageBox; int modalResult; String *message; switch (requestId) { case USER_MESSAGE_EXIT: // normal program termination Terminate(); break; case USER_MESSAGE_EXIT_ERR: // assertion failure termination if (args) { message = (String *)args->GetAt(0); } if (!message) { message = new String("Unknown error"); } messageBox.Construct(L"Oops...", *message, MSGBOX_STYLE_OK); messageBox.ShowAndWait(modalResult); Terminate(); break; case USER_MESSAGE_EXIT_ERR_CONFIG: // the config file was corrupted messageBox.Construct(L"Config file corrupted", L"Settings have been reverted, please restart.", MSGBOX_STYLE_OK); messageBox.ShowAndWait(modalResult); Terminate(); break; } }
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); } }
bool ProfileListForm::DeleteProfile(int index) { AppLog("State Changed!!!! - 2"); MessageBox msgbox; String getDeleteProfileMsg, getDialogTitle; Application::GetInstance()->GetAppResource()->GetString(IDS_DELETE_PROFILE, getDeleteProfileMsg); Application::GetInstance()->GetAppResource()->GetString(IDS_DIALOG_TITLE, getDialogTitle); msgbox.Construct(getDialogTitle, getDeleteProfileMsg, MSGBOX_STYLE_YESNO, 3000); int modalResult = 0; msgbox.ShowAndWait(modalResult); switch(modalResult){ case MSGBOX_RESULT_YES: { String sql; sql.Append(L"DELETE FROM profile WHERE id = "); Integer* itemId = static_cast<Integer*>(__pIndexList.GetAt(index)); sql.Append(itemId->ToInt()); __pProfileDatabase->BeginTransaction(); __pProfileDatabase->ExecuteSql(sql, true); __pProfileDatabase->CommitTransaction(); ListUpdate(); __isUpdateMode = false; } return true; } return false; }
void UserForm::DeleteFriend() { MessageBox messageBox; String message; String name, nextName; JsonParseUtils::GetString(*_pUserJson, L"first_name", name); name += L" "; JsonParseUtils::GetString(*_pUserJson, L"last_name", nextName); name += nextName; int result = 0, userId; JsonParseUtils::GetInteger(*_pUserJson, L"id", userId); message = L"Remove " + name + " from friends?"; messageBox.Construct(L"Confirm", message, MSGBOX_STYLE_OKCANCEL, 10000); messageBox.ShowAndWait(result); switch (result) { case 0: return; break; case MSGBOX_RESULT_OK: { VKUApi::GetInstance().CreateRequest("friends.delete", this) ->Put(L"user_id", Integer::ToString(userId)) ->Submit(REQUEST_DELETE_FRIEND); } break; } }
void LoginForm::loginPlayerFinished(Tizen::Base::String statusCode) { AppLogDebug("STAUS : %S",statusCode.GetPointer()); MessageBox msgBox; int modalResult; SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); ArrayList* pList = new (std::nothrow)ArrayList; AppAssert(pList); pList->Construct(); if(statusCode != "0") // (로그인 성공 시) 로그인, 개인페이지로 이동 { String playerKey = statusCode; pList->Add( new Tizen::Base::String(playerKey) ); // playerId pSceneManager->GoForward(ForwardSceneTransition(SCENE_PLAYER, SCENE_TRANSITION_ANIMATION_TYPE_RIGHT, SCENE_HISTORY_OPTION_NO_HISTORY), pList); } else // (로그인 실패 시) 로그인 실패 팝업 { msgBox.Construct(L"Login", L"LOGIN fail", MSGBOX_STYLE_OK); msgBox.ShowAndWait(modalResult); } }
void ProfileDetailForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) { SceneManager* pSceneManager = SceneManager::GetInstance(); AppAssert(pSceneManager); switch (actionId) { case ID_FOOTER_EDIT: { // TODO: should be modified!!!!!!!!!! MessageBox messageBox; String getError, getFailEdit; Application::GetInstance()->GetAppResource()->GetString(IDS_ERROR, getError); Application::GetInstance()->GetAppResource()->GetString(IDS_FAIL_EDIT, getFailEdit); messageBox.Construct(getError, getFailEdit, MSGBOX_STYLE_OK, 0); int doModal; messageBox.ShowAndWait(doModal); } break; case ID_FOOTER_DELETE: { DeleteProfile(); } break; default: { } break; } }
void CameraCapture::OnForeground(void) { AppLog( ">>>>>> OnForeground is called."); __isBackGround = false; Osp::System::BatteryLevel eBatterLevel; bool isCharging = false; Osp::System::Battery::GetCurrentLevel(eBatterLevel); Osp::System::RuntimeInfo::GetValue(L"IsCharging", isCharging); if( (BATTERY_CRITICAL != eBatterLevel && BATTERY_EMPTY != eBatterLevel) || isCharging) { AppLog("--------------Normal BatterY Condition enum - %d",eBatterLevel); AppStartUp(); } else { AppLog("--------------Critical BatterY Condition enum - %d",eBatterLevel); MessageBox msgBoxError; int msgBoxErrorResult = 0; if(__pFrame->GetCurrentForm() != __pMainForm) { msgBoxError.Construct(L"WARNING",L"Low Battery",MSGBOX_STYLE_NONE,1000); msgBoxError.ShowAndWait(msgBoxErrorResult); } AppHandleLowBattery(); } }
void FStroski::SearchAction(Osp::Base::String searchqstr) { if (searchqstr != this->searchq) { if ((searchqstr.GetLength() < 2) && (searchqstr != "")) { MessageBox msgbox; int modalResult = 0; msgbox.Construct("Search", "For search you need to input at least 2 characters!", MSGBOX_STYLE_OK, 10000); msgbox.ShowAndWait(modalResult); } else { this->searchq = searchqstr; if (this->searchq.GetLength() > 0) this->searchq.Replace("\n"," "); pExList->RemoveAllItems(); CarExpenseData data_; int searchwfoundi1(-1),searchwfoundi2(-1); Osp::Base::String lowercasedsearchq, lowercased1, lowercased2, tmps; bool isresult; this->searchq.ToLower(lowercasedsearchq); if (carconclass_->GetExpenseDataListStart(carconclass_->SelectedCar.ID)) { while (carconclass_->GetExpenseDataListGetData(data_)) { if (this->searchq.GetLength() > 0) { lowercased1 = L""; lowercased2 = L""; data_.Caption.ToLower(lowercased1); data_.Remark.ToLower(lowercased2); if (lowercased1 == L"") lowercased1.Append(L" "); if (lowercased2 == L"") lowercased2.Append(L" "); if ((lowercased1.IndexOf(lowercasedsearchq,0,searchwfoundi1) == E_SUCCESS) || (lowercased2.IndexOf(lowercasedsearchq,0,searchwfoundi2) == E_SUCCESS)) { isresult = true; if (searchwfoundi1 > 0) { tmps = L""; lowercased1.SubString(searchwfoundi1-1,1,tmps); isresult = (tmps == " "); } if (searchwfoundi2 > 0) { tmps = L""; lowercased2.SubString(searchwfoundi2-1,1,tmps); isresult = (tmps == " "); } if (isresult) AddListItemSearch(data_.Caption, controlhandler_->DateFormater(data_.time, true), controlhandler_->CurrencyFormater(data_.Price), data_.Remark, data_.ID, searchwfoundi1, searchwfoundi2); } } else { AddListItem(data_.Caption, controlhandler_->DateFormater(data_.time, true), controlhandler_->CurrencyFormater(data_.Price), data_.ID); } } carconclass_->GetExpenseDataListEnd(); } pExList->RequestRedraw(); if (this->searchq.GetLength() > 0) { SetSoftkeyActionId(SOFTKEY_1, ID_CLEARSEARCH); pExList->SetTextOfEmptyList(L"No search result"); } else { SetSoftkeyActionId(SOFTKEY_1, ID_BACK); pExList->SetTextOfEmptyList(L"No items in list."); } this->RequestRedraw(true); } } }
bool MapForm::ShowMyLocation(bool show) { bool isMyLocationEnabled = false; _pMap->SetMyLocationEnabled(show); _showMe = show; if(show) { isMyLocationEnabled = _pMap->GetMyLocationEnabled(); if(!isMyLocationEnabled) { bool value = false; SettingInfo::GetValue(L"GPSEnabled", value); if (!value){ int modalResult = 0; MessageBox messageBox; messageBox.Construct(L"Information", L"Location services are disabled. Enable them in location settings?", MSGBOX_STYLE_YESNO); messageBox.ShowAndWait(modalResult); if (MSGBOX_RESULT_YES == modalResult){ // Lunching SettingAppControl ArrayList* pDataList = new ArrayList(); String* pData = new String(L"category:Location"); pDataList->Construct(); pDataList->Add(*pData); AppControl* pAc = AppManager::FindAppControlN(APPCONTROL_PROVIDER_SETTINGS, ""); if(pAc) { pAc->Start(pDataList, this); delete pAc; } delete pDataList; delete pData; } else { _showMe = false; } } } else { if ( _pMap->MoveToMyLocation() != E_SUCCESS) { _pPopup->SetShowState(true); _pPopup->Show(); _popupShow = true; _showMe = false; Redraw(); } } } return _showMe; }
void ZLbadaDialogManager::informationBox(const std::string &title, const std::string &message) const { MessageBox messageBox; messageBox.Construct(title.c_str(), message.c_str(), MSGBOX_STYLE_NONE , 2000); // Calls ShowAndWait - draw, show itself and process events int modalResult = 0; messageBox.ShowAndWait(modalResult); }
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 ProjectGiraffeTab1::OnTransactionAborted (HttpSession &httpSession, HttpTransaction &httpTransaction, result r) { AppLog("HTTP Transaction Aborted"); MessageBox msgBox; msgBox.Construct(L"HTTP STATUS", L"HTTP Request Aborted, Check internet connection", MSGBOX_STYLE_NONE, 3000); int modalresult = 0; msgBox.ShowAndWait(modalresult); }
void CCMessageBox(const char * pszMsg, const char * pszTitle) { if (pszMsg != NULL && pszTitle != NULL) { int iRet = 0; MessageBox msgBox; msgBox.Construct(pszTitle, pszMsg, MSGBOX_STYLE_OK); msgBox.ShowAndWait(iRet); } }
void ProjectGiraffeTab1::connectionDidFail(HttpConnection *connection) { AppLog("HttpConnection failed"); displayNoGraffiti(); MessageBox msgBox; msgBox.Construct(L"HTTP STATUS", L"HTTP Request Aborted, Check internet connection", MSGBOX_STYLE_NONE, 3000); int modalresult = 0; msgBox.ShowAndWait(modalresult); delete connection; }
void GalleryForm::OnGalleryItemClicked(Osp::Ui::Controls::Gallery &gallery, int index) { String *imagePath = static_cast<String *>(pImagesPaths->GetAt(index)); MessageBox messageBox; messageBox.Construct(L"Image details", *imagePath, MSGBOX_STYLE_NONE, 3000); int modalResult = 0; messageBox.ShowAndWait(modalResult); }
void EditEventForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs) { result r = E_SUCCESS; if (previousSceneId == SCENE_EVENT_SETRECURRENCE) { if (pArgs != null) { if (__pRecurrence != null) { delete __pRecurrence; __pRecurrence = null; } if (pArgs->GetCount() > 0) { __pRecurrence = static_cast< Recurrence* >(pArgs->GetAt(0)); } __pSetRecurrenceButton->SetText(GetRecurrenceString()); pArgs->RemoveAll(false); delete pArgs; } } else if (previousSceneId == SCENE_EVENT_DETAIL) { if (pArgs != null) { Integer* pInteger = static_cast< Integer* >(pArgs->GetAt(0)); int eventId = pInteger->ToInt(); __pCalEvent = __pCalendarbook->GetEventN(eventId); r = GetLastResult(); if (IsFailed(r)) { MessageBox messageBox; messageBox.Construct(L"Error", "Failed to get event instance", MSGBOX_STYLE_OK, 0); int doModal; messageBox.ShowAndWait(doModal); AppLogException("[%s] Failed to get the Event.", GetErrorMessage(r)); } else { LoadEvent(); } pArgs->RemoveAll(false); delete pArgs; } } }
Tizen::Web::Controls::Web* LocationMapForm::OnWebWindowCreateRequested(void) { MessageBox messageBox; messageBox.Construct(L"", L"LocationMapForm doesn't include new window creation.", MSGBOX_STYLE_NONE, 3000); int modalResult = 0; messageBox.ShowAndWait(modalResult); return null; }
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 ConfigForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) { if ( actionId == 100 ) { if ( __pMncEditField->GetText().IsEmpty()) { int messageBoxResult; MessageBox messageBox; messageBox.Construct( L"Info", L"MNC field cannot be empty.", MSGBOX_STYLE_OK ); // TODO Add localization messageBox.ShowAndWait(messageBoxResult); messageBox.SetShowState(false); messageBox.Invalidate(true); } else if ( m_mcc.IsEmpty() && m_developerFlag == BuyConfigInfo::AlwaysSuccess ) { int messageBoxResult; MessageBox messageBox; messageBox.Construct( L"Info", L"Country must be selected from list.", MSGBOX_STYLE_OK ); // TODO Add localization messageBox.ShowAndWait(messageBoxResult); messageBox.SetShowState(false); messageBox.Invalidate(true); } else { __pMainListener->OnActionPerformed(*this, actionId); } } else { Dimension size = m_pTableView->GetSize(); if ( (BuyConfigInfo::DeveloperFlag)actionId == BuyConfigInfo::AlwaysSuccess ) { size.height = 600; } else { size.height = 0; } m_pTableView->SetSize(size); m_developerFlag = (BuyConfigInfo::DeveloperFlag)actionId; UpdateConfirmButtonState(); } }
bool EventListForm::Initialize(void) { result r = E_SUCCESS; r = Construct(FORM_STYLE_NORMAL | FORM_STYLE_FOOTER | FORM_STYLE_HEADER | FORM_STYLE_PORTRAIT_INDICATOR); TryReturn(!IsFailed(r), false, "[%s] Failed to construct the form.", GetErrorMessage(r)); __pCalendarbook = new (std::nothrow) Calendarbook(); TryReturn(__pCalendarbook != null, false, "Failed to instantiate calendarbook."); r = __pCalendarbook->Construct(*this); if(IsFailed(r)) { __pCalendarbook->Construct(); __pCalendarbook->GetLatestVersion(); r = GetLastResult(); MessageBox messageBox; if(r == E_USER_NOT_CONSENTED) { messageBox.Construct(L"Error", L"The calendar privacy should be enabled.", MSGBOX_STYLE_OK); } else { messageBox.Construct(L"Error", L"Failed to construct the calendarbook.", MSGBOX_STYLE_OK); } int doModal; messageBox.ShowAndWait(doModal); UiApp* pApp = UiApp::GetInstance(); AppAssert(pApp); pApp->Terminate(); } return true; }
void Dictionary::OnListViewItemStateChanged(Osp::Ui::Controls::ListView &listView, int index, int elementId, Osp::Ui::Controls::ListItemStatus status) { bool add = status == LIST_ITEM_STATUS_CHECKED; GetLessonsInProgress(); if (!add) { int res; bool anyChecked = false; for (int i = 0; i != LangSetting::NUM_LESSON; i++) if (i != index && saveState[i]) anyChecked = true; if (!anyChecked) { listView.SetItemChecked(index, true); MessageBox msg; msg.Construct(Utils::GetString("IDS_FORM_DICTIONARY"), Utils::GetString("IDS_MSG_MUST_BE_ANY_CHECKED"), MSGBOX_STYLE_OK, 0); msg.ShowAndWait(res); return; } listView.SetItemChecked(index, true); MessageBox msg; msg.Construct(Utils::GetString("IDS_FORM_DICTIONARY"), Utils::GetString("IDS_MSG_YOUR_ARE_SURE_DISABLE_LESSON"), MSGBOX_STYLE_YESNO, 0); msg.ShowAndWait(res); if(res != MSGBOX_RESULT_YES) return; } if (__WCtrl->LoadLesson(index + 1, !add)) __progressState[index] = true; saveState[index] = add; listView.UpdateList(); }
void CameraRecorderForm::OnVideoRecorderErrorOccurred(RecorderErrorReason r) { MessageBox msgBoxError; int msgBoxErrorResult = 0; AppLog("OnVideoRecorderErrorOccurred"); AppLog("Recording time :%d", __pCameraRecorder->GetRecordingTime()); AppLog("Recording size :%d", __pCameraRecorder->GetRecordingSize()); __isStarted = false; __isCanceled = false; __isFromError = true; // An error occurred switch(r) { case RECORDER_ERROR_OUT_OF_STORAGE: msgBoxError.Construct(L"WARNING",L"Memory full",MSGBOX_STYLE_OK,0); break; case RECORDER_ERROR_STORAGE_FAILED: msgBoxError.Construct(L"WARNING",L"Storage Access Failed",MSGBOX_STYLE_OK,0); break; case RECORDER_ERROR_DEVICE_FAILED: msgBoxError.Construct(L"WARNING",L"Recording Device Failed",MSGBOX_STYLE_OK,0); break; default: msgBoxError.Construct(L"WARNING",L"An Error Occured",MSGBOX_STYLE_OK,0); break; } msgBoxError.ShowAndWait(msgBoxErrorResult); _SetButtonEnabled(__pBackButton, false); _SetButtonEnabled(__pRecordButton, false); _SetButtonEnabled(__pStopButton, false); __pCameraRecorder->Close(); }
void EventListForm::LoadNonAllDayEvents(Tizen::Base::DateTime& eventDate) { DateTime startTime(eventDate); DateTime endTime(eventDate); if (__isDaily == true) { startTime.SetValue(eventDate.GetYear(), eventDate.GetMonth(), eventDate.GetDay(), 0, 0, 0); endTime = startTime; endTime.AddDays(1); } else { startTime.SetValue(eventDate.GetYear(), eventDate.GetMonth(), 1, 0, 0, 0); endTime = startTime; endTime.AddMonths(1); } DateTime utcStartTime = __timeZone.WallTimeToUtcTime(startTime); DateTime utcEndTime = __timeZone.WallTimeToUtcTime(endTime); CalendarbookFilter filter(CB_FI_TYPE_NON_ALL_DAY_EVENT_INSTANCE); filter.AppendDateTime(FI_CONJ_OP_NONE, EVENT_INST_FI_PR_END_TIME, FI_CMP_OP_GREATER_THAN, utcStartTime); filter.AppendDateTime(FI_CONJ_OP_AND, EVENT_INST_FI_PR_START_TIME, FI_CMP_OP_LESS_THAN, utcEndTime); IList* pList = __pCalendarbook->SearchN(filter, EVENT_INST_FI_PR_START_TIME, SORT_ORDER_ASCENDING); result r = GetLastResult(); if (IsFailed(r)) { MessageBox messageBox; messageBox.Construct(L"Error", "Failed to get the event list", MSGBOX_STYLE_OK, 0); int doModal; messageBox.ShowAndWait(doModal); AppLogException("[%s] Failed to get the event list.", GetErrorMessage(r)); } if (__pNonAlldayEventsList != null) { __pNonAlldayEventsList->RemoveAll(true); delete __pNonAlldayEventsList; } __pNonAlldayEventsList = pList; }
void CropForm::OnActionPerformed(const Tizen::Ui::Control& source, int actionId) { if(actionId == ID_FOOTERITEMCROP) { __Croprectangle.x = __x_min ; __Croprectangle.y = __y_min ; __Croprectangle.width = __x_max - __x_min; __Croprectangle.height = __y_max - __y_min; if ((__Croprectangle.width <= 0) || (__Croprectangle.height <= 0)) { MessageBox messageBox; messageBox.Construct(L"Noting to crop", L"Please select region using finger to crop.", MSGBOX_STYLE_OK, 3000); int modalResult = 0; messageBox.ShowAndWait(modalResult); return; } Bitmap *pBitmapCroped = new Bitmap(); pBitmapCroped->Construct(*__pBitmapOriginal,__Croprectangle); Image img; result r = img.Construct(); if(!IsFailed(r)) { img.EncodeToFile(*pBitmapCroped, IMG_FORMAT_JPG, USER_CROPPED_FILE_PATH, true); AppLogDebug("Save_location : %S", USER_CROPPED_FILE_PATH.GetPointer()); Frame *pFrame = Application::GetInstance()->GetAppFrame()->GetFrame(); Form *pForm = (Form*)pFrame->GetControl(MAIN_FORM_NAME, false); if(pForm) { pFrame->SetCurrentForm(*pForm); pForm->SendUserEvent(CROPPING_COMPLETE, null); pForm->Draw(); pForm->Show(); pFrame->RemoveControl(*this); } } delete pBitmapCroped; } }
void Dictionary::OnActionPerformed(const Osp::Ui::Control& source, int actionId) { //ShowInfoDlg(); if (actionId == ID_MENU_INFO) { ShowInfoDlg(); } else if (actionId == ID_MENU_RESETDB) { MessageBox messageBox; messageBox.Construct(Utils::GetString("IDS_DIC_MENU_RESET_DB"), Utils::GetString("IDS_MSG_RESET_DB"), MSGBOX_STYLE_YESNO); // Calls ShowAndWait - draw, show itself and process events int modalResult = 0; messageBox.ShowAndWait(modalResult); if (modalResult == MSGBOX_RESULT_YES) { // remove all word! __WCtrl->DeleteLesson(0); CommonSetting *cs = &CommonSetting::GetInstance(); cs->lern = ""; cs->native = ""; cs->Store(); InitFrm * pInit = new InitFrm(); pInit->Initialize(); Utils::ShowFront(pInit, this); } } else if (actionId == ID_ADD_WORD) { AddWord *aw = new AddWord(); aw->SetResultListener(this, ID_MENU_ADD_WORD_SUCCCES); aw->ShowPopup(this); AddToDestructList(aw); } else if (actionId == ID_MENU_ADD_WORD_SUCCCES) { __pList->RefreshList(__pList->GetItemCount() - 1, LIST_REFRESH_TYPE_ITEM_MODIFY); } else BaseWordForm::OnActionPerformed(source, actionId); }
void MainForm::OnParsingFailure(String &error) { String title; String text; String emptyText; AppResource *pAppResource = Application::GetInstance()->GetAppResource(); pAppResource->GetString("IDS_APPNAME", title); pAppResource->GetString("IDS_FAILURE", text); pAppResource->GetString("IDS_ERROR", emptyText); __pListFood->SetTextOfEmptyList(emptyText); __pListFood->RequestRedraw(); MessageBox *pMessageBox = new MessageBox(); pMessageBox->Construct(title, text, MSGBOX_STYLE_OK ); pMessageBox->Show(); delete pMessageBox; StopLoadingAnimation(); }
int ZLbadaDialogManager::questionBox(const ZLResourceKey &key, const std::string &message, const ZLResourceKey &button0, const ZLResourceKey &button1, const ZLResourceKey &button2) const { AppLog("ZLbadaDialogManager::questionBox"); MessageBox messageBox; messageBox.Construct(dialogTitle(key).c_str(), message.c_str(), MSGBOX_STYLE_YESNO, 0); // Calls ShowAndWait - draw, show itself and process events int modalResult = 0; messageBox.ShowAndWait(modalResult); AppLog("modalResult %d", modalResult); int r; switch(modalResult) { case MSGBOX_RESULT_YES: AppLog("modalResult Yes"); r = 0; break; case MSGBOX_RESULT_CANCEL: AppLog("modalResult Cancel"); r = 1; break; default: r = 1; break; } AppLog("r %d", r); return r; /* QMessageBox::question( qApp->mainWidget(), ::qtString(dialogTitle(key)), ::qtString(message), ::qtButtonName(button0), ::qtButtonName(button1), ::qtButtonName(button2) );*/ }
void BadaScummVM::OnUserEventReceivedN(RequestId requestId, Osp::Base::Collection::IList *args) { logEntered(); if (requestId == USER_MESSAGE_EXIT) { // normal program termination Terminate(); } else if (requestId == USER_MESSAGE_EXIT_ERR) { // assertion failure termination String *message = NULL; if (args) { message = (String *)args->GetAt(0); } if (!message) { message = new String("Unknown error"); } MessageBox messageBox; messageBox.Construct(L"Oops...", *message, MSGBOX_STYLE_OK); int modalResult; messageBox.ShowAndWait(modalResult); Terminate(); } }
bool FCarAddEdit::GetInputData(CarData & data, bool validate) { if (validate) { String validatemsg = controlhandler_->ValidateFields(this); if (validatemsg != L"") { MessageBox msgbox; int modalResult = 0; msgbox.Construct("Validate", validatemsg, MSGBOX_STYLE_OK, 10000); msgbox.ShowAndWait(modalResult); return false; } } data.ID = this->itemid; data.Brand = controlhandler_->GetValue(this,L"EF_1_brand"); data.Model = controlhandler_->GetValue(this,L"EF_2_model"); data.startkm = controlhandler_->GetValueInt(this,L"EFN_3_startkm"); data.fueltypesarray.Construct(fueltypesselectedarray_); data.fueltypesstring = GetFuelTypesString(); data.year = controlhandler_->GetValueInt(this,L"EF_year"); data.licence = controlhandler_->GetValue(this,L"EF_licenceplate"); data.vin = controlhandler_->GetValue(this,L"EF_vin"); data.isurance = controlhandler_->GetValue(this,L"EF_isurance"); return true; }