result HelloWorldForm::OnInitializing(void) { result r = E_SUCCESS; // TODO: Add your initialization code here // Setup back event listener SetFormBackEventListener(this); // Get a button via resource ID Tizen::Ui::Controls::Button* pButtonOk = static_cast< Button* >(GetControl(IDC_BUTTON_OK)); if (pButtonOk != null) { pButtonOk->SetActionId(IDA_BUTTON_OK); pButtonOk->AddActionEventListener(*this); } __pLabelPrint = static_cast< TextBox* >(GetControl(IDC_TEXTBOX2)); TryReturn(__pLabelPrint != null, r = E_SYSTEM, "Panel::GetControl(IDC_TEXTBOX2) failed"); __pLabelPrint->SetText(__count.ToString()); return r; }
result cantataMainForm::OnInitializing(void) { result r = E_SUCCESS; // TODO: // Add your initialization code here // Setup back event listener SetFormBackEventListener(this); // Get a button via resource ID Tizen::Ui::Controls::Button *pButtonPhotoStory = static_cast<Button*>(GetControl(IDC_BUTTON_PHOTOSTORY)); if (pButtonPhotoStory != null) { pButtonPhotoStory->SetActionId(ID_BUTTON_PHOTOSTORY); pButtonPhotoStory->AddActionEventListener(*this); pButtonPhotoStory->AddTouchEventListener(*this); } // Button *pBtnadd = static_cast<Button *>(GetControl(IDC_BUTTON_ADD)); // if(pBtnadd) // { // pBtnadd->SetActionId(ID_BUTTON_ADD); // pBtnadd->AddActionEventListener(*this); // pBtnadd->AddTouchEventListener(*this); // } return r; }
result ThreadTestAppForm::OnInitializing(void) { result r = E_SUCCESS; // TODO: Add your initialization code here // Setup back event listener SetFormBackEventListener(this); // Get a button via resource ID Tizen::Ui::Controls::Button* pButtonOk = static_cast< Button* >(GetControl(IDC_BUTTON_OK)); if (pButtonOk != null) { pButtonOk->SetActionId(IDA_BUTTON_OK); pButtonOk->AddActionEventListener(*this); } pThread = new Thread; pThread->Construct(*this); pThread->Start(); //pThread->Join(); // 활성화하면 스레드가 종료된 후 폼이 보여진다. pThread2 = new Thread; pSecondThread = new SecondThread(); pThread2->Construct(*pSecondThread); pThread2->Start(); return r; }
result HelloWorldMainForm::OnInitializing(void) { result r = E_SUCCESS; // TODO: Add your initialization code here // Setup back event listener SetFormBackEventListener(this); // Get a button via resource ID Tizen::Ui::Controls::Button* pButtonOk = static_cast<Button*>(GetControl(IDC_BUTTON_OK)); if (pButtonOk != null) { pButtonOk->SetActionId(IDA_BUTTON_OK); pButtonOk->AddActionEventListener(*this); } return r; }
result FormModeSelect::OnInitializing(void) { result r = E_SUCCESS; // TODO: Add your initialization code here // Setup back event listener SetFormBackEventListener(this); // Get a button via resource ID Tizen::Ui::Controls::Button* pButtonTmp = static_cast< Button* >(GetControl(IDC_MAIN_BUTTON_LOGIN)); pButtonTmp->SetShowState(false); Tizen::Ui::Controls::Button* pButtonTime = static_cast< Button* >(GetControl(IDC_MAIN_BUTTON_PLAY)); if (pButtonTime != null) { pButtonTime->SetText("Time Attck"); pButtonTime->SetActionId(IDA_BUTTON_TIME); pButtonTime->AddActionEventListener(*this); } Tizen::Ui::Controls::Button* pButtonSeconds = static_cast< Button* >(GetControl(IDC_MAIN_BUTTON_LEADERBOARD)); if (pButtonSeconds != null) { pButtonSeconds->SetText("60 Seconds"); pButtonSeconds->SetActionId(IDA_BUTTON_SECONDS); pButtonSeconds->AddActionEventListener(*this); } Tizen::Ui::Controls::Button* pButtonMulti = static_cast< Button* >(GetControl(IDC_MAIN_BUTTON_ACHIEVEMENT)); if (pButtonMulti != null) { pButtonMulti->SetText("Multi Play"); pButtonMulti->SetActionId(IDA_BUTTON_MULTI); pButtonMulti->AddActionEventListener(*this); } // cloud save Tizen::Ui::Controls::Label * pLabelRecord = static_cast < Label* >(GetControl(IDC_LABEL_RECORD)); pLabelRecord->SetShowState(false); Tizen::Ui::Controls::Label * pLabelRecordImg = static_cast < Label* >(GetControl(IDC_LABEL_RECORDIMG)); pLabelRecordImg->SetShowState(false); // attackhelper Tizen::Ui::Controls::Label * pLabelPlayNum = static_cast < Label* >(GetControl(IDC_LABEL_PLAYNUM)); String str = Integer::ToString(playNum); pLabelPlayNum->SetText(str); pLabelPlayNum->Draw(); return r; }
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; }