// 사용자 로그인 팝업 생성
void GHPlayerController::getLoginPopup(GHPlayerLoggedinListener* listener)
{
	Tizen::Ui::Controls::MessageBox msgBox;
	int modalResult;
	msgBox.Construct(L"Login", L"", Tizen::Ui::Controls::MSGBOX_STYLE_OKCANCEL);
	msgBox.SetSize(600, 800);

    Tizen::Ui::Controls::EditField* pTextEmail = new Tizen::Ui::Controls::EditField();
    pTextEmail->Construct(Tizen::Graphics::Rectangle(60, 110, 550, 65), Tizen::Ui::Controls::EDIT_FIELD_STYLE_EMAIL_SMALL);
    pTextEmail->SetGuideText(String("Email"));
	msgBox.AddControl(pTextEmail);

    Tizen::Ui::Controls::EditField* pTextPwd = new Tizen::Ui::Controls::EditField();
    pTextPwd->Construct(Tizen::Graphics::Rectangle(60, 185, 550, 65), Tizen::Ui::Controls::EDIT_FIELD_STYLE_PASSWORD);
    pTextPwd->SetGuideText(String("Password"));
	msgBox.AddControl(pTextPwd);

	msgBox.ShowAndWait(modalResult);

	switch (modalResult)
	{
	case Tizen::Ui::Controls::MSGBOX_RESULT_OK:
		{
			// login
			String email = pTextEmail->GetText();
			String pwd = pTextPwd->GetText();
			playerLogin(email, pwd, listener);
		}
		break;
	default:
		break;
	}
}
示例#2
0
void
LocationMapForm::OnLoadingErrorOccurred(LoadingErrorType error, const String& reason)
{
	Tizen::Ui::Controls::MessageBox msgBox;
	int modalresult = 0;
	Tizen::Base::String errReason;

	switch (error)
	{
	case WEB_REQUEST_TIMEOUT:
	{
		errReason = Tizen::Base::String(L"Request timeout");
	}
	break;

	case WEB_NO_CONNECTION:
	{
		errReason = Tizen::Base::String(L"Network is not in service");
	}
	break;

	case WEB_MIME_NOT_SUPPORTED:
	{
		errReason = Tizen::Base::String(L"The content type is not supported");
	}
	break;

	case WEB_BAD_URL:
	{
		errReason = Tizen::Base::String(L"The url is invalid");
	}
	break;

	case WEB_HTTP_RESPONSE:
	{
		errReason = Tizen::Base::String(L"HTTP response");
	}
	break;

	case WEB_OUT_OF_MEMORY:
	{
		errReason = Tizen::Base::String(L"Page Too Large");
	}
	break;

	case WEB_REQUEST_MAX_EXCEEDED:
	{
		errReason = Tizen::Base::String(L"Request Max Exceeded");
	}
	break;

	case WEB_ERROR_UNKNOWN:
	default:
	{
		errReason = Tizen::Base::String(L"An Unknown error");
	}
	break;
	}

	msgBox.Construct(L"LOADING ERROR TYPE", errReason, MSGBOX_STYLE_NONE, 3000);
	msgBox.ShowAndWait(modalresult);
}