コード例 #1
0
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;
}
コード例 #2
0
bool UserForm::Initialize() {
	Form::Construct(IDF_USER);

	SceneManager* pSceneManager = SceneManager::GetInstance();
	pSceneManager->AddSceneEventListener(SCENE_USER, *this);

	SetFormBackEventListener(this);

	return true;
}
コード例 #3
0
bool VideoviewForm::Initialize() {
	Form::Construct(IDF_VIDEOVIEW);

	SceneManager* pSceneManager = SceneManager::GetInstance();
	pSceneManager->AddSceneEventListener(SCENE_VIDEOVIEW, *this);

	SetFormBackEventListener(this);

	return true;
}
コード例 #4
0
Tizen::Ui::Controls::Form*
TizenTodoFormFactory::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 == L"IDF_FORM")
	{
		TizenTodoMainForm* pForm = new TizenTodoMainForm();
		pForm->Initialize();
		pSceneManager->AddSceneEventListener(sceneId, *pForm);
		pNewForm = pForm;
	}
	else if (formId == L"IDF_DONE_FORM")
	{
		TizenTodoDoneForm* pForm = new TizenTodoDoneForm();
		pForm->Initialize();
		pSceneManager->AddSceneEventListener(sceneId, *pForm);
		pNewForm = pForm;
	}

	return pNewForm;
}
コード例 #5
0
Tizen::Ui::Controls::Form*
FormFactory::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_MAIN)
	{
		LocationManagerMainForm* pForm = new LocationManagerMainForm();
		pForm->Initialize();
		pSceneManager->AddSceneEventListener(sceneId, *pForm);
		pNewForm = pForm;
	}

	return pNewForm;
}
コード例 #6
0
Tizen::Ui::Controls::Form*
cantataFormFactory::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 == L"MainForm")
	{
		cantataMainForm* pForm = new cantataMainForm();
		pForm->Initialize();
		pSceneManager->AddSceneEventListener(sceneId, *pForm);
		pNewForm = pForm;
	}
	// TODO:
	// Add your form creation code here

	return pNewForm;
}
Tizen::Ui::Controls::Form*
SensorAppFormFactory::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 == IDF_FORM)
	{
		SensorAppMainForm* pForm = new SensorAppMainForm();
		pForm->Initialize();
		pSceneManager->AddSceneEventListener(sceneId, *pForm);
		pNewForm = pForm;
	}
	else if (formId == L"GravitySensorForm")
	{
		SensorsAppGravityForm* pForm = new (std::nothrow) SensorsAppGravityForm();
		TryReturn(pForm, null, "[%s] Form creation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
		pForm->Initialize();
		pSceneManager->AddSceneEventListener(sceneId, *pForm);
		pNewForm = pForm;
	}
	else if (formId == L"UserAccelForm")
	{
		SensorsAppUserAccelForm* pForm = new (std::nothrow) SensorsAppUserAccelForm();
		TryReturn(pForm, null, "[%s] Form creation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
		pForm->Initialize();
		pSceneManager->AddSceneEventListener(sceneId, *pForm);
		pNewForm = pForm;
	}
	else if (formId == L"DeviceOrientationForm")
	{
		SensorsAppOrientationForm* pForm = new (std::nothrow) SensorsAppOrientationForm();
		TryReturn(pForm, null, "[%s] Form creation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
		pForm->Initialize();
		pSceneManager->AddSceneEventListener(sceneId, *pForm);
		pNewForm = pForm;
	}
	else if (formId == L"LightSensorForm")
	{
		SensorsAppLightForm* pForm = new (std::nothrow) SensorsAppLightForm();
		TryReturn(pForm, null, "[%s] Form creation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
		pForm->Initialize();
		pSceneManager->AddSceneEventListener(sceneId, *pForm);
		pNewForm = pForm;
	}
	else if (formId == L"GryroSensorForm")
	{
		SensorsAppGyroForm* pForm = new (std::nothrow) SensorsAppGyroForm();
		TryReturn(pForm, null, "[%s] Form creation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
		pForm->Initialize();
		pSceneManager->AddSceneEventListener(sceneId, *pForm);
		pNewForm = pForm;
	}
	else if (formId == L"RemoteGyroSensorForm")
	{
		SensorsAppRemoteGyroForm* pForm = new (std::nothrow) SensorsAppRemoteGyroForm();
		TryReturn(pForm, null, "[%s] Form creation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
		pForm->Initialize();
		pSceneManager->AddSceneEventListener(sceneId, *pForm);
		pNewForm = pForm;
	}
	else if (formId == L"AccelSensorForm")
	{
		SensorsAppAccelForm* pForm = new (std::nothrow)SensorsAppAccelForm();
		TryReturn(pForm, null, "[%s] Form creation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
		pForm->Initialize();
		pSceneManager->AddSceneEventListener(sceneId, *pForm);
		pNewForm = pForm;
	}
	else if (formId == L"MagneticSensorForm")
	{
		SensorsAppMagneticForm* pForm = new (std::nothrow)SensorsAppMagneticForm();
		TryReturn(pForm, null, "[%s] Form creation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
		pForm->Initialize();
		pSceneManager->AddSceneEventListener(sceneId, *pForm);
		pNewForm = pForm;
	}
	else if (formId == L"ProximitySensorForm")
	{
		SensorsAppProximityForm* pForm = new (std::nothrow) SensorsAppProximityForm();
		TryReturn(pForm, null, "[%s] Form creation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
		pForm->Initialize();
		pSceneManager->AddSceneEventListener(sceneId, *pForm);
		pNewForm = pForm;
	}
	else if (formId == L"TiltSensorForm")
	{
		SensorsAppTiltForm* pForm = new (std::nothrow) SensorsAppTiltForm();
		TryReturn(pForm, null, "[%s] Form creation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
		pForm->Initialize();
		pSceneManager->AddSceneEventListener(sceneId, *pForm);
		pNewForm = pForm;
	}
	else
	{
		return null;
	}
	// TODO:
	// Add your form creation code here

	return pNewForm;
}