Exemplo n.º 1
0
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;
}
Exemplo n.º 2
0
void DocumentNKController::checkChanges()
{
    document = getDocumentNK();
    if(this->isEmptyForm())
    {
        view->reject();
    }
    else
    {
        if(!(oldDocument == document)) // jeśli kliknięto anuluj, ale nastąpiły zmiany
        {
            MessageBox *messageBox = new MessageBox();
            if (messageBox->createQuestionBox("Dokonano zmian") == MessageBox::YES)
            {
                //this->checkRequiredFields(); // jesli bedzie walidacja to tutaj
                view->accept();
            }
            else
                view->reject(); // zmiany dokonane, ale użytkowik chce anulować
        }
        else
        {
             view->reject(); // nie dokonano zmian, anuluj
        }
    }

}
Exemplo n.º 3
0
void GUISystem::ShowMessageBox(const CEGUI::String& text, MessageBox::eMessageBoxType type, MessageBox::Callback callback, int32 tag)
{
	MessageBox* messageBox = new MessageBox(type, tag);
	messageBox->SetText(text);
	messageBox->RegisterCallback(callback);
	messageBox->Show();
}
Exemplo n.º 4
0
GaussianMessage EqualityNode::functionPrecision(int to, const MessageBox &msgs)
{
    size_t size = msgs.begin()->second.size();

    GaussianMessage result(size, GaussianMessage::GAUSSIAN_PRECISION);

    Matrix &mean = result.mean();
    Matrix &prec = result.precision();

    for (MessageBox::const_iterator it = msgs.begin(); it != msgs.end(); ++it)
    {
        const int from = it->first;
        const GaussianMessage &msg = it->second;

        if (from == to)
            continue;

        const Matrix &msgMean = msg.mean();
        const Matrix &msgPrec = msg.precision();

        prec += msgPrec;
        mean += msgPrec * msgMean;
    }


    // TODO: mult(in1, in2, out)
    mean = pinv(prec) * mean;

    return result;
}
Exemplo n.º 5
0
void UI::simulate(const float t)
{
    std::vector<std::vector<MessageBox *>::iterator> delete_list;

    std::vector<MessageBox *>::iterator mbi, first, last;
    first = active_mb.begin();
    last = active_mb.end();
    for(mbi = first; mbi != last; mbi++)
    {
        MessageBox *mb = *mbi;
        mb->simulate(t);
        if(mb->timed_out())
        {
            delete_list.push_back(mbi);
        }
    }

    //delete all the message boxes that have timed out
    std::vector<std::vector<MessageBox *>::iterator>::iterator mbii;
    for(mbii = delete_list.begin(); mbii != delete_list.end(); mbii++)
    {
        mbi = *mbii;
        MessageBox *mb = *mbi;
        active_mb.erase(mbi);
        delete mb;
    }
}
Exemplo n.º 6
0
//-----------------------------------------------------------------------------
// Purpose: Display some information about the editor
//-----------------------------------------------------------------------------
void BuildModeDialog::ShowHelp()
{
	char helpText[]= "In the Build Mode Dialog Window:\n" 
		"Delete button - deletes the currently selected panel if it is deletable.\n"
		"Apply button - applies changes to the Context Panel.\n"
		"Save button - saves all settings to file. \n"
		"Revert to saved- reloads the last saved file.\n"
		"Auto Update - any changes apply instantly.\n"
		"Typing Enter in any text field applies changes.\n"
		"New Control menu - creates a new panel in the upper left corner.\n\n" 
		"In the Context Panel:\n"
		"After selecting and moving a panel Ctrl-z will undo the move.\n"
		"Shift clicking panels allows multiple panels to be selected into a group.\n"
		"Ctrl-c copies the settings of the last selected panel.\n"
		"Ctrl-v creates a new panel with the copied settings at the location of the mouse pointer.\n"
		"Arrow keys slowly move panels, holding shift + arrow will slowly resize it.\n"
		"Holding right mouse button down opens a dropdown panel creation menu.\n"
		"  Panel will be created where the menu was opened.\n"
		"Delete key deletes the currently selected panel if it is deletable.\n"
		"  Does nothing to multiple selections.";
		
	MessageBox *helpDlg = new MessageBox ("Build Mode Help", helpText, this);
	helpDlg->AddActionSignalTarget(this);
	helpDlg->DoModal();
}
Exemplo n.º 7
0
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;
	}
}
Exemplo n.º 8
0
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 MainTabSaleItemController::printDocument()
{
    PrintSaleDocumentController *pc = new PrintSaleDocumentController(view->getTableView()->getSymbol());
    if(view->getTableView()->getSymbol() == "")
    {
        MessageBox *messageBox = new MessageBox();
        messageBox->createInfoBox("Zaznacz dokument do druku");
        delete messageBox;
    }
    else if(view->getTableView()->getSymbol().contains("FK"))
    {
        DocumentFK doc = fkService->getDocumentFK(view->getTableView()->getSymbol());
        pc->print(&doc);
    }
    else
    {
         DocumentZAL docZal;
         docZal= zalService->getDocumentZAL(view->getTableView()->getSymbol());
         if(docZal.getDocumentType().contains("RZL")||docZal.getDocumentType().contains("ZAL"))
         {
             pc->print(&docZal);
         }
         else
         {
             Invoice doc = invoiceService->getInvoice(view->getTableView()->getSymbol());
             pc->print(&doc);

         }
    }
    delete pc;
}
Exemplo n.º 10
0
//-----------------------------------------------------------------------------
// Purpose: saves control settings to file
//-----------------------------------------------------------------------------
bool BuildGroup::SaveControlSettings( void )
{
	bool bSuccess = false;
	if ( m_pResourceName )
	{
		KeyValues *rDat = new KeyValues( m_pResourceName );

		// get the data from our controls
		GetSettings( rDat );
		
		char fullpath[ 512 ];
		g_pFullFileSystem->RelativePathToFullPath( m_pResourceName, m_pResourcePathID, fullpath, sizeof( fullpath ) );

		// save the data out to a file
		bSuccess = rDat->SaveToFile( g_pFullFileSystem, fullpath, NULL );
		if (!bSuccess)
		{
			MessageBox *dlg = new MessageBox("BuildMode - Error saving file", "Error: Could not save changes.  File is most likely read only.");
			dlg->DoModal();
		}

		rDat->deleteThis();
	}

	return bSuccess;
}
Exemplo n.º 11
0
   HelloForm()
   {
      caption = $("Sample App using Ecere Toolkit/C++ Bindings");
      borderStyle = sizable;
      clientSize = { 640, 480 };
      hasClose = true;
      hasMaximize = true;
      hasMinimize = true;
      background = formColor;
      font = { "Arial", 30 };

      button.parent = this;
      button.position = { 200, 200 };
      button.caption = $("Yay!!");
      button.notifyClicked = [](Window & owner, Button & btn, int x, int y, Modifiers mods)
      {
         HelloForm & self = (HelloForm &)owner;
         MessageBox msgBox;
         msgBox.caption = self.button.caption;
         msgBox.contents = $("C++ Bindings!");
         msgBox.modal();
         return true;
      };

      onRedraw = [](Window & w, Surface & surface) { surface.writeTextf(100, 100, $("Instance Method!")); };
   }
