コード例 #1
0
ファイル: Allocator.cpp プロジェクト: beanhome/dev
void* Allocator::_Realloc(void* ptr, size_t size, const char* file_name, unsigned int line_num)
{
	//LOG("%s:%d  realloc(%p, %d)\n", file_name, line_num, ptr, size);

	byte* pBlock = (byte*)ptr - sizeof(Header);
	Header* pHeader = reinterpret_cast<Header*>(pBlock);
	Footer* pFooter = reinterpret_cast<Footer*>((byte*)ptr+size);

	ASSERT(pHeader->m_pBlockNode != NULL);
	BlockNode* pNode = pHeader->m_pBlockNode;

	size_t total = size + sizeof(Header) + sizeof(Footer);
	pBlock = (byte*)realloc(pBlock, total);
	ptr = pBlock + sizeof(Header);

	pHeader = reinterpret_cast<Header*>(pBlock);
	pFooter = reinterpret_cast<Footer*>((byte*)ptr+size);

	pHeader->Init(size, file_name, line_num);
	pFooter->Init(size, file_name, line_num);

	pNode->pBlock = pBlock;
	pHeader->m_pBlockNode = pNode;
	
	return ptr;
}
コード例 #2
0
ファイル: BaseForm.cpp プロジェクト: mike-hmelov/smsBackup
result BaseForm::OnInitializing(void)
{
	result r = E_SUCCESS;
	Footer* footer = GetFooter();
	footer->AddActionEventListener(*this);
	return r;
}
コード例 #3
0
void
OverlayKeypadForm::OnKeypadClosed(Control& source)
{
	Header* pHeader = GetHeader();
	pHeader->SetStyle(HEADER_STYLE_TITLE);
	pHeader->SetTitleText(L"OverlayKeypad");
	Footer* pFooter = GetFooter();
	pFooter->SetShowState(true);
	Invalidate(true);
}
コード例 #4
0
ファイル: table.cpp プロジェクト: yanxi10/leveldblib
Status Table::Open(const Options& options,
                   RandomAccessFile* file,
                   uint64_t size,
                   Table** table) {
  *table = NULL;
  if (size < Footer::kEncodedLength) {
    return Status::Corruption("file is too short to be an sstable");
  }

  char footer_space[Footer::kEncodedLength];
  Slice footer_input;
  Status s = file->Read(size - Footer::kEncodedLength, Footer::kEncodedLength,
                        &footer_input, footer_space);
  if (!s.ok()) return s;

  Footer footer;
  s = footer.DecodeFrom(&footer_input);
  if (!s.ok()) return s;

  // Read the index block
  BlockContents contents;
  Block* index_block = NULL;
  if (s.ok()) {
    ReadOptions opt;
    if (options.paranoid_checks) {
      opt.verify_checksums = true;
    }
    s = ReadBlock(file, opt, footer.index_handle(), &contents);
    if (s.ok()) {
      index_block = new Block(contents);
    }
  }

  if (s.ok()) {
    // We've successfully read the footer and the index block: we're
    // ready to serve requests.
    Rep* rep = new Table::Rep;
    rep->options = options;
    rep->file = file;
    rep->metaindex_handle = footer.metaindex_handle();
    rep->index_block = index_block;
    rep->cache_id = (options.block_cache ? options.block_cache->NewId() : 0);
    rep->filter_data = NULL;
    rep->filter = NULL;
    *table = new Table(rep);
    (*table)->ReadMeta(footer);
  } else {
    delete index_block;
  }

  return s;
}
コード例 #5
0
ファイル: BaseWordForm.cpp プロジェクト: m1uan/voc4u_bada
void BaseWordForm::OnActionPerformed(const Osp::Ui::Control& source, int actionId)
{
	switch (actionId)
	{
	case ID_ADD_WORD:
	{
		if (__pAddWordDlg)
			delete __pAddWordDlg;

		__pAddWordDlg = new AddWord();
		__pAddWordDlg->ShowPopup(this);

		break;
	}
	case ID_MENU:
	{
		int hp = 0;
		int wp = 0;
		Header *header = GetHeader();

		if (header)
		{
			int posy = GetBounds().height - GetClientAreaBounds().height;

			Footer * footer = GetFooter();
			if (footer)
				posy -= footer->GetHeight();

			hp = (posy - 10);
			wp = header->GetWidth() - 10;
		}
		// Set the anchor position of the ContextMenu
		__pContextMenu->SetPosition(Point(wp, hp));

		// Show the ContextMenu
		__pContextMenu->SetShowState(true);
		__pContextMenu->Show();

		break;
	}
	case ID_DICTIONARY:
	{
		ShowDictionary();
		break;
	}
	case ID_MENU_INFO:
	{
		ShowInfoDlg();
		break;
	}
	}
}
コード例 #6
0
result ItemForm::OnInitializing(void) {
	result r = E_SUCCESS;

	Footer * pFooter = GetFooter();
	pFooter->AddActionEventListener(*this);

	SetFormBackEventListener(this);

	pTitleLabel = static_cast<Label *>(GetControl(L"IDC_LABEL_TITLE"));
	pDateAuthorLabel = static_cast<Label *>(GetControl(L"IDC_LABEL_AUTHOR_DATE"));
	pSnippetLabel = static_cast<Label *>(GetControl(L"IDC_LABEL_SNIPPET"));

	return r;
}
コード例 #7
0
ファイル: Allocator.cpp プロジェクト: beanhome/dev
bool Allocator::_Check() const
{
	bool res = true;

	for (BlockNode* pNode = m_pBlocks ; pNode != NULL ; pNode = pNode->pNext)
	{
		Header* pHeader = reinterpret_cast<Header*>(pNode->pBlock);
		Footer* pFooter = reinterpret_cast<Footer*>(pNode->pBlock+sizeof(Header)+pHeader->m_iSize);

		res &= pHeader->Check();
		res &= pFooter->Check();
	}

	return true;
}
コード例 #8
0
ファイル: table.cpp プロジェクト: yanxi10/leveldblib
void Table::ReadMeta(const Footer& footer) {
  if (rep_->options.filter_policy == NULL) {
    return;  // Do not need any metadata
  }

  // TODO(sanjay): Skip this if footer.metaindex_handle() size indicates
  // it is an empty block.
  ReadOptions opt;
  if (rep_->options.paranoid_checks) {
    opt.verify_checksums = true;
  }
  BlockContents contents;
  if (!ReadBlock(rep_->file, opt, footer.metaindex_handle(), &contents).ok()) {
    // Do not propagate errors since meta info is not needed for operation
    return;
  }
  Block* meta = new Block(contents);

  Iterator* iter = meta->NewIterator(BytewiseComparator());
  std::string key = "filter.";
  key.append(rep_->options.filter_policy->Name());
  iter->Seek(key);
  if (iter->Valid() && iter->key() == Slice(key)) {
    ReadFilter(iter->value());
  }
  delete iter;
  delete meta;
}
コード例 #9
0
ファイル: Allocator.cpp プロジェクト: beanhome/dev
void Allocator::_Free(void* ptr, const char* file_name, unsigned int line_num)
{
	//LOG("%s:%d  free(%p)\n", file_name, line_num, ptr);

	byte* pBlock = (byte*)ptr - sizeof(Header);

	Header* pHeader = reinterpret_cast<Header*>(pBlock);
	Footer* pFooter = reinterpret_cast<Footer*>((byte*)ptr+pHeader->m_iSize);

	ASSERT(pHeader->Check());
	ASSERT(pFooter->Check());

	ASSERT(pHeader->m_pBlockNode != NULL);
	RemBlock(pBlock);

	free(pBlock);
}
コード例 #10
0
ファイル: Allocator.cpp プロジェクト: beanhome/dev
void* Allocator::_Malloc(size_t size, const char* file_name, unsigned int line_num)
{
	//LOG("%s:%d  malloc(%d)\n", file_name, line_num, size);

	size_t total = size + sizeof(Header) + sizeof(Footer);
	byte* pBlock = (byte*)malloc(total);
	byte* ptr = pBlock + sizeof(Header);

	Header* pHeader = reinterpret_cast<Header*>(pBlock);
	Footer* pFooter = reinterpret_cast<Footer*>(ptr+size);

	pHeader->Init(size, file_name, line_num);
	pFooter->Init(size, file_name, line_num);

	AddBlock(pBlock);

	return ptr;
}
コード例 #11
0
bool
CustomHybridForm::Initialize()
{
	NativeBridgeForm::Initialize();

	unsigned long style = GetFormStyle();
	Footer* pFooter;

	if (style & FORM_STYLE_FOOTER)
	{
		pFooter = GetFooter();
		pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);
		ButtonItem btnCharac;
		btnCharac.Construct(BUTTON_ITEM_STYLE_TEXT, ID_BUTTON_CHARAC);
		btnCharac.SetText("envoi au JS des caractères spéciaux");
		pFooter->SetButton(BUTTON_POSITION_RIGHT, btnCharac);
		pFooter->AddActionEventListener(*this);
	}

	return true;
}
コード例 #12
0
void
QuickPanelFrameForm::SetFooter()
{
	 Footer* pFooter = GetFooter();
	 if (pFooter)
	 {
		FooterItem  footerItem1;
		footerItem1.Construct(ID_FOOTER_ITEM1);
		footerItem1.SetText(L"Attached");

		FooterItem  footerItem2;
		footerItem2.Construct(ID_FOOTER_ITEM2);
		footerItem2.SetText(L"Detached");

		pFooter->SetStyle(FOOTER_STYLE_SEGMENTED_TEXT);
		pFooter->AddItem(footerItem1);
		pFooter->AddItem(footerItem2);
		pFooter->AddActionEventListener(*this);
		pFooter->SetBackButton();
	 }
}
コード例 #13
0
ファイル: CropForm.cpp プロジェクト: CoCoTeam/TizenGameHub
result
CropForm::OnInitializing(void)
{
	result r = E_SUCCESS;

	Footer *pFooter = GetFooter();
	if(pFooter)
	{
		pFooter->AddActionEventListener(*this);
		SetFormBackEventListener(this);
	}

	AddTouchEventListener(*this);

	//initialize to extreme values
	__x_min = GetClientAreaBounds().width;
	__y_min = GetClientAreaBounds().height;
	__x_max = 0;
	__y_max = 0;
	return r;
}
コード例 #14
0
result
LocationMapForm::OnInitializing(void)
{
	result r = E_SUCCESS;

	Footer* pFooter = GetFooter();
	AppAssert(pFooter);
	pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);

	FooterItem footerSave;
	footerSave.Construct(ID_BUTTON_SELECT);
	String getSelect;
	Application::GetInstance()->GetAppResource()->GetString(IDS_SELECT, getSelect);
	footerSave.SetText(getSelect);
	pFooter->AddItem(footerSave);
	pFooter->AddActionEventListener(*this);

	__pWeb = new (std::nothrow) Web();

	Rectangle bound = this->GetClientAreaBounds();


	__pWeb->Construct( Rectangle ( 0 , 0  , bound.width , bound.height));

	Tizen::Base::String url = "file://"+App::GetInstance()->GetAppDataPath() + L"index.html";
	__pWeb->SetLoadingListener(this);
	__pWeb->SetWebUiEventListener(this);
	__pWeb->AddJavaScriptBridge(*this);
	this->AddControl(__pWeb);

	SetFormBackEventListener(this);

	__pWeb->LoadUrl(url);

	this->RequestRedraw(true);

	return r;
}
コード例 #15
0
ファイル: BaseWordForm.cpp プロジェクト: m1uan/voc4u_bada
result BaseWordForm::OnDraw(void)
{
	result r = Form::OnDraw();
	Rectangle bound = GetBounds();
	Canvas * canvas = GetCanvasN(bound);

	if (!__pBGLogo)
		__pBGLogo = Utils::GetBitmapN("bg_logo.png");

	int x = bound.width / 2 - (__pBGLogo->GetWidth() / 2);
	int y = bound.height - __pBGLogo->GetHeight() - 15;

	Footer * footer = GetFooter();
	if (footer)
	{
		y -= footer->GetHeight();
	}

	canvas->DrawBitmap(Point(x, y), *__pBGLogo);

	delete canvas;

	return r;
}
コード例 #16
0
ファイル: BaseWordForm.cpp プロジェクト: m1uan/voc4u_bada
void BaseWordForm::PrepareFooter()
{
	Footer *footer = GetFooter();

	if (footer)
	{
		// cleaning because function can be call
		// from SetBackForm
		footer->RemoveAllButtons();
		footer->RemoveAllItems();
		footer->RemoveBackButton();

		if (__pBackForm)
		{
			footer->SetBackButton();
			footer->SetBackButtonEnabled(true);
			SetFormBackEventListener(this);
		}
		footer->AddActionEventListener(*this);
	}

}
コード例 #17
0
ファイル: EventListForm.cpp プロジェクト: minicho/TIZEN5-
result
EventListForm::OnInitializing(void)
{
	result r = E_SUCCESS;

	Header* pHeader = GetHeader();
	AppAssert(pHeader);

	DateTime today;
	String formattedString;

	SystemTime::GetCurrentTime(WALL_TIME, today);

	__pLocaleCalendar = Tizen::Locales::Calendar::CreateInstanceN(CALENDAR_GREGORIAN);
	__pLocaleCalendar->SetTime(today);
	DateTimeFormatter* pDateFormatter = DateTimeFormatter::CreateDateFormatterN(DATE_TIME_STYLE_DEFAULT);

	String customizedPattern = L"dd MMM yyyy";
	pDateFormatter->ApplyPattern(customizedPattern);
	pDateFormatter->Format(*__pLocaleCalendar, formattedString);

	HeaderItem headerDaily;
	headerDaily.Construct(ID_HEADER_DAILY);
	headerDaily.SetText(L"일");

	HeaderItem headerMonthly;
	headerMonthly.Construct(ID_HEADER_MONTHLY);
	headerMonthly.SetText(L"월");

	pHeader->SetStyle(HEADER_STYLE_SEGMENTED_WITH_TITLE);
	pHeader->SetTitleText(formattedString);
	pHeader->AddItem(headerDaily);
	pHeader->AddItem(headerMonthly);
	pHeader->AddActionEventListener(*this);

	Footer* pFooter = GetFooter();
	AppAssert(pFooter);
	pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);

	FooterItem footerCreate;
	footerCreate.Construct(ID_FOOTER_CREATE);
	footerCreate.SetText(L"일정 생성");
	pFooter->AddItem(footerCreate);

	SetFormBackEventListener(this);
	pFooter->AddActionEventListener(*this);

	Tizen::Ui::Controls::Button* pPreviousButton = new (std::nothrow) Button();
	pPreviousButton->Construct(Rectangle(0, 0, GetClientAreaBounds().width / 2, 72), L"이전");
	pPreviousButton->SetActionId(ID_BUTTON_PREV);
	pPreviousButton->AddActionEventListener(*this);
	AddControl(pPreviousButton);

	Tizen::Ui::Controls::Button* pNextButton = new (std::nothrow) Button();
	pNextButton->Construct(Rectangle(GetClientAreaBounds().width / 2, 0, GetClientAreaBounds().width / 2, 72), L"다음");
	pNextButton->SetActionId(ID_BUTTON_NEXT);
	pNextButton->AddActionEventListener(*this);
	AddControl(pNextButton);

	__pGroupedListView = new (std::nothrow) GroupedListView();
	__pGroupedListView->Construct(Rectangle(0, 72, GetClientAreaBounds().width, GetClientAreaBounds().height - 72), GROUPED_LIST_VIEW_STYLE_INDEXED, true, SCROLL_STYLE_FADE_OUT);
	__pGroupedListView->SetTextOfEmptyList(L"일정 없음");
	__pGroupedListView->SetItemProvider(*this);
	__pGroupedListView->AddGroupedListViewItemEventListener(*this);
	__pGroupedListView->SetItemDividerColor(Tizen::Graphics::Color::GetColor(COLOR_ID_BLACK));
	AddControl(__pGroupedListView);

	LocaleManager localeManager;
	localeManager.Construct();
	__timeZone = localeManager.GetSystemTimeZone();

	return r;
}
コード例 #18
0
ファイル: SettingForm.cpp プロジェクト: JunminLee/Winwin
result
SettingForm::OnInitializing(void)
{



	 FooterItem footerItem[5];

	 Image inActivation_Image[5];
	 String inActivation_Path[5];

	 Image Activation_Image[5];
	 String Activation_Path[5];

	 for(int i=0; i<5; i++)
	 {
	 	inActivation_Image[i].Construct();
	 	inActivation_Path[i] = App::GetInstance()->GetAppResourcePath();

	 	Activation_Image[i].Construct();
	 	Activation_Path[i] = App::GetInstance()->GetAppResourcePath();
	 }

	 inActivation_Path[0] += L"screen-density-xhigh/TimeLine_InAct.png";
	 Activation_Path[0] += L"screen-density-xhigh/TimeLine_Act.png";

	 footerItem[0].Construct(ID_FOOTER_ITEM1);

	 footerItem[0].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
	 inActivation_Image[0].DecodeN(inActivation_Path[0], BITMAP_PIXEL_FORMAT_ARGB8888));

	 footerItem[0].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
	 Activation_Image[0].DecodeN(Activation_Path[0], BITMAP_PIXEL_FORMAT_ARGB8888));

	 inActivation_Path[1] += L"screen-density-xhigh/Chatting_InAct.png";
	 Activation_Path[1] += L"screen-density-xhigh/Chatting_Act.png";

	 footerItem[1].Construct(ID_FOOTER_ITEM2);

	 footerItem[1].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
	 inActivation_Image[1].DecodeN(inActivation_Path[1], BITMAP_PIXEL_FORMAT_ARGB8888));

	 footerItem[1].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
	 Activation_Image[1].DecodeN(Activation_Path[1], BITMAP_PIXEL_FORMAT_ARGB8888));

	 inActivation_Path[2] += L"screen-density-xhigh/PartnerList_InAct.png";
	 Activation_Path[2] += L"screen-density-xhigh/PartnerList_Act.png";

	 footerItem[2].Construct(ID_FOOTER_ITEM3);

	 footerItem[2].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
	 inActivation_Image[2].DecodeN(inActivation_Path[2], BITMAP_PIXEL_FORMAT_ARGB8888));

	 footerItem[2].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
	 Activation_Image[2].DecodeN(Activation_Path[2], BITMAP_PIXEL_FORMAT_ARGB8888));

	 inActivation_Path[3] += L"screen-density-xhigh/PartnerResearch_InAct.png";
	 Activation_Path[3] += L"screen-density-xhigh/PartnerResearch_Act.png";

	 footerItem[3].Construct(ID_FOOTER_ITEM4);

	 footerItem[3].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
	 inActivation_Image[3].DecodeN(inActivation_Path[3], BITMAP_PIXEL_FORMAT_ARGB8888));

	 footerItem[3].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
	 Activation_Image[3].DecodeN(Activation_Path[3], BITMAP_PIXEL_FORMAT_ARGB8888));

	 inActivation_Path[4] += L"screen-density-xhigh/Setting_InAct.png";
	 Activation_Path[4] += L"screen-density-xhigh/Setting_Act.png";

	 footerItem[4].Construct(ID_FOOTER_ITEM5);

	 footerItem[4].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
	 inActivation_Image[4].DecodeN(inActivation_Path[4], BITMAP_PIXEL_FORMAT_ARGB8888));

	 footerItem[4].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
	 Activation_Image[4].DecodeN(Activation_Path[4], BITMAP_PIXEL_FORMAT_ARGB8888));

	Footer* pFooter = GetFooter();
	if (pFooter)
	{
			pFooter->AddActionEventListener(*this);
	}

	pFooter->AddItem(footerItem[0]);
	pFooter->AddItem(footerItem[1]);
	pFooter->AddItem(footerItem[2]);
	pFooter->AddItem(footerItem[3]);
	pFooter->AddItem(footerItem[4]);
	// Setup back event listener



	SetFormBackEventListener(this);

	return E_SUCCESS;
}
コード例 #19
0
result
CreateProfileForm::OnInitializing(void)
{
	result r = E_SUCCESS;

	Header* pHeader = GetHeader();
	AppAssert(pHeader);
	pHeader->SetStyle(HEADER_STYLE_TITLE);
	String getProfileCreationTitle;
	Application::GetInstance()->GetAppResource()->GetString(IDS_CREATE_TITLE, getProfileCreationTitle);
	pHeader->SetTitleText(getProfileCreationTitle);

	Footer* pFooter = GetFooter();
	AppAssert(pFooter);
	pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);

	FooterItem footerSave;
	footerSave.Construct(ID_BUTTON_SAVE);
	String getSave;
	Application::GetInstance()->GetAppResource()->GetString(IDS_SAVE, getSave);
	footerSave.SetText(getSave);
	pFooter->AddItem(footerSave);
	pFooter->AddActionEventListener(*this);

	SetFormBackEventListener(this);

	static const unsigned int COLOR_BACKGROUND_LABEL = 0xFFEFEDE5;
	static const unsigned int COLOR_TITLE_LABEL = 0xFF808080;

	static const int UI_X_POSITION_GAP = 20;
	static const int UI_WIDTH = GetClientAreaBounds().width - 40;
	static const int UI_X_POSITION_MIDDLE = UI_WIDTH / 4;
	static const int UI_HEIGHT = 112;
	static const int UI_SPACE = 26;
	int yPosition = 0;

	__pScrollPanel = new (std::nothrow) ScrollPanel();
	__pScrollPanel->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height));

	// Subject
	__pSubjectEditField = new (std::nothrow) EditField();
	__pSubjectEditField->Construct(Rectangle(UI_X_POSITION_GAP, yPosition, UI_WIDTH, UI_HEIGHT), EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_FULLSCREEN, EDIT_FIELD_TITLE_STYLE_TOP);
	String getProfileName, getProfileNameGuid;
	Application::GetInstance()->GetAppResource()->GetString(IDS_PROFILE_NAME, getProfileName);
	Application::GetInstance()->GetAppResource()->GetString(IDS_PROFILE_GUIDE, getProfileNameGuid);
	__pSubjectEditField->SetGuideText(getProfileNameGuid);
	__pSubjectEditField->SetName(L"Subject");
	__pSubjectEditField->SetTitleText(getProfileName);
	__pSubjectEditField->SetOverlayKeypadCommandButtonVisible(false);
	__pScrollPanel->AddControl(__pSubjectEditField);

	// Start Date
	int minYear = Calendarbook::GetMinDateTime().GetYear() + 1;
	int maxYear = Calendarbook::GetMaxDateTime().GetYear() - 1;

	Label* pStartDateLabel = new (std::nothrow) Label();
	String getStartDateTime, getEndDateTime;
	Application::GetInstance()->GetAppResource()->GetString(IDS_START_DATETIME, getStartDateTime);
	Application::GetInstance()->GetAppResource()->GetString(IDS_END_DATETIME, getEndDateTime);
	pStartDateLabel->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT + UI_SPACE, UI_WIDTH, UI_HEIGHT), getStartDateTime);
	pStartDateLabel->SetTextVerticalAlignment(ALIGNMENT_TOP);
	pStartDateLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pStartDateLabel->SetTextColor(COLOR_TITLE_LABEL);
	pStartDateLabel->SetBackgroundColor(COLOR_BACKGROUND_LABEL);
	__pScrollPanel->AddControl(pStartDateLabel);

	__pStartEditDate = new (std::nothrow) EditDate();
	__pStartEditDate->Construct(Point(UI_X_POSITION_GAP, yPosition + 10));
	__pStartEditDate->SetCurrentDate();
	__pStartEditDate->SetYearRange(minYear, maxYear);
	__pStartEditDate->AddDateChangeEventListener(*this);
	__pScrollPanel->AddControl(__pStartEditDate);

	__pStartEditTime = new (std::nothrow) EditTime();
	__pStartEditTime->Construct(Point(UI_X_POSITION_MIDDLE * 2 + UI_SPACE, yPosition + 10));
	__pStartEditTime->SetCurrentTime();
	__pStartEditTime->AddTimeChangeEventListener(*this);
	__pScrollPanel->AddControl(__pStartEditTime);

	// Due Date
	Label* pDueDateLabel = new (std::nothrow) Label();
	pDueDateLabel->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT, UI_WIDTH, UI_HEIGHT), getEndDateTime);
	pDueDateLabel->SetTextVerticalAlignment(ALIGNMENT_TOP);
	pDueDateLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pDueDateLabel->SetTextColor(COLOR_TITLE_LABEL);
	pDueDateLabel->SetBackgroundColor(COLOR_BACKGROUND_LABEL);
	__pScrollPanel->AddControl(pDueDateLabel);

	__pDueEditDate = new (std::nothrow) EditDate();
	__pDueEditDate->Construct(Point(UI_X_POSITION_GAP, yPosition + 10));
	__pDueEditDate->SetCurrentDate();
	__pDueEditDate->SetYearRange(minYear, maxYear);
	__pDueEditDate->AddDateChangeEventListener(*this);
	__pScrollPanel->AddControl(__pDueEditDate);

	DateTime endTime;
	endTime = __pStartEditTime->GetTime();
	endTime.AddHours(1);

	__pDueEditTime = new (std::nothrow) EditTime();
	__pDueEditTime->Construct(Point(UI_X_POSITION_MIDDLE * 2 + UI_SPACE, yPosition + 10));
	__pDueEditTime->SetTime(endTime);
	__pDueEditTime->AddTimeChangeEventListener(*this);
	__pScrollPanel->AddControl(__pDueEditTime);

	// Location
	String  getLocationGuide;
	Application::GetInstance()->GetAppResource()->GetString(IDS_LOCATION_GUIDE, getLocationGuide);

	__pLocationButton = new (std::nothrow) Button();
	__pLocationButton->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT + UI_SPACE, UI_WIDTH, UI_HEIGHT), getLocationGuide);
	__pLocationButton->SetActionId(ID_LOCATION_BUTTON);
	__pLocationButton->AddActionEventListener(*this);
	__pScrollPanel->AddControl(__pLocationButton);

	// Volume
	String getVolume;
	Application::GetInstance()->GetAppResource()->GetString(IDS_VOLUME, getVolume);
	__pVolumeSlider = new (std::nothrow) Slider();
	__pVolumeSlider->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT + UI_SPACE, UI_WIDTH/*GetClientAreaBounds().width*/, UI_HEIGHT + 30), BACKGROUND_STYLE_DEFAULT, true, 0, 15);
	__pVolumeSlider->SetValue(5);
	__pVolumeSlider->SetTitleText(getVolume);
	__pVolumeSlider->AddAdjustmentEventListener(*this);
	__pScrollPanel->AddControl(__pVolumeSlider);

	// Wifi
	String getWifi;
	Application::GetInstance()->GetAppResource()->GetString(IDS_WIFI, getWifi);
	__pWifiCheckButton = new (std::nothrow) CheckButton();
	__pWifiCheckButton->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT + UI_SPACE, UI_WIDTH, UI_HEIGHT),
			CHECK_BUTTON_STYLE_ONOFF_SLIDING, BACKGROUND_STYLE_DEFAULT, false, getWifi);
	__pWifiCheckButton->SetActionId(ID_BUTTON_CHECKED, ID_BUTTON_UNCHECKED, ID_BUTTON_SELECTED);
	__pWifiCheckButton->AddActionEventListener(*this);
	__pScrollPanel->AddControl(__pWifiCheckButton);

	// Description
	String getDescription, getDescriptionGuide;
	Application::GetInstance()->GetAppResource()->GetString(IDS_DESCRIPTION, getDescription);
	Application::GetInstance()->GetAppResource()->GetString(IDS_DESCRIPTION_GUIDE, getDescriptionGuide);
	__pDescriptionEditField = new (std::nothrow) EditField();
	__pDescriptionEditField->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT + UI_SPACE, UI_WIDTH, UI_HEIGHT), EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_FULLSCREEN, EDIT_FIELD_TITLE_STYLE_TOP);
	__pDescriptionEditField->SetGuideText(getDescriptionGuide);
	__pDescriptionEditField->SetName(L"Description");
	__pDescriptionEditField->SetTitleText(getDescription);
	__pDescriptionEditField->SetOverlayKeypadCommandButtonVisible(false);
	__pScrollPanel->AddControl(__pDescriptionEditField);

	AddControl(__pScrollPanel);

	return r;
}
コード例 #20
0
ファイル: ProfileListForm.cpp プロジェクト: AhnJihun/passion
result
ProfileListForm::OnInitializing(void)
{
	result r = E_SUCCESS;

	Header* pHeader = GetHeader();
	AppAssert(pHeader);
	pHeader->SetStyle(HEADER_STYLE_TITLE);
	String getHeaderTitle;
	Application::GetInstance()->GetAppResource()->GetString(IDS_HEADER_TITLE, getHeaderTitle);
	pHeader->SetTitleText(getHeaderTitle);

	Footer* pFooter = GetFooter();
	AppAssert(pFooter);
	pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);

	FooterItem footerCreate;
	footerCreate.Construct(ID_FOOTER_CREATE);
	String getFooterCreate;
	UiApp::GetInstance()->GetAppResource()->GetString(IDS_FOOTER_CREATE, getFooterCreate);
	footerCreate.SetText(getFooterCreate);
	pFooter->AddItem(footerCreate);
	pFooter->AddActionEventListener(*this);

	SetFormBackEventListener(this);

	String sql (L"CREATE TABLE IF NOT EXISTS profile(id INTEGER PRIMARY KEY, "
			"title TEXT, "
			"year INTEGER, month INTEGER, day INTEGER, hour INTEGER, minute INTEGER, "
			"year2 INTEGER, month2 INTEGER, day2 INTEGER, hour2 INTEGER, minute2 INTEGER, "
			"latitude INTEGER, longitude INTEGER, volume INTEGER, wifi INTEGER, memo TEXT)");
	__pProfileDatabase->ExecuteSql(sql, true);
    __pTitleList.RemoveAll(true);
    __pIndexList.RemoveAll(true);

