本文整理汇总了C++中MessageBox::Construct方法的典型用法代码示例。如果您正苦于以下问题:C++ MessageBox::Construct方法的具体用法?C++ MessageBox::Construct怎么用?C++ MessageBox::Construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MessageBox
的用法示例。
在下文中一共展示了MessageBox::Construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: doLogin
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);
}
}
示例2: OnUserEventReceivedN
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;
}
}
示例3:
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);
}
}
示例4: AppLog
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;
}
示例5: DeleteFriend
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;
}
}
示例6: loginPlayerFinished
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);
}
}
示例7:
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();
}
}
示例8: SearchAction
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);
}
}
}
示例9: ArrayList
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;
}
示例10: informationBox
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);
}
示例11:
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;
}
}
示例12:
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);
}
示例13: CCMessageBox
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);
}
}
示例14: OnGalleryItemClicked
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);
}
示例15: if
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;
}
}
}