当前位置: 首页>>代码示例>>C++>>正文


C++ AppResource类代码示例

本文整理汇总了C++中AppResource的典型用法代码示例。如果您正苦于以下问题:C++ AppResource类的具体用法?C++ AppResource怎么用?C++ AppResource使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了AppResource类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: AppLog

bool
ShareMenu::Initialize(Point loadPoint, String& content, bool isLink)
{
	result r = E_SUCCESS;

	__shareContent.SetCapacity(content.GetCapacity());
	__shareContent = content;

	__isLink = isLink;

	__pBTOppClient = null;

	if((r = Construct(Point(loadPoint), CONTEXT_MENU_STYLE_LIST)) != E_SUCCESS)
	{
		AppLog("ShareMenu create Failed %s", GetErrorMessage(r));
		return false;
	}

	String message, email, bluetooth;
	AppResource *pAppResource = Application::GetInstance()->GetAppResource();

	pAppResource->GetString(L"IDS_MESSAGE", message);
	pAppResource->GetString(L"IDS_EMAIL", email);
	pAppResource->GetString(L"IDS_BLUETOOTH", bluetooth);

	AddItem(message, ID_MESSAGE);
	AddItem(email, ID_EMAIL);
	AddItem(bluetooth, ID_BLUETOOTH);
	AddActionEventListener(*this);

	return true;

}
开发者ID:SciDev030,项目名称:badaget,代码行数:33,代码来源:ShareMenu.cpp

示例2: ChangeRightRectangleToNormal

void JMChattControl::DrawChattDataImage(Canvas* pCanvas, stCHATT_DATA* pChattData)
{
	Rectangle rtTextBox, rtText, rtTime;
	AppResource* pAppResource = Application::GetInstance()->GetAppResource();

	rtTextBox = ChangeRightRectangleToNormal(pChattData->rtElementBox);
	rtTextBox.y = 0;


	if( !pChattData->bISend ) {

		DrawYouPhotoAndName(pCanvas, pChattData, rtTextBox);
		rtTextBox.y += __stScreenInfo.nYouNameHeight;
	}


	DrawElementBackAndTime(pCanvas, pChattData, rtTextBox);

	pChattData->pBitmapImage = pAppResource->GetBitmapN(L"voice_pb1.png");
	AppLog("ffffffffff");
	if( pChattData->pBitmapImage ) {

		rtText = GetImageBoxArea(rtTextBox);

		pCanvas->DrawBitmap(rtText, *pChattData->pBitmapImage );
	}
}
开发者ID:JunminLee,项目名称:Winwin,代码行数:27,代码来源:JMChattControl.cpp

示例3: SimpleItem

Osp::Ui::Controls::ListItemBase* Form1::CreateItem(int itemIndex, int itemWidth) {

    String text;
    text.Format(100, L"SimpleItem #%d", itemIndex);

	AppResource * res = Application::GetInstance()->GetAppResource();
	Bitmap * pBitmap = res->GetBitmapN(L"itemicon.png",
			                           BITMAP_PIXEL_FORMAT_ARGB8888);

	SimpleItem * pItem = new SimpleItem();

	pItem->Construct(Dimension(itemWidth, 100), LIST_ANNEX_STYLE_DETAILED);
	pItem->SetElement(text, pBitmap);

	ListContextItem* pItemContext = new ListContextItem();
	pItemContext->Construct();
	pItemContext->AddElement(0, "Call");
	pItemContext->AddElement(1, "Send SMS");
	pItemContext->AddElement(2, "Send e-mail");

	pItem->SetContextItem(pItemContext);

	delete pBitmap;

    return pItem;

}
开发者ID:drstrangecode,项目名称:Bada_ListView_SampleApp,代码行数:27,代码来源:Form1.cpp

示例4: SetTitleText

bool
CategoryItemForm::Initialize(String t, String d)
{
	TabsForm::Initialize(FORM_STYLE_INDICATOR | FORM_STYLE_TEXT_TAB | FORM_STYLE_TITLE | FORM_STYLE_FOOTER, TabsForm::CATEGORY_TAB);

	SetTitleText(t);
	dir = d;

	AppResource* pAppResource = Application::GetInstance()->GetAppResource();
	__pFooter = TabsForm::GetFooter();
	__pFooter->SetStyle(FOOTER_STYLE_SEGMENTED_ICON);
	__pFooter->AddActionEventListener(*this);
	__pFooter->SetBackButton();
	SetFormBackEventListener(this);

	ButtonItem buttonItem;
	buttonItem.Construct(BUTTON_ITEM_STYLE_TEXT, SOFTKEY_INFO);
	buttonItem.SetBackgroundBitmap(BUTTON_ITEM_STATUS_NORMAL, pAppResource->GetBitmapN(L"info.png"));
	buttonItem.SetBackgroundBitmap(BUTTON_ITEM_STATUS_PRESSED, pAppResource->GetBitmapN(L"info_p.png"));
	__pFooter->SetButton(BUTTON_POSITION_LEFT, buttonItem);

	/*SetSoftkeyEnabled(SOFTKEY_1,true);
	SetSoftkeyText(SOFTKEY_1, Helper::GetTraslation("IDS_BACK"));
	SetSoftkeyActionId(SOFTKEY_1, SOFTKEY_BACK);
	AddSoftkeyActionListener(SOFTKEY_1, *this);*/

	return true;
}
开发者ID:Vizantiec,项目名称:Bada,代码行数:28,代码来源:CategoryItemForm.cpp

示例5: strReq

result
MainForm::RetrieveMenu(Day day) {
	result r = E_SUCCESS;

	String emptyText;
	AppResource *pAppResource = Application::GetInstance()->GetAppResource();
	pAppResource->GetString("IDS_LOADING", emptyText);
	__pListFood->SetTextOfEmptyList(emptyText);
	__pListFood->RequestRedraw();

	currentDay = day;

	String strReq(L"http://www.studentenwerk-dresden.de/feeds/speiseplan.rss");

	switch (day) {
	case Tomorrow:
		strReq.Append("?tag=morgen");
		break;
	default:
		break;
	}

	__pMenuParser->RetrieveFeed(strReq, *this);

	return r;
}
开发者ID:istvank,项目名称:MensaDD,代码行数:26,代码来源:MainForm.cpp

示例6: ReDrawFeedback

void JMChattControl::ReDrawFeedback()
{
			AppResource* pAppResource = Application::GetInstance()->GetAppResource();
			feed_back->SetNormalBackgroundBitmap(*pAppResource->GetBitmapN(L"voice_feedback2.png"));
			feed_back->SetPressedBackgroundBitmap(*pAppResource->GetBitmapN(L"voice_feedback2.png"));
			feed_back->Draw();
}
开发者ID:JunminLee,项目名称:Winwin,代码行数:7,代码来源:JMChattControl.cpp

示例7: AppAssert

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;
	}
}
开发者ID:PassionJHack,项目名称:passion,代码行数:57,代码来源:CreateProfileForm.cpp

示例8: validate

bool LiveBoardRequest::validate(){
	AppResource* appRes = Application::GetInstance()->GetAppResource();
	_errors.RemoveAll();
	bool validate = true;
	if(_station == null){
		validate = false;
		String error;
		appRes->GetString(L"ERROR_STATION", error);
		_errors.Add(error);
	}
	return validate;
}
开发者ID:iRail,项目名称:BeTrains.Bada,代码行数:12,代码来源:LiveBoardRequest.cpp

示例9: AddItem

void
ConstellationForm::Update(void) {
	__pConstelList ->RemoveAllItems();
	Osp::Base::Collection::IEnumerator* constNames = SkyCanvas::getConstellations()->GetEnumeratorN();
	String emptyString;
	__pConstelList -> AddItem(&emptyString, &emptyString, null, null, null);
	while (constNames -> MoveNext() == E_SUCCESS) {
		String* constNameAbbr = (String*) constNames -> GetCurrent();
		String constName;
		AppResource* appResource = Application::GetInstance()->GetAppResource();
		appResource->GetString(*constNameAbbr, constName);
		__pConstelList -> AddItem(&constName, &constName, null, null, null);
	}
}
开发者ID:BGCX261,项目名称:zij-bada-svn-to-git,代码行数:14,代码来源:ConstellationForm.cpp

示例10: ContextMenu

void
MainForm::CreateContextMenuDay(void) {
	String captionToday;
	String captionTomorrow;
	AppResource *pAppResource = Application::GetInstance()->GetAppResource();
	pAppResource->GetString("IDS_TODAY", captionToday);
	pAppResource->GetString("IDS_TOMORROW", captionTomorrow);

	__pContextMenuDay = new ContextMenu();
	__pContextMenuDay->Construct(Point(405, 105), CONTEXT_MENU_STYLE_LIST);
	__pContextMenuDay->AddItem(captionToday, ID_CONTEXT_TODAY);
	__pContextMenuDay->AddItem(captionTomorrow, ID_CONTEXT_TOMORROW);
	__pContextMenuDay->AddActionEventListener(*this);
}
开发者ID:istvank,项目名称:MensaDD,代码行数:14,代码来源:MainForm.cpp

示例11: OptionMenu

void
MainForm::CreateOptionMenu(void) {
	String captionAbout;
	AppResource *pAppResource = Application::GetInstance()->GetAppResource();
	pAppResource->GetString("IDS_ABOUT", captionAbout);

	__pOptionMenu = new OptionMenu();
	__pOptionMenu->Construct();
	__pOptionMenu->AddItem(captionAbout, ID_OPTIONMENU_ABOUT);
	__pOptionMenu->AddActionEventListener(*this);

	SetOptionkeyActionId(ID_OPTIONMENU);
	AddOptionkeyActionListener(*this);
}
开发者ID:istvank,项目名称:MensaDD,代码行数:14,代码来源:MainForm.cpp

示例12: CONSTRUCT

RoundedAvatar::RoundedAvatar(const AvatarType & type, const PlaceholderType & placeholderType) {
	CONSTRUCT(L"RoundedAvatar");
	result r = E_SUCCESS;

	_pUserJson = null;
	pAvatar = null;
	AppResource* pAppResource = VKUApp::GetInstance()->GetAppResource();
	String bitmapName = L"thumbnail_list.png", placeholderBitmapName;

	switch (type) {
	case AVATAR_NORMAL:
		bitmapName = L"thumbnail_list.png";
		break;
	case AVATAR_UNREAD:
		bitmapName = L"thumbnail_list_unread.png";
		break;
	case HEADER_BLUE:
		bitmapName = L"thumbnail_header.png";
		break;
	case BUBBLE_IN:
		bitmapName = L"thumbnail_bubble_in.png";
		break;
	case BUBBLE_OUT:
		bitmapName = L"thumbnail_bubble_out.png";
		break;
	}

	switch (placeholderType) {
	case PLACEHOLDER_USER:
		placeholderBitmapName = L"no_photo_user.png";
		break;

	case PLACEHOLDER_CHAT:
		placeholderBitmapName = L"no_photo_group.png";
		break;
	}

	pAvatarRounding = pAppResource->GetBitmapN(bitmapName, BITMAP_PIXEL_FORMAT_ARGB8888);
	pAvatarPlaceholder = pAppResource->GetBitmapN(placeholderBitmapName, BITMAP_PIXEL_FORMAT_ARGB8888);

	TryCatch(GetLastResult() == E_SUCCESS, r = GetLastResult(), "Failed GetBitmapN thumbnail_grouped_list");

	SetLastResult(r);
	return;
CATCH:
	AppLogException("RoundedAvatar is failed.", GetErrorMessage(r));
	SetLastResult(r);
	return;
}
开发者ID:igorglotov,项目名称:tizen-vk-client,代码行数:49,代码来源:RoundedAvatar.cpp

示例13: Rectangle

void Chatting::CreateChattControl() {
	Rectangle rtCtrl = Rectangle(0, 0, 720, 1124);

	AppResource* pAppResource = Application::GetInstance()->GetAppResource();
	Bitmap* iconImage=pAppResource->GetBitmapN(L"s-face1.png");


	__pChattControl = new JMChattControl();
	__pChattControl->Initialize(rtCtrl, L"IronMan", iconImage, L"TESTMAN",
			iconImage);
	AddControl(*__pChattControl);
	__pChattControl->SetBackgroundColor(Color(240,240,240));
	//Bitmap* strBackImageFile = pAppResource->GetBitmapN(L"tizen.png");
	//__pChattControl->SetBackImage(strBackImageFile);
}
开发者ID:JunminLee,项目名称:Winwin,代码行数:15,代码来源:Chatting.cpp

示例14: GetCanvasN

result ItemForm::OnDraw(void) {
	result r = E_SUCCESS;

	Canvas* pCanvas = GetCanvasN();
	Rectangle rt = pCanvas->GetBounds();

	Application * app = Application::GetInstance();
	AppResource * res = app->GetAppResource();
	Bitmap * pBitmap = res->GetBitmapN(L"form_bg.png", BITMAP_PIXEL_FORMAT_ARGB8888);
	pCanvas->DrawBitmap(rt, *pBitmap);
	delete pBitmap;
	delete pCanvas;

	return r;

}
开发者ID:drstrangecode,项目名称:Bada_RssReader_DrStrangecode,代码行数:16,代码来源:ItemForm.cpp

示例15: OnInitializing

result HeaderForm::OnInitializing(int index) {
	result r = E_SUCCESS;
	headerIndex = index;
	/*
	 * I18N
	 */
	String routePlanner = "Routeplanner";
	String liveboard = "Liveboard";
	AppResource* appRes = Application::GetInstance()->GetAppResource();
	appRes->GetString(L"HEADER_ROUTEPLANNER", routePlanner);
	appRes->GetString(L"HEADER_LIVEBOARD", liveboard);

	/*
	 * set OrientationListener
	 */
	this->SetOrientation(ORIENTATION_AUTOMATIC);
	this->AddOrientationEventListener(*this);

	// set header
	Header* headerObj = this->GetHeader();
	headerObj->SetStyle(HEADER_STYLE_SEGMENTED);

	// Liveboard header
	HeaderItem liveBoardHeaderItem;
	liveBoardHeaderItem.Construct(HEADER_ID_LIVEBOARD);
	liveBoardHeaderItem.SetText(liveboard);
	liveBoardHeaderItem.SetActionId(this->ACTION_HEADER_ID_LIVEBOARD);

	// routePlanner header
	HeaderItem routePlannerHeaderItem;
	routePlannerHeaderItem.Construct(HEADER_ID_ROUTE_PLANNER);
	routePlannerHeaderItem.SetText(routePlanner);
	routePlannerHeaderItem.SetActionId(this->ACTION_HEADER_ID_ROUTE_PLANNER);

	/*
	 * create HeaderItems
	 */
	headerObj->AddItem(routePlannerHeaderItem);
	headerObj->AddItem(liveBoardHeaderItem);
	headerObj->SetItemSelected(index);
	/*
	 * add header action listener
	 */

	headerObj->AddActionEventListener(*this);
	return r;
}
开发者ID:iRail,项目名称:BeTrains.Bada,代码行数:47,代码来源:HeaderForm.cpp


注:本文中的AppResource类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。