//    static const int UI_POSITION_GAP = 0;

//	__pStatusContextButton = new (std::nothrow) Button();
//	__pStatusContextButton->Construct(Rectangle(GetClientAreaBounds().width * 2 / 3, UI_POSITION_GAP, GetClientAreaBounds().width / 3, BUTTON_HEIGHT), L"All");
//	__pStatusContextButton->SetActionId(ID_BUTTON_STATUS);
//	__pStatusContextButton->AddActionEventListener(*this);
//	AddControl(__pStatusContextButton);
//
//	__pStatusContextMenu = new (std::nothrow) ContextMenu();
//	__pStatusContextMenu->Construct(Point(GetClientAreaBounds().width * 5 / 6, BUTTON_HEIGHT * 3), CONTEXT_MENU_STYLE_LIST);
//	__pStatusContextMenu->AddItem(L"All", ID_CONTEXT_STATUS_ALL);
//	__pStatusContextMenu->AddItem(L"None", ID_CONTEXT_STATUS_NONE);
//	__pStatusContextMenu->AddItem(L"Needs action", ID_CONTEXT_STATUS_NEEDS_ACTION);
//	__pStatusContextMenu->AddItem(L"Completed", ID_CONTEXT_STATUS_COMPLETED);
//	__pStatusContextMenu->AddItem(L"In process", ID_CONTEXT_STATUS_IN_PROCESS);
//	__pStatusContextMenu->AddItem(L"Cancelled", ID_CONTEXT_STATUS_CANCELLED);
//	__pStatusContextMenu->AddActionEventListener(*this);

	__pProfileListView = new (std::nothrow) ListView();
	__pProfileListView->Construct(Rectangle(0 /*UI_POSITION_GAP*/, 0/*BUTTON_HEIGHT*/, GetClientAreaBounds().width, GetClientAreaBounds().height /*- BUTTON_HEIGHT*/));
	String getNoList;
	Application::GetInstance()->GetAppResource()->GetString(IDS_EMPTY_LIST, getNoList);
	__pProfileListView->SetTextOfEmptyList(getNoList);
	__pProfileListView->SetItemProvider(*this);
	__pProfileListView->AddListViewItemEventListener(*this);
	__pProfileListView->SetSweepEnabled(true);

	AddControl(__pProfileListView);
	//(*this);
	SettingInfo::AddSettingEventListener(*this);

	ListUpdate();