Exemplo n.º 12
0
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);
	}
}
Exemplo n.º 13
0
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;
	}
}
Exemplo n.º 14
0
	QScriptValue MessageBox::constructor(QScriptContext *context, QScriptEngine *engine)
	{
        MessageBox *messageBox = new MessageBox;
		messageBox->setupConstructorParameters(context, engine, context->argument(0));

		QScriptValueIterator it(context->argument(0));

		while(it.hasNext())
		{
			it.next();

			if(it.name() == "text")
				messageBox->mMessageBox->setText(it.value().toString());
			else if(it.name() == "detailedText")
				messageBox->mMessageBox->setDetailedText(it.value().toString());
			else if(it.name() == "informativeText")
				messageBox->mMessageBox->setInformativeText(it.value().toString());
			else if(it.name() == "buttons")
				messageBox->mMessageBox->setStandardButtons(static_cast<QMessageBox::StandardButton>(it.value().toInt32()));
			else if(it.name() == "icon")
				messageBox->mMessageBox->setIcon(static_cast<QMessageBox::Icon>(it.value().toInt32()));
			else if(it.name() == "defaultButton")
				messageBox->mMessageBox->setDefaultButton(static_cast<QMessageBox::StandardButton>(it.value().toInt32()));
			else if(it.name() == "escapeButton")
				messageBox->mMessageBox->setEscapeButton(static_cast<QMessageBox::StandardButton>(it.value().toInt32()));
			else if(it.name() == "onClosed")
				messageBox->mOnClosed = it.value();
		}

		return CodeClass::constructor(messageBox, context, engine);
	}
Exemplo n.º 15
0
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();
	}

}
Exemplo n.º 16
0
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;
	}
}
//-----------------------------------------------------------------------------
// Purpose: Handles an OK message, creating the current token
//-----------------------------------------------------------------------------
void CCreateTokenDialog::OnOK()
{
	// get the data
	char tokenName[1024], tokenValue[1024];
	m_pTokenName->GetText(0, tokenName, 1023);
	m_pTokenValue->GetText(0, tokenValue, 1023);

	if (strlen(tokenName) < 4)
	{
		MessageBox *box = new MessageBox("Create Token Error", "Could not create token.\nToken names need to be at least 4 characters long.");
		box->DoModal();
	}
	else
	{
		// create the token
		wchar_t unicodeString[1024];
		vgui::localize()->ConvertANSIToUnicode(tokenValue, unicodeString, sizeof(unicodeString) / sizeof(wchar_t));
		vgui::localize()->AddString(tokenName, unicodeString);

		// notify the dialog creator
		PostActionSignal(new KeyValues("TokenCreated", "name", tokenName));

		// close
		if (!m_bMultiToken)
		{
			PostMessage(this, new KeyValues("Close"));
		}
	}
}
Exemplo n.º 18
0
void dbInterface::deleteGymnast(QString& p_strFirstName, QString& p_strLastName)
{

    if (m_bInitialized)
    {
        QSqlDatabase db = QSqlDatabase::database("ConnMG");
        QSqlQuery query(db);
        QString strQuery = "DELETE FROM athlete WHERE first_name='" + p_strFirstName
                + "' AND last_name='" + p_strLastName.trimmed() + "'";
        bool bRet = query.exec(strQuery);

        if (bRet)
        {
            qInfo() << "Athlete removed: " << p_strFirstName << " " << p_strLastName;
        }
        else
        {
            QString strErr = "Athlete NOT removed: " + p_strFirstName + " " + p_strLastName
                    +  "\n" + query.lastError().text();
            qCritical() << strErr;

            MessageBox cMsgBox;
            cMsgBox.SetTitle("Warning");
            cMsgBox.SetText(strErr);
            cMsgBox.Show();
        }
    }
    else
    {
        qInfo() << "dbInterface::deleteGymnast(): Db not initialized";
    }
}
Exemplo n.º 19
0
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;
	}
Exemplo n.º 20
0
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);
        }
    }
}
Exemplo n.º 21
0
int Script::messageBox(lua_State* L){
#ifdef _CLIENT_
	string msg = string(luaL_checkstring(L, 1));
  MessageBox* mb = new MessageBox();
  mb->setMessage(msg);
  CGE::Engine::instance()->addGuiListener(mb, false);
#endif
  return 0;
}
Exemplo n.º 22
0
// Help callback function
void AViz::distribute()
{
    // Launch a message box
    MessageBox * mb = new MessageBox(SHORT_DISTRIBUTE_STRING, this);
    mb->show();

    // Print the full distribution conditions
    printf("%s\n", DISTRIBUTE_STRING );
}
Exemplo n.º 23
0
// Help callback function
void AViz::license() {
    // Launch a message box
    MessageBox *mb = new MessageBox(SHORT_LICENSE_STRING, this);
    mb->show();

    // Print the full license conditions
    printf("%s\n", LICENSE_STRING );
    printf("%s\n", DISTRIBUTE_STRING );
}
Exemplo n.º 24
0
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);

}
Exemplo n.º 25
0
int main(int argc, char *argv[])
{
    QApplication a(argc, argv);

    MessageBox newMessage;
      newMessage.show();

    return a.exec();
}
Exemplo n.º 26
0
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;
	}
}
Exemplo n.º 27
0
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);
}
Exemplo n.º 28
0
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);
	}
}
Exemplo n.º 29
0
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;
}
Exemplo n.º 30
0
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;
		}
	}
}