本文整理汇总了C++中Footer::SetStyle方法的典型用法代码示例。如果您正苦于以下问题:C++ Footer::SetStyle方法的具体用法?C++ Footer::SetStyle怎么用?C++ Footer::SetStyle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Footer
的用法示例。
在下文中一共展示了Footer::SetStyle方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetFooter
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();
}
}
示例2: GetFormStyle
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;
}
示例3: GetFooter
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;
}
示例4: GetHeader
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();
//.........这里部分代码省略.........
示例5: GetHeader
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;
}
示例6: GetHeader
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;
//.........这里部分代码省略.........
示例7: sql
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;
}
示例8: GetHeader
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();
//.........这里部分代码省略.........
示例9: GetHeader
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;
}