//	__selectedStatus = TODO_STATUS_ALL;

	return r;
}
コード例 #21
0
ファイル: SettingForm.cpp プロジェクト: JunminLee/Winwin
result
SettingForm::OnInitializing(void)
{
	result r = E_SUCCESS;

	// TODO: Add your initialization code here
	FooterItem footerItem[5];
	AppResource* pAppResource = Application::GetInstance()->GetAppResource();

	Image inActivation_Image[5];
	String inActivation_Path[5];

	Image Activation_Image[5];
	String Activation_Path[5];

	for(int i=0; i<5; i++)
	{
		inActivation_Image[i].Construct();
		inActivation_Path[i] = App::GetInstance()->GetAppResourcePath();

		Activation_Image[i].Construct();
		Activation_Path[i] = App::GetInstance()->GetAppResourcePath();
	}

	inActivation_Path[0] += L"screen-density-xhigh/TimeLine_InAct.png";
	Activation_Path[0] += L"screen-density-xhigh/TimeLine_Act.png";

	footerItem[0].Construct(ID_FOOTER_ITEM1);

	footerItem[0].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
	inActivation_Image[0].DecodeN(inActivation_Path[0], BITMAP_PIXEL_FORMAT_ARGB8888));

	footerItem[0].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
	Activation_Image[0].DecodeN(Activation_Path[0], BITMAP_PIXEL_FORMAT_ARGB8888));

	inActivation_Path[1] += L"screen-density-xhigh/Chatting_InAct.png";
	Activation_Path[1] += L"screen-density-xhigh/Chatting_Act.png";

	footerItem[1].Construct(ID_FOOTER_ITEM2);

	footerItem[1].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
	inActivation_Image[1].DecodeN(inActivation_Path[1], BITMAP_PIXEL_FORMAT_ARGB8888));

	footerItem[1].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
	Activation_Image[1].DecodeN(Activation_Path[1], BITMAP_PIXEL_FORMAT_ARGB8888));

	inActivation_Path[2] += L"screen-density-xhigh/PartnerList_InAct.png";
	Activation_Path[2] += L"screen-density-xhigh/PartnerList_Act.png";

	footerItem[2].Construct(ID_FOOTER_ITEM3);

	footerItem[2].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
	inActivation_Image[2].DecodeN(inActivation_Path[2], BITMAP_PIXEL_FORMAT_ARGB8888));

	footerItem[2].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
	Activation_Image[2].DecodeN(Activation_Path[2], BITMAP_PIXEL_FORMAT_ARGB8888));

	inActivation_Path[3] += L"screen-density-xhigh/PartnerResearch_InAct.png";
	Activation_Path[3] += L"screen-density-xhigh/PartnerResearch_Act.png";

	footerItem[3].Construct(ID_FOOTER_ITEM4);

	footerItem[3].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
	inActivation_Image[3].DecodeN(inActivation_Path[3], BITMAP_PIXEL_FORMAT_ARGB8888));

	footerItem[3].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
	Activation_Image[3].DecodeN(Activation_Path[3], BITMAP_PIXEL_FORMAT_ARGB8888));

	inActivation_Path[4] += L"screen-density-xhigh/Setting_InAct.png";
	Activation_Path[4] += L"screen-density-xhigh/Setting_Act.png";

	footerItem[4].Construct(ID_FOOTER_ITEM5);

	footerItem[4].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
	inActivation_Image[4].DecodeN(inActivation_Path[4], BITMAP_PIXEL_FORMAT_ARGB8888));

	footerItem[4].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
	Activation_Image[4].DecodeN(Activation_Path[4], BITMAP_PIXEL_FORMAT_ARGB8888));

	Label* pLabel;
	pLabel = new Label();

	pLabel->Construct(Rectangle(0,0,this->GetWidth(),this->GetHeight()),L"");
	AppLog("%d ,,,,%d", this->GetWidth(),this->GetHeight());
	pLabel->SetBackgroundBitmap(*pAppResource->GetBitmapN(L"fakepicture.png"));
	pLabel->Draw();

	AddControl(pLabel);
	Footer* pFooter = GetFooter();
	if (pFooter)
	{
		pFooter->AddActionEventListener(*this);
	}

	pFooter->AddItem(footerItem[0]);
	pFooter->AddItem(footerItem[1]);
	pFooter->AddItem(footerItem[2]);
	pFooter->AddItem(footerItem[3]);
	pFooter->AddItem(footerItem[4]);
	// Setup back event listener
	SetFormBackEventListener(this);

	// Get a button via resource ID

	return r;
}
コード例 #22
0
ファイル: EditEventForm.cpp プロジェクト: minicho/TIZEN5-
result
EditEventForm::OnInitializing(void)
{
	result r = E_SUCCESS;

	Header* pHeader = GetHeader();
	AppAssert(pHeader);
	pHeader->SetStyle(HEADER_STYLE_TITLE);
	pHeader->SetTitleText(L"Edit event");

	Footer* pFooter = GetFooter();
	AppAssert(pFooter);
	pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);

	FooterItem footerSave;
	footerSave.Construct(ID_FOOTER_SAVE);
	footerSave.SetText(L"Save");
	pFooter->AddItem(footerSave);

	pFooter->AddActionEventListener(*this);
	SetFormBackEventListener(this);

	static const unsigned int COLOR_BACKGROUND_LABEL = 0xFFEFEDE5;
	static const unsigned int COLOR_TITLE_LABEL = 0xFF808080;
	static const unsigned int COLOR_TIMEZONE_DATA = 0xFF444444;

	static const int UI_X_POSITION_GAP = 20;
	static const int UI_WIDTH = GetClientAreaBounds().width - 40;
	static const int UI_X_POSITION_MIDDLE = UI_WIDTH / 4;
	static const int UI_HEIGHT = 112;
	static const int BUTTON_HEIGHT = 74;
	static const int UI_SPACE = 32;
	static const int FONT_SIZE = 36;

	int yPosition = 0;

	ScrollPanel* pScrollPanel = new (std::nothrow) ScrollPanel();
	pScrollPanel->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height));

	// Subject
	__pSubjectEditField = new (std::nothrow) EditField();
	__pSubjectEditField->Construct(Rectangle(UI_X_POSITION_GAP, yPosition, UI_WIDTH, UI_HEIGHT), EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_FULLSCREEN, EDIT_FIELD_TITLE_STYLE_TOP);
	__pSubjectEditField->SetTitleText(L"Subject");
	__pSubjectEditField->SetGuideText(L"Enter the subject");
	pScrollPanel->AddControl(__pSubjectEditField);


	int minYear = Calendarbook::GetMinDateTime().GetYear() + 1;
	int maxYear = Calendarbook::GetMaxDateTime().GetYear() - 1;

	// Start Date
	Label* pStartDateLabel = new (std::nothrow) Label();
	pStartDateLabel->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT + UI_SPACE, UI_WIDTH, UI_HEIGHT), L"Start");
	pStartDateLabel->SetTextVerticalAlignment(ALIGNMENT_TOP);
	pStartDateLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pStartDateLabel->SetTextColor(COLOR_TITLE_LABEL);
	pStartDateLabel->SetBackgroundColor(COLOR_BACKGROUND_LABEL);
	pScrollPanel->AddControl(pStartDateLabel);

	__pStartEditDate = new (std::nothrow) EditDate();
	__pStartEditDate->Construct(Point(UI_X_POSITION_GAP, yPosition + 10));
	__pStartEditDate->SetCurrentDate();
	__pStartEditDate->SetYearRange(minYear, maxYear);
	__pStartEditDate->AddDateChangeEventListener(*this);
	pScrollPanel->AddControl(__pStartEditDate);

	__pStartEditTime = new (std::nothrow) EditTime();
	__pStartEditTime->Construct(Point(UI_X_POSITION_MIDDLE * 2 + UI_SPACE, yPosition + 10));
	__pStartEditTime->SetCurrentTime();
	__pStartEditTime->AddTimeChangeEventListener(*this);
	pScrollPanel->AddControl(__pStartEditTime);

	// End Date
	Label* pEndDateLabel = new (std::nothrow) Label();
	pEndDateLabel->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT, UI_WIDTH, UI_HEIGHT), L"End");
	pEndDateLabel->SetTextVerticalAlignment(ALIGNMENT_TOP);
	pEndDateLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pEndDateLabel->SetTextColor(COLOR_TITLE_LABEL);
	pEndDateLabel->SetBackgroundColor(COLOR_BACKGROUND_LABEL);
	pScrollPanel->AddControl(pEndDateLabel);

	__pEndEditDate = new (std::nothrow) EditDate();
	__pEndEditDate->Construct(Point(UI_X_POSITION_GAP, yPosition + 10));
	__pEndEditDate->SetCurrentDate();
	__pEndEditDate->SetYearRange(minYear, maxYear);
	__pEndEditDate->AddDateChangeEventListener(*this);
	pScrollPanel->AddControl(__pEndEditDate);

	DateTime endTime;
	endTime = __pStartEditTime->GetTime();
	endTime.AddHours(1);

	__pEndEditTime = new (std::nothrow) EditTime();
	__pEndEditTime->Construct(Point(UI_X_POSITION_MIDDLE * 2 + UI_SPACE, yPosition + 10));
	__pEndEditTime->SetTime(endTime);
	__pEndEditTime->AddTimeChangeEventListener(*this);
	pScrollPanel->AddControl(__pEndEditTime);

	// TimeZone
	Label* pTimeZoneLabel = new (std::nothrow) Label();
	pTimeZoneLabel->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT, UI_WIDTH, UI_HEIGHT), L"TimeZone");
	pTimeZoneLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pTimeZoneLabel->SetTextColor(COLOR_TITLE_LABEL);
	pTimeZoneLabel->SetBackgroundColor(COLOR_BACKGROUND_LABEL);
	pScrollPanel->AddControl(pTimeZoneLabel);

	Label* pTimeZoneDataLabel = new (std::nothrow) Label();
	pTimeZoneDataLabel->Construct(Rectangle(UI_X_POSITION_GAP + UI_X_POSITION_MIDDLE, yPosition, UI_WIDTH * 3 / 4, UI_HEIGHT), L"");
	pTimeZoneDataLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pTimeZoneDataLabel->SetText(GetTimezoneString());
	pTimeZoneDataLabel->SetTextColor(COLOR_TIMEZONE_DATA);
	pTimeZoneDataLabel->SetTextConfig(FONT_SIZE, LABEL_TEXT_STYLE_NORMAL);
	pTimeZoneDataLabel->SetBackgroundColor(COLOR_BACKGROUND_LABEL);
	pScrollPanel->AddControl(pTimeZoneDataLabel);

	// All day Event
	__pIsAllDayButton = new (std::nothrow) CheckButton();
	__pIsAllDayButton->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT + UI_SPACE, UI_WIDTH, UI_HEIGHT), CHECK_BUTTON_STYLE_ONOFF_SLIDING, BACKGROUND_STYLE_DEFAULT, false, L"All day Event");
	__pIsAllDayButton->SetActionId(ID_CHKBUTTON_ISALLDAY_CHECKED, ID_CHKBUTTON_ISALLDAY_UNCHECKED);
	__pIsAllDayButton->SetTextColor(COLOR_TITLE_LABEL);
	__pIsAllDayButton->AddActionEventListener(*this);
	pScrollPanel->AddControl(__pIsAllDayButton);

	// Location
	__pLocationEditField = new (std::nothrow) EditField();
	__pLocationEditField->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT + UI_SPACE, UI_WIDTH, UI_HEIGHT), EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_FULLSCREEN, EDIT_FIELD_TITLE_STYLE_TOP);
	__pLocationEditField->SetTitleText(L"Location");
	__pLocationEditField->SetGuideText(L"Enter the location");
	pScrollPanel->AddControl(__pLocationEditField);

	// Description
	__pDescriptionEditField = new (std::nothrow) EditField();
	__pDescriptionEditField->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT, UI_WIDTH, UI_HEIGHT), EDIT_FIELD_STYLE_NORMAL, INPUT_STYLE_FULLSCREEN, EDIT_FIELD_TITLE_STYLE_TOP);
	__pDescriptionEditField->SetTitleText(L"Description");
	__pDescriptionEditField->SetGuideText(L"Enter the description");
	pScrollPanel->AddControl(__pDescriptionEditField);

	// Reminder
	Label* pReminderLabel = new (std::nothrow) Label();
	pReminderLabel->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT + UI_SPACE, UI_WIDTH, UI_HEIGHT), L"Reminder");
	pReminderLabel->SetTextColor(COLOR_TITLE_LABEL);
	pReminderLabel->SetBackgroundColor(Color(COLOR_BACKGROUND_LABEL));
	pReminderLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pScrollPanel->AddControl(pReminderLabel);

	__pReminderEditField = new (std::nothrow) EditField();
	__pReminderEditField->Construct(Rectangle(UI_X_POSITION_GAP + UI_X_POSITION_MIDDLE, yPosition, UI_WIDTH / 4, UI_HEIGHT), EDIT_FIELD_STYLE_NUMBER, INPUT_STYLE_FULLSCREEN, false, 5);
	__pReminderEditField->SetGuideText(L"0 ~ ");
	__pReminderEditField->SetName(L"Reminder");
	__pReminderEditField->SetTextAlignment(ALIGNMENT_CENTER);
	pScrollPanel->AddControl(__pReminderEditField);

	__pReminderContextButton = new (std::nothrow) Button();
	__pReminderContextButton->Construct(Rectangle(UI_X_POSITION_MIDDLE * 2 + UI_X_POSITION_GAP, yPosition + 19, UI_WIDTH / 2, BUTTON_HEIGHT), L"Minute(s)");
	__pReminderContextButton->SetActionId(ID_BUTTON_REMINDER);
	__pReminderContextButton->AddActionEventListener(*this);
	pScrollPanel->AddControl(__pReminderContextButton);

	__pReminderContextMenu = new (std::nothrow) ContextMenu();
	__pReminderContextMenu->Construct(Point(UI_X_POSITION_GAP + UI_WIDTH * 3 / 4, yPosition + UI_HEIGHT * 2), CONTEXT_MENU_STYLE_LIST, CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD);
	__pReminderContextMenu->AddItem(L"Minute(s)", ID_CONTEXT_REMINDER_MINUTE);
	__pReminderContextMenu->AddItem(L"Hour(s)", ID_CONTEXT_REMINDER_HOUR);
	__pReminderContextMenu->AddItem(L"Day(s)", ID_CONTEXT_REMINDER_DAY);
	__pReminderContextMenu->AddItem(L"Week(s)", ID_CONTEXT_REMINDER_WEEK);
	__pReminderContextMenu->AddActionEventListener(*this);

	// Recurrence
	Label* pRecurrenceLabel = new (std::nothrow) Label();
	pRecurrenceLabel->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT, UI_WIDTH, UI_HEIGHT), L"Recurrence");
	pRecurrenceLabel->SetTextConfig(29, LABEL_TEXT_STYLE_NORMAL);
	pRecurrenceLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pRecurrenceLabel->SetTextColor(COLOR_TITLE_LABEL);
	pRecurrenceLabel->SetBackgroundColor(Color(COLOR_BACKGROUND_LABEL));
	pScrollPanel->AddControl(pRecurrenceLabel);

	__pSetRecurrenceButton = new (std::nothrow) Button();
	__pSetRecurrenceButton->Construct(Rectangle(UI_X_POSITION_MIDDLE + UI_X_POSITION_GAP, yPosition + 19, UI_WIDTH * 3 / 4, BUTTON_HEIGHT), L"None");
	__pSetRecurrenceButton->SetActionId(ID_BUTTON_RECURRENCE);
	__pSetRecurrenceButton->AddActionEventListener(*this);
	pScrollPanel->AddControl(__pSetRecurrenceButton);

	// Priority
	Label* pPriorityLabel = new (std::nothrow) Label();
	pPriorityLabel->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT + UI_SPACE, UI_WIDTH, UI_HEIGHT), L"Priority");
	pPriorityLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pPriorityLabel->SetTextColor(COLOR_TITLE_LABEL);
	pPriorityLabel->SetBackgroundColor(COLOR_BACKGROUND_LABEL);
	pScrollPanel->AddControl(pPriorityLabel);

	__pPriorityContextButton = new (std::nothrow) Button();
	__pPriorityContextButton->Construct(Rectangle(UI_X_POSITION_MIDDLE + UI_X_POSITION_GAP, yPosition + 19, UI_WIDTH * 3 / 4, BUTTON_HEIGHT), L"Low");
	__pPriorityContextButton->SetActionId(ID_BUTTON_PRIORITY);
	__pPriorityContextButton->AddActionEventListener(*this);
	pScrollPanel->AddControl(__pPriorityContextButton);

	__pPriorityContextMenu = new (std::nothrow) ContextMenu();
	__pPriorityContextMenu->Construct(Point(UI_X_POSITION_GAP + UI_WIDTH * 5 / 8, yPosition + UI_HEIGHT * 2), CONTEXT_MENU_STYLE_LIST, CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD);
	__pPriorityContextMenu->AddItem(L"High", ID_CONTEXT_PRIORITY_HIGH);
	__pPriorityContextMenu->AddItem(L"Normal", ID_CONTEXT_PRIORITY_NORMAL);
	__pPriorityContextMenu->AddItem(L"Low", ID_CONTEXT_PRIORITY_LOW);
	__pPriorityContextMenu->AddActionEventListener(*this);

	// Sensitivity
	Label* pSensitivityLabel = new (std::nothrow) Label();
	pSensitivityLabel->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT, UI_WIDTH, UI_HEIGHT), L"Sensitivity");
	pSensitivityLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pSensitivityLabel->SetTextColor(COLOR_TITLE_LABEL);
	pSensitivityLabel->SetBackgroundColor(COLOR_BACKGROUND_LABEL);
	pScrollPanel->AddControl(pSensitivityLabel);

	__pSensitivityContextButton = new (std::nothrow) Button();
	__pSensitivityContextButton->Construct(Rectangle(UI_X_POSITION_MIDDLE + UI_X_POSITION_GAP, yPosition + 19, UI_WIDTH * 3 / 4, BUTTON_HEIGHT), L"Public");
	__pSensitivityContextButton->SetActionId(ID_BUTTON_SENSITIVITY);
	__pSensitivityContextButton->AddActionEventListener(*this);
	pScrollPanel->AddControl(__pSensitivityContextButton);

	__pSensitivityContextMenu = new (std::nothrow) ContextMenu();
	__pSensitivityContextMenu->Construct(Point(UI_X_POSITION_GAP + UI_WIDTH * 5 / 8, yPosition + UI_HEIGHT * 2), CONTEXT_MENU_STYLE_LIST, CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD);
	__pSensitivityContextMenu->AddItem(L"Public", ID_CONTEXT_SENSITIVITY_PUBLIC);
	__pSensitivityContextMenu->AddItem(L"Private", ID_CONTEXT_SENSITIVITY_PRIVATE);
	__pSensitivityContextMenu->AddItem(L"Confidential", ID_CONTEXT_SENSITIVITY_CONFIDENTIAL);
	__pSensitivityContextMenu->AddActionEventListener(*this);

	// Status
	Label* pStatusLabel = new (std::nothrow) Label();
	pStatusLabel->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT, UI_WIDTH, UI_HEIGHT), L"Status");
	pStatusLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pStatusLabel->SetTextColor(COLOR_TITLE_LABEL);
	pStatusLabel->SetBackgroundColor(COLOR_BACKGROUND_LABEL);
	pScrollPanel->AddControl(pStatusLabel);

	__pStatusContextButton = new (std::nothrow) Button();
	__pStatusContextButton->Construct(Rectangle(UI_X_POSITION_MIDDLE + UI_X_POSITION_GAP, yPosition + 19, UI_WIDTH * 3 / 4, BUTTON_HEIGHT), L"None");
	__pStatusContextButton->SetActionId(ID_BUTTON_STATUS);
	__pStatusContextButton->AddActionEventListener(*this);
	pScrollPanel->AddControl(__pStatusContextButton);

	__pStatusContextMenu = new (std::nothrow) ContextMenu();
	__pStatusContextMenu->Construct(Point(UI_X_POSITION_GAP + UI_WIDTH * 5 / 8, yPosition + UI_HEIGHT * 2), CONTEXT_MENU_STYLE_LIST, CONTEXT_MENU_ANCHOR_DIRECTION_UPWARD);
	__pStatusContextMenu->AddItem(L"None", ID_CONTEXT_STATUS_NONE);
	__pStatusContextMenu->AddItem(L"Confirmed", ID_CONTEXT_STATUS_CONFIRMED);
	__pStatusContextMenu->AddItem(L"Cancelled", ID_CONTEXT_STATUS_CANCELLED);
	__pStatusContextMenu->AddItem(L"Tentative", ID_CONTEXT_STATUS_TENTATIVE);
	__pStatusContextMenu->AddActionEventListener(*this);

	AddControl(pScrollPanel);

	return r;
}
コード例 #23
0
ファイル: MapForm.cpp プロジェクト: the0s/BukkaTrips
result
MapForm::CreateForm(Frame* pFrame)
{
	result r = E_SUCCESS;
	_pFrame = pFrame;

	r = Form::Construct(FORM_STYLE_NORMAL | FORM_STYLE_HEADER | FORM_STYLE_INDICATOR | FORM_STYLE_FOOTER);

	Header* pHeader = GetHeader();
	if (pHeader)
	{
		pHeader->SetStyle(HEADER_STYLE_TITLE);
		pHeader->SetName(L"Map Control");
		pHeader->SetTitleText(L"Map Control");
	}

	Footer* pFooter = GetFooter();
	if (pFooter)
	{
		pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT );

		FooterItem footerItem1;
		footerItem1.Construct(ACTION_ID_MY_LOCATION);
		footerItem1.SetText("My\nLocation");
		pFooter->AddItem(footerItem1);

		FooterItem footerItem2;
		footerItem2.Construct(ACTION_ID_INFOWINDOW_BUTTON);
		footerItem2.SetText("Show\nInfowindow");
		pFooter->AddItem(footerItem2);

		FooterItem footerItem3;
		footerItem3.Construct(ACTION_ID_OVERLAY_BUTTON);
		footerItem3.SetText("Show\nOverlays");
		pFooter->AddItem(footerItem3);

		FooterItem footerItem4;
		footerItem4.Construct(ACTION_ID_ROTATE_BUTTON);
		footerItem4.SetText("Rotate\nMap");
		pFooter->AddItem(footerItem4);

		FooterItem footerItem5;
		footerItem5.Construct(ACTION_ID_BACK);
		footerItem5.SetText("Back");
		pFooter->AddItem(footerItem5);

		pFooter->AddActionEventListener(*this);
	}
	if (!InitializeMapService())
	{
		AppLog("Form::InitializeMapService() has failed.");
		goto CATCH;
	}

	AddOrientationEventListener(*this);
	SetOrientation(ORIENTATION_AUTOMATIC_FOUR_DIRECTION);
	
	CreatePopups();
	_pFrame->AddControl(*this);

	Draw();
	Show();

	return E_SUCCESS;

CATCH:
	return E_FAILURE;
}
コード例 #24
0
ファイル: PartnerListForm.cpp プロジェクト: JunminLee/Winwin
result
PartnerListForm::OnInitializing(void)
{
	result r = E_SUCCESS;




	// TODO: Add your initialization code here
	FooterItem footerItem[5];
	AppResource* pAppResource = Application::GetInstance()->GetAppResource();

	Image inActivation_Image[5];
	String inActivation_Path[5];

	Image Activation_Image[5];
	String Activation_Path[5];

	for(int i=0; i<5; i++)
	{
		inActivation_Image[i].Construct();
		inActivation_Path[i] = App::GetInstance()->GetAppResourcePath();

		Activation_Image[i].Construct();
		Activation_Path[i] = App::GetInstance()->GetAppResourcePath();
	}

	inActivation_Path[0] += L"screen-density-xhigh/TimeLine_InAct.png";
	Activation_Path[0] += L"screen-density-xhigh/TimeLine_Act.png";

	footerItem[0].Construct(ID_FOOTER_ITEM1);

	footerItem[0].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
	inActivation_Image[0].DecodeN(inActivation_Path[0], BITMAP_PIXEL_FORMAT_ARGB8888));

	footerItem[0].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
	Activation_Image[0].DecodeN(Activation_Path[0], BITMAP_PIXEL_FORMAT_ARGB8888));

	inActivation_Path[1] += L"screen-density-xhigh/Chatting_InAct.png";
	Activation_Path[1] += L"screen-density-xhigh/Chatting_Act.png";

	footerItem[1].Construct(ID_FOOTER_ITEM2);

	footerItem[1].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
	inActivation_Image[1].DecodeN(inActivation_Path[1], BITMAP_PIXEL_FORMAT_ARGB8888));

	footerItem[1].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
	Activation_Image[1].DecodeN(Activation_Path[1], BITMAP_PIXEL_FORMAT_ARGB8888));

	inActivation_Path[2] += L"screen-density-xhigh/PartnerList_InAct.png";
	Activation_Path[2] += L"screen-density-xhigh/PartnerList_Act.png";

	footerItem[2].Construct(ID_FOOTER_ITEM3);

	footerItem[2].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
	inActivation_Image[2].DecodeN(inActivation_Path[2], BITMAP_PIXEL_FORMAT_ARGB8888));

	footerItem[2].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
	Activation_Image[2].DecodeN(Activation_Path[2], BITMAP_PIXEL_FORMAT_ARGB8888));

	inActivation_Path[3] += L"screen-density-xhigh/PartnerResearch_InAct.png";
	Activation_Path[3] += L"screen-density-xhigh/PartnerResearch_Act.png";

	footerItem[3].Construct(ID_FOOTER_ITEM4);

	footerItem[3].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
	inActivation_Image[3].DecodeN(inActivation_Path[3], BITMAP_PIXEL_FORMAT_ARGB8888));

	footerItem[3].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
	Activation_Image[3].DecodeN(Activation_Path[3], BITMAP_PIXEL_FORMAT_ARGB8888));

	inActivation_Path[4] += L"screen-density-xhigh/Setting_InAct.png";
	Activation_Path[4] += L"screen-density-xhigh/Setting_Act.png";

	footerItem[4].Construct(ID_FOOTER_ITEM5);
	footerItem[4].SetBackgroundBitmap(FOOTER_ITEM_STATUS_NORMAL,
	inActivation_Image[4].DecodeN(inActivation_Path[4], BITMAP_PIXEL_FORMAT_ARGB8888));
	footerItem[4].SetBackgroundBitmap(FOOTER_ITEM_STATUS_PRESSED,
	Activation_Image[4].DecodeN(Activation_Path[4], BITMAP_PIXEL_FORMAT_ARGB8888));


	Footer* pFooter = GetFooter();
	if (pFooter)
	{
		pFooter->AddActionEventListener(*this);
	}


	head = new Panel();

	head->Construct(Rectangle(0,0, this->GetWidth(), 96));
	head->SetBackgroundColor(Color(0,181,238,255));


	head_center = new Button();
	head_center->Construct(Rectangle(257, 32, 206, 40));
	head_center->SetNormalBackgroundBitmap(*(pAppResource->GetBitmapN(L"partnerList2.png")));

	head_left = new Button();
	head_left->Construct(Rectangle(37, 22, 62, 56));
	head_left->SetNormalBackgroundBitmap(*(pAppResource->GetBitmapN(L"friend_plz.png")));
	head_left->SetActionId(ID_LIST_PARTNER_LEFT);
	head_left->AddActionEventListener(*this);


	head_right = new Button();
	head_right->Construct(Rectangle(646, 29, 38, 43));
	head_right->SetNormalBackgroundBitmap(*(pAppResource->GetBitmapN(L"flag_partner.png")));
	head_right->SetActionId(ID_LIST_PARTNER_RIGHT);
	head_right->AddActionEventListener(*this);

	this->AddControl(head);
	this->AddControl(head_center);
	this->AddControl(head_left);
	this->AddControl(head_right);

	pFooter->AddItem(footerItem[0]);
	pFooter->AddItem(footerItem[1]);
	pFooter->AddItem(footerItem[2]);
	pFooter->AddItem(footerItem[3]);
	pFooter->AddItem(footerItem[4]);
	// Setup back event listener
	SetFormBackEventListener(this);
	CreateGroupedListView();


	String check_name;





	p.Initial(L"Black Widow",L"s-face7.png", L"nationalflag.png","한국" , "축구, 배구", L"hobby.png", L"Eng", 3 );
	ArrPartnerItem.Add(p);
	CheckGorupComponent();

	p.Initial(L"Captain Amerian",L"s-face6.png",L"nationalflag.png","한국","축구, 배구", L"hobby.png", L"Eng", 3);
	ArrPartnerItem.Add(p);
	CheckGorupComponent();

	p.Initial(L"Hawk Eye",L"s-face2.png",L"nationalflag.png","한국","독서", L"hobby.png", L"Eng", 3);
	ArrPartnerItem.Add(p);
	CheckGorupComponent();

	p.Initial(L"Hulk",L"s-face5.png",L"nationalflag.png","한국","공부, 토론", L"hobby.png", L"Eng", 3);
	ArrPartnerItem.Add(p);
	CheckGorupComponent();

	p.Initial(L"Iron Man",L"s-face1.png",L"nationalflag.png","한국","랩, 노래", L"hobby.png", L"Eng", 3);
	ArrPartnerItem.Add(p);
	CheckGorupComponent();

	p.Initial(L"Nick Fury",L"s-face4.png",L"nationalflag.png","한국","족구, 테니스", L"hobby.png", L"Eng", 3);
	ArrPartnerItem.Add(p);
	CheckGorupComponent();

	p.Initial(L"Thor",L"s-face3.png",L"nationalflag.png","한국","헬스", L"hobby.png", L"Eng", 3);
	ArrPartnerItem.Add(p);
	CheckGorupComponent();



	return r;
}
コード例 #25
0
void
OverlayKeypadForm::OnKeypadWillOpen(Control& source)
{
	Footer* pFooter = GetFooter();
	pFooter->SetShowState(false);
}
コード例 #26
0
result
ProfileDetailForm::OnInitializing(void)
{
	result r = E_SUCCESS;

	Header* pHeader = GetHeader();
	AppAssert(pHeader);
	pHeader->SetStyle(HEADER_STYLE_TITLE);
	String getDetails;
	Application::GetInstance()->GetAppResource()->GetString(IDS_DETAILS, getDetails);
	pHeader->SetTitleText(getDetails);

	Footer* pFooter = GetFooter();
	AppAssert(pFooter);
	pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);


	String getEdit;
	Application::GetInstance()->GetAppResource()->GetString(IDS_EDIT, getEdit);
	FooterItem footerEdit;
	footerEdit.Construct(ID_FOOTER_EDIT);
	footerEdit.SetText(getEdit);
	pFooter->AddItem(footerEdit);


	String getDelete;
	Application::GetInstance()->GetAppResource()->GetString(IDS_DELETE, getDelete);
	FooterItem footerDelete;
	footerDelete.Construct(ID_FOOTER_DELETE);
	footerDelete.SetText(getDelete);
	pFooter->AddItem(footerDelete);
	pFooter->AddActionEventListener(*this);

	SetFormBackEventListener(this);

	static const unsigned int COLOR_BACKGROUND_LABEL = 0xFFEFEDE5;
	static const unsigned int COLOR_TITLE_LABEL = 0xFF808080;

	static const int UI_X_POSITION_GAP = 20;
	static const int UI_WIDTH = GetClientAreaBounds().width - 40;
	static const int UI_X_POSITION_MIDDLE = UI_WIDTH / 4 + UI_X_POSITION_GAP;
	static const int UI_HEIGHT = 112;
	static const int UI_SPACE = 26;
	int yPosition = 0;

	ScrollPanel* pScrollPanel = new (std::nothrow) ScrollPanel();
	pScrollPanel->Construct(Rectangle(0, 0, GetClientAreaBounds().width, GetClientAreaBounds().height));

	String date;
	DateTime displayStartDate;
	DateTime displayDueDate;

	// Subject
	Label* pSubjectLabel = new (std::nothrow) Label();
	String getProfileName;
	Application::GetInstance()->GetAppResource()->GetString(IDS_PROFILE_NAME, getProfileName);
	pSubjectLabel->Construct(Rectangle(UI_X_POSITION_GAP, yPosition, UI_WIDTH, UI_HEIGHT), getProfileName);
	pSubjectLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pSubjectLabel->SetTextColor(COLOR_TITLE_LABEL);
	pSubjectLabel->SetBackgroundColor(Color(COLOR_BACKGROUND_LABEL));
	pScrollPanel->AddControl(pSubjectLabel);

	__pSubjectLabelData = new (std::nothrow) Label();
	__pSubjectLabelData->Construct(Rectangle(UI_X_POSITION_MIDDLE, yPosition, UI_WIDTH * 3 / 4, UI_HEIGHT), L"");
	__pSubjectLabelData->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pScrollPanel->AddControl(__pSubjectLabelData);

	// Start Date
	Label* pStartDateLabel = new (std::nothrow) Label();
	String getStartDatetime;
	Application::GetInstance()->GetAppResource()->GetString(IDS_START_DATETIME, getStartDatetime);
	pStartDateLabel->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT + UI_SPACE, UI_WIDTH, UI_HEIGHT), getStartDatetime);
	pStartDateLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pStartDateLabel->SetTextColor(COLOR_TITLE_LABEL);
	pStartDateLabel->SetBackgroundColor(Color(COLOR_BACKGROUND_LABEL));
	pScrollPanel->AddControl(pStartDateLabel);

	__pStartDateLabelData = new (std::nothrow) Label();
	__pStartDateLabelData->Construct(Rectangle(UI_X_POSITION_MIDDLE, yPosition, UI_WIDTH * 3 / 4, UI_HEIGHT), L"");
	__pStartDateLabelData->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pScrollPanel->AddControl(__pStartDateLabelData);

	// Due Date
	Label* pDueDateLabel = new (std::nothrow) Label();
	String getEndDatetime;
	Application::GetInstance()->GetAppResource()->GetString(IDS_END_DATETIME, getEndDatetime);
	pDueDateLabel->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT, UI_WIDTH, UI_HEIGHT), getEndDatetime);
	pDueDateLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pDueDateLabel->SetTextColor(COLOR_TITLE_LABEL);
	pDueDateLabel->SetBackgroundColor(Color(COLOR_BACKGROUND_LABEL));
	pScrollPanel->AddControl(pDueDateLabel);

	__pDueDateLabelData = new (std::nothrow) Label();
	__pDueDateLabelData->Construct(Rectangle(UI_X_POSITION_MIDDLE, yPosition, UI_WIDTH * 3 / 4, UI_HEIGHT), L"");
	__pDueDateLabelData->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pScrollPanel->AddControl(__pDueDateLabelData);

	// Location
	Label* pLocationLabel = new (std::nothrow) Label();
	String getLocation;
	Application::GetInstance()->GetAppResource()->GetString(IDS_LOCATION, getLocation);
	pLocationLabel->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT + UI_SPACE, UI_WIDTH, UI_HEIGHT), getLocation);
	pLocationLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pLocationLabel->SetTextColor(COLOR_TITLE_LABEL);
	pLocationLabel->SetBackgroundColor(Color(COLOR_BACKGROUND_LABEL));
	pScrollPanel->AddControl(pLocationLabel);

	__pLocationLabelData = new (std::nothrow) Label();
	__pLocationLabelData->Construct(Rectangle(UI_X_POSITION_MIDDLE, yPosition, UI_WIDTH * 3 / 4, UI_HEIGHT), L"");
	__pLocationLabelData->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pScrollPanel->AddControl(__pLocationLabelData);

	// Volume
	Label* pVolumeLabel = new (std::nothrow) Label();
	String getVolume;
	Application::GetInstance()->GetAppResource()->GetString(IDS_VOLUME, getVolume);
	pVolumeLabel->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT + UI_SPACE, UI_WIDTH, UI_HEIGHT), getVolume);
	pVolumeLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pVolumeLabel->SetTextColor(COLOR_TITLE_LABEL);
	pVolumeLabel->SetBackgroundColor(Color(COLOR_BACKGROUND_LABEL));
	pScrollPanel->AddControl(pVolumeLabel);

	__pVolumeLabelData = new (std::nothrow) Label();
	__pVolumeLabelData->Construct(Rectangle(UI_X_POSITION_MIDDLE, yPosition, UI_WIDTH * 3 / 4, UI_HEIGHT), L"");
	__pVolumeLabelData->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pScrollPanel->AddControl(__pVolumeLabelData);

	// Wifi
	Label* pWifiLabel = new (std::nothrow) Label();
	String getWifi;
	Application::GetInstance()->GetAppResource()->GetString(IDS_WIFI, getWifi);
	pWifiLabel->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT, UI_WIDTH, UI_HEIGHT), getWifi);
	pWifiLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pWifiLabel->SetTextColor(COLOR_TITLE_LABEL);
	pWifiLabel->SetBackgroundColor(Color(COLOR_BACKGROUND_LABEL));
	pScrollPanel->AddControl(pWifiLabel);

	__pWifiLabelData = new (std::nothrow) Label();
	__pWifiLabelData->Construct(Rectangle(UI_X_POSITION_MIDDLE, yPosition, UI_WIDTH * 3 / 4, UI_HEIGHT), L"");
	__pWifiLabelData->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pScrollPanel->AddControl(__pWifiLabelData);

	// Description
	Label* pDescriptionLabel = new (std::nothrow) Label();
	String getMemo;
	Application::GetInstance()->GetAppResource()->GetString(IDS_DESCRIPTION, getMemo);
	pDescriptionLabel->Construct(Rectangle(UI_X_POSITION_GAP, yPosition += UI_HEIGHT + UI_SPACE, UI_WIDTH, UI_HEIGHT), getMemo);
	pDescriptionLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pDescriptionLabel->SetTextColor(COLOR_TITLE_LABEL);
	pDescriptionLabel->SetBackgroundColor(Color(COLOR_BACKGROUND_LABEL));
	pScrollPanel->AddControl(pDescriptionLabel);

	__pDescriptionLabelData = new (std::nothrow) Label();
	__pDescriptionLabelData->Construct(Rectangle(UI_X_POSITION_MIDDLE, yPosition, UI_WIDTH * 3 / 4, UI_HEIGHT), L"");
	__pDescriptionLabelData->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
	pScrollPanel->AddControl(__pDescriptionLabelData);

	AddControl(pScrollPanel);

	return r;
}