2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file StDisplayForm.cpp
19 * @brief This is the implementation file for DisplayForm class.
23 #include "StDisplayForm.h"
24 #include "StResourceManager.h"
25 #include "StSettingScenesList.h"
28 using namespace Tizen::Base;
29 using namespace Tizen::Graphics;
30 using namespace Tizen::System;
31 using namespace Tizen::Ui;
32 using namespace Tizen::Ui::Controls;
33 using namespace Tizen::Ui::Scenes;
35 static const int W_RESIZE_LABEL_GAP = 110;
36 static const int RELATIVE_LAYOUT_ITEM_RIGHT_MARGIN = 140;
38 static const int BACKLIGHT_TIME_15_SECONDS = 15;
39 static const int BACKLIGHT_TIME_30_SECONDS = 30;
40 static const int BACKLIGHT_TIME_1_MINUTE = 60;
41 static const int BACKLIGHT_TIME_2_MINUTES = 120;
42 static const int BACKLIGHT_TIME_5_MINUTES = 300;
43 static const int BACKLIGHT_TIME_10_MINUTES = 600;
45 static const int ID_GROUP_AUTO_ROTATE_SCREEN = 0;
46 static const int ID_ITEM_AUTO_ROTATE_SCREEN = 0;
48 static const int ID_GROUP_BACKLIGHT_TIME = 1;
49 static const int ID_ITEM_BACKLIGHT_TIME = 0;
51 static const int ID_GROUP_BACKLIGHT_TIME_LIST = 2;
52 static const int ID_GROUP_BACKLIGHT_TIME_LIST_ITEM_COUNT = 6;
53 static const int ID_ITEM_BACKLIGHT_TIME_15_SECONDS = 0;
54 static const int ID_ITEM_BACKLIGHT_TIME_30_SECONDS = 1;
55 static const int ID_ITEM_BACKLIGHT_TIME_1_MINUTE = 2;
56 static const int ID_ITEM_BACKLIGHT_TIME_2_MINUTES = 3;
57 static const int ID_ITEM_BACKLIGHT_TIME_5_MINUTES = 4;
58 static const int ID_ITEM_BACKLIGHT_TIME_10_MINUTES = 5;
60 static const int ID_GROUP_FONT = 3;
61 static const int ID_ITEM_FONT = 0;
63 static const int ID_GROUP_BATTERY_PERCENTAGE = 4;
64 static const int ID_ITEM_BATTERY_PERCENTAGE = 0;
66 static const int ID_GROUP_BATTERY_PERCENTAGE_HELP = 5;
67 static const int ID_ITEM_BATTERY_PERCENTAGE_HELP = 0;
69 static const int ID_GROUP_DISPLAY_MAX_COUNT = 6;
70 static const int ID_GROUP_DEFAULT_ITEM_COUNT = 1;
72 static const int ID_GROUP_COUNT = 6;
73 static const int ID_GROUP_MAX_ITEM_COUNT = ID_GROUP_DISPLAY_MAX_COUNT;
75 DisplayForm::DisplayForm(void)
79 DisplayForm::~DisplayForm(void)
84 DisplayForm::CreateFooter(void)
86 Footer* pFooter = GetFooter();
89 pFooter->SetStyle(FOOTER_STYLE_BUTTON_TEXT);
90 pFooter->AddActionEventListener(*this);
92 SetFormBackEventListener(this);
96 DisplayForm::OnInitializing(void)
98 CreateHeader(ResourceManager::GetString(L"IDS_ST_BODY_DISPLAY"));
101 AppLogDebug("ENTER");
107 DisplayForm::OnTerminating(void)
111 SetFormBackEventListener(null);
116 DisplayForm::OnSceneActivatedN(const Tizen::Ui::Scenes::SceneId& previousSceneId, const Tizen::Ui::Scenes::SceneId& currentSceneId, Tizen::Base::Collection::IList* pArgs)
118 __pTableView->UpdateTableView();
120 bool autoRotation = false;
121 if (SettingInfo::GetValue(SETTING_INFO_KEY_SCREEN_ROTAION_AUTO, autoRotation) == E_SUCCESS)
123 __pTableView->SetItemChecked(ID_GROUP_AUTO_ROTATE_SCREEN, ID_ITEM_AUTO_ROTATE_SCREEN, autoRotation);
126 bool batteryPercentage = false;
127 if (SettingInfo::GetValue(SETTING_INFO_KEY_BATTERY_PERCENTAGE, batteryPercentage) == E_SUCCESS)
129 __pTableView->SetItemChecked(ID_GROUP_BATTERY_PERCENTAGE, ID_ITEM_BATTERY_PERCENTAGE, batteryPercentage);
132 __pTableView->SetItemChecked(ID_GROUP_BACKLIGHT_TIME_LIST, GetBackLightTimeIndex(), true);
133 __pTableView->CollapseGroup(ID_GROUP_BACKLIGHT_TIME_LIST);
137 DisplayForm::OnSceneDeactivated(const Tizen::Ui::Scenes::SceneId& currentSceneId, const Tizen::Ui::Scenes::SceneId& nextSceneId)
142 DisplayForm::OnFormBackRequested(Tizen::Ui::Controls::Form& source)
144 SceneManager* pSceneManager = SceneManager::GetInstance();
145 AppAssert(pSceneManager);
147 pSceneManager->GoBackward(BackwardSceneTransition(SCENE_TRANSITION_ANIMATION_TYPE_RIGHT), null);
151 DisplayForm::GetGroupCount(void)
153 AppLogDebug("ENTER");
154 return ID_GROUP_COUNT;
158 DisplayForm::GetItemCount(int groupIndex)
160 int itemCount = ID_GROUP_DEFAULT_ITEM_COUNT;
162 if (groupIndex == ID_GROUP_BACKLIGHT_TIME_LIST)
164 itemCount = ID_GROUP_BACKLIGHT_TIME_LIST_ITEM_COUNT;
166 else if (groupIndex == ID_GROUP_BATTERY_PERCENTAGE_HELP)
170 AppLogDebug("GetItemCount %d", itemCount);
176 DisplayForm::CreateGroupItem(int groupIndex, int itemWidth)
178 AppLogDebug("ENTER");
180 int itemHeight = H_GROUP_INDEX_NO_TITLE_DEFAULT;
181 int yItemOffset = H_GROUP_INDEX_HELP_TEXT_TOP_GAP;
182 LabelTextStyle style = LABEL_TEXT_STYLE_BOLD;
183 Rectangle itemMainRectangle;
185 Label* pLabel = null;
187 TableViewGroupItem* pItem = new (std::nothrow) TableViewGroupItem();
189 if (groupIndex == ID_GROUP_BATTERY_PERCENTAGE_HELP)
191 style = LABEL_TEXT_STYLE_NORMAL;
192 yItemOffset = H_GROUP_INDEX_HELP_TEXT_TOP_GAP;
193 itemHeight = H_GROUP_INDEX_DEFAULT;
194 groupText = ResourceManager::GetString(L"IDS_ST_BODY_SHOWS_BATTERY_PERCENTAGE_ON_INDICATOR");
202 itemMainRectangle.x = X_GROUP_INDEX_DEFAULT_LABEL;
203 itemMainRectangle.y = yItemOffset;
204 itemMainRectangle.width = itemWidth;
205 itemMainRectangle.height = itemHeight;
207 RelativeLayout relativeLayout;
208 relativeLayout.Construct();
210 pItem->Construct(relativeLayout, Dimension(itemWidth, itemHeight));
211 pItem->SetBackgroundColor(COLOR_BG_GROUP_INDEX_DEFAULT);
213 pLabel = new (std::nothrow) Label();
214 pLabel->Construct(itemMainRectangle, groupText);
215 pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
216 pLabel->SetTextVerticalAlignment(ALIGNMENT_TOP);
217 pLabel->SetTextConfig(FONT_SIZE_GROUP_TITLE_TEXT, style);
218 pLabel->SetTextColor(COLOR_HELP_TEXT_TYPE_01);
220 pItem->AddControl(pLabel);
221 relativeLayout.SetMargin(*pLabel, itemMainRectangle.x, RELATIVE_LAYOUT_RIGHT_MARGIN, 0, 0);
222 relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_LEFT_TO_LEFT);
223 relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
224 pItem->SetEnabled(false);
230 DisplayForm::CreateItem(int groupIndex, int itemIndex, int itemWidth)
232 AppLogDebug("group[%d] index[%d]", groupIndex, itemIndex);
234 Rectangle itemMainRectangle;
235 Rectangle itemSubRectangle;
236 TableViewAnnexStyle style = TABLE_VIEW_ANNEX_STYLE_NORMAL;
239 Label* pLabel = null;
240 int fontSize = GetFontSize();
243 Rectangle detailArrow;
244 Bitmap* pBitmap = null;
246 TableViewItem* pItem = new (std::nothrow) TableViewItem();
248 ItemTypeOneLine(itemMainRectangle);
249 itemHeight = itemMainRectangle.height;
253 case ID_GROUP_AUTO_ROTATE_SCREEN:
255 style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING;
256 itemMainRectangle.width -= W_RESIZE_LABEL_GAP;
257 itemMainText = ResourceManager::GetString(L"IDS_ST_HEADER_AUTO_ROTATE_SCREEN_ABB");
261 case ID_GROUP_BACKLIGHT_TIME:
263 ItemTypeTwoLine(itemMainRectangle, itemSubRectangle,fontSize);
264 itemHeight = (itemMainRectangle.height + itemSubRectangle.height);
266 pBitmap = ResourceManager::GetBitmapN(IDB_DETAIL_BUTTON_EXPAND_CLOSED);
268 itemMainText = ResourceManager::GetString(L"IDS_ST_BODY_BACKLIGHT_TIME");
269 int index = GetBackLightTimeIndex();
270 subText = GetBackLightTimeIndexString(index);
274 case ID_GROUP_BACKLIGHT_TIME_LIST:
276 style = TABLE_VIEW_ANNEX_STYLE_RADIO;
277 itemMainText = GetBackLightTimeIndexString(itemIndex);
283 itemMainText = ResourceManager::GetString(L"IDS_ST_BODY_FONT");
287 case ID_GROUP_BATTERY_PERCENTAGE:
289 style = TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING;
290 itemMainRectangle.width -= W_RESIZE_LABEL_GAP;
291 itemMainText = ResourceManager::GetString(L"IDS_ST_BODY_BATTERY_PERCENTAGE_ABB");
299 RelativeLayout relativeLayout;
300 relativeLayout.Construct();
302 pItem->Construct(relativeLayout, Dimension(itemWidth, itemHeight), style);
303 pItem->SetBackgroundColor(COLOR_BG_GROUP_ITEM_DEFAULT);
305 pLabel = new (std::nothrow) Label();
306 pLabel->Construct(itemMainRectangle, itemMainText);
307 pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
308 pLabel->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
309 pLabel->SetTextColor(COLOR_MAIN_TEXT);
311 pItem->AddControl(pLabel);
315 case TABLE_VIEW_ANNEX_STYLE_ONOFF_SLIDING:
317 rightMargin = RELATIVE_LAYOUT_RIGHT_MARGIN_ONOFF_SLIDING;
321 case TABLE_VIEW_ANNEX_STYLE_RADIO:
323 leftMargin = RELATIVE_LAYOUT_LEFT_MARGIN;
324 rightMargin = RELATIVE_LAYOUT_ITEM_RIGHT_MARGIN;
330 rightMargin = RELATIVE_LAYOUT_ITEM_RIGHT_MARGIN;
334 relativeLayout.SetMargin(*pLabel, leftMargin, rightMargin, 0, 0);
335 relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_LEFT_TO_LEFT);
336 relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
340 detailArrow = itemMainRectangle;
341 detailArrow.y = itemMainRectangle.y + ((itemHeight - W_DETAIL_ARROW_BUTTON) / DIVIDE_BY_TWO);
342 detailArrow.height = W_DETAIL_ARROW_BUTTON;
343 detailArrow.width = W_DETAIL_ARROW_BUTTON;
345 pLabel = new (std::nothrow) Label();
346 pLabel->Construct(detailArrow, L"");
348 pLabel->SetBackgroundBitmap(*pBitmap);
350 pItem->AddControl(pLabel);
351 relativeLayout.SetMargin(*pLabel, itemMainRectangle.x, RELATIVE_LAYOUT_RIGHT_MARGIN_DETAIL_ARROW_BUTTON, 0, 0);
352 relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
354 pLabel = new (std::nothrow) Label();
355 pLabel->Construct(itemSubRectangle, subText);
356 pLabel->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
357 pLabel->SetTextVerticalAlignment(ALIGNMENT_TOP);
358 pLabel->SetTextConfig(FONT_SIZE_SUB_TEXT, LABEL_TEXT_STYLE_NORMAL);
359 pLabel->SetTextColor(COLOR_SUB_TEXT);
361 pItem->AddControl(pLabel);
362 relativeLayout.SetMargin(*pLabel, itemMainRectangle.x, RELATIVE_LAYOUT_RIGHT_MARGIN, 0, 0);
363 relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_LEFT_TO_LEFT);
364 relativeLayout.SetRelation(*pLabel, pItem, RECT_EDGE_RELATION_RIGHT_TO_RIGHT);
371 DisplayForm::DeleteGroupItem(int groupIndex, TableViewGroupItem* pItem)
373 AppLogDebug("ENTER");
382 DisplayForm::DeleteItem(int groupIndex, int itemIndex, TableViewItem* pItem)
384 AppLogDebug("ENTER");
393 DisplayForm::OnUserEventReceivedN(RequestId requestId, Tizen::Base::Collection::IList* pArgs)
395 AppLogDebug("ENTER");
396 AppLogDebug("RequestFrom[%d]", requestId);
397 if (requestId == REFRESH_REQUEST_EVENT)
399 int itemCount = __pTableView->GetItemCountAt(ID_GROUP_BACKLIGHT_TIME_LIST);
400 bool autoRotation = false;
401 if (SettingInfo::GetValue(SETTING_INFO_KEY_SCREEN_ROTAION_AUTO, autoRotation) == E_SUCCESS)
403 __pTableView->SetItemChecked(ID_GROUP_AUTO_ROTATE_SCREEN, ID_ITEM_AUTO_ROTATE_SCREEN, autoRotation);
406 bool batteryPercentage = false;
407 if (SettingInfo::GetValue(SETTING_INFO_KEY_BATTERY_PERCENTAGE, batteryPercentage) == E_SUCCESS)
409 __pTableView->SetItemChecked(ID_GROUP_BATTERY_PERCENTAGE, ID_ITEM_BATTERY_PERCENTAGE, batteryPercentage);
412 for (int index = 0; index < itemCount; index++)
414 if (index == GetBackLightTimeIndex())
416 __pTableView->SetItemChecked(ID_GROUP_BACKLIGHT_TIME_LIST, index, true);
420 __pTableView->SetItemChecked(ID_GROUP_BACKLIGHT_TIME_LIST, index, false);
423 __pTableView->RefreshItem(ID_GROUP_BACKLIGHT_TIME, 0, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
424 __pTableView->RefreshItem(ID_GROUP_BACKLIGHT_TIME, 1, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
429 DisplayForm::OnGroupedTableViewItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status)
431 SceneManager* pSceneManager = SceneManager::GetInstance();
432 AppAssert(pSceneManager);
434 AppLogDebug("group[%d] index[%d]", groupIndex, itemIndex);
438 case ID_GROUP_AUTO_ROTATE_SCREEN:
440 bool itemSelectStatus = tableView.IsItemChecked(groupIndex, itemIndex);
442 if (status == TABLE_VIEW_ITEM_STATUS_SELECTED)
444 itemSelectStatus = !itemSelectStatus;
447 if (SettingInfo::SetValue(SETTING_INFO_KEY_SCREEN_ROTAION_AUTO, itemSelectStatus) == E_SUCCESS)
449 tableView.SetItemChecked(groupIndex, itemIndex, itemSelectStatus);
454 case ID_GROUP_BACKLIGHT_TIME:
456 if (tableView.IsGroupExpanded(ID_GROUP_BACKLIGHT_TIME_LIST) == true)
458 tableView.CollapseGroup(ID_GROUP_BACKLIGHT_TIME_LIST);
462 tableView.ExpandGroup(ID_GROUP_BACKLIGHT_TIME_LIST);
464 tableView.RefreshItem(groupIndex, itemIndex, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
468 case ID_GROUP_BACKLIGHT_TIME_LIST:
470 SetBackLightTime(itemIndex);
472 int itemCount = tableView.GetItemCountAt(groupIndex);
474 for (int index = 0; index < itemCount; index++)
476 if (index == itemIndex)
478 tableView.SetItemChecked(groupIndex, index, true);
482 tableView.SetItemChecked(groupIndex, index, false);
485 tableView.RefreshItem(ID_GROUP_BACKLIGHT_TIME, 0, TABLE_VIEW_REFRESH_TYPE_ITEM_MODIFY);
491 SceneManager* pSceneManager = SceneManager::GetInstance();
492 AppAssert(pSceneManager);
494 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_FONT, SCENE_TRANSITION_ANIMATION_TYPE_LEFT), null);
498 case ID_GROUP_BATTERY_PERCENTAGE:
500 bool itemSelectStatus = tableView.IsItemChecked(groupIndex, itemIndex);
502 if (status == TABLE_VIEW_ITEM_STATUS_SELECTED)
504 itemSelectStatus = !itemSelectStatus;
507 if (SettingInfo::SetValue(SETTING_INFO_KEY_BATTERY_PERCENTAGE, itemSelectStatus) == E_SUCCESS)
509 tableView.SetItemChecked(groupIndex, itemIndex, itemSelectStatus);
520 DisplayForm::GetDefaultGroupItemHeight(void)
522 return H_GROUP_INDEX_NO_TITLE_DEFAULT;
526 DisplayForm::GetDefaultItemHeight(void)
528 return H_GROUP_ITEM_DEFAULT;
532 DisplayForm::UpdateGroupItem(int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem)
537 DisplayForm::UpdateItem(int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewItem* pItem)
542 Label* pSubLabel = null;
548 case ID_GROUP_AUTO_ROTATE_SCREEN:
550 case ID_GROUP_BATTERY_PERCENTAGE:
552 case ID_GROUP_BACKLIGHT_TIME_LIST:
554 int fontSize = GetFontSize();
555 Label* pLabel = static_cast<Label*>(pItem->GetControl(0));
557 pLabel->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
558 pLabel->Invalidate(false);
562 case ID_GROUP_BACKLIGHT_TIME:
564 Bitmap* pBitmap = null;
565 Label* pLabel = static_cast<Label*>(pItem->GetControl(0));
566 Label* pLabelBitmap = static_cast<Label*>(pItem->GetControl(1));
567 pSubLabel = static_cast<Label*>(pItem->GetControl(2));
569 int fontSize = GetFontSize();
570 Rectangle mainRectangle;
571 Rectangle subRectangle;
572 Rectangle pItemRectangle;
573 Rectangle detailArrow;
575 pItemRectangle = pItem->GetBounds();
576 ItemTypeTwoLine(mainRectangle, subRectangle, fontSize);
578 pLabel->SetBounds(mainRectangle);
579 pLabel->SetTextConfig(fontSize, LABEL_TEXT_STYLE_NORMAL);
581 pItemRectangle.height = (mainRectangle.height + subRectangle.height);
582 pItem->SetBounds(pItemRectangle);
584 if (__pTableView->IsGroupExpanded(ID_GROUP_BACKLIGHT_TIME_LIST))
586 pBitmap = ResourceManager::GetBitmapN(IDB_DETAIL_BUTTON_EXPAND_OPENED);
590 pBitmap = ResourceManager::GetBitmapN(IDB_DETAIL_BUTTON_EXPAND_CLOSED);
592 pLabelBitmap->SetBackgroundBitmap(*pBitmap);
594 detailArrow = mainRectangle;
595 detailArrow.y = mainRectangle.y + ((pItemRectangle.height - W_DETAIL_ARROW_BUTTON) / DIVIDE_BY_TWO);
596 detailArrow.height = W_DETAIL_ARROW_BUTTON;
597 detailArrow.width = W_DETAIL_ARROW_BUTTON;
598 pLabelBitmap->SetBounds(detailArrow);
600 index = GetBackLightTimeIndex();
601 itemSubText = GetBackLightTimeIndexString(index);
602 pSubLabel->SetBounds(subRectangle);
603 pSubLabel->SetText(itemSubText);
604 pSubLabel->SetTextConfig(FONT_SIZE_SUB_TEXT, LABEL_TEXT_STYLE_NORMAL);
606 pLabel->Invalidate(false);
607 pLabelBitmap->Invalidate(false);
608 pSubLabel->Invalidate(false);
609 pItem->Invalidate(false);
618 DisplayForm::OnGroupedTableViewContextItemActivationStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, int itemIndex, Tizen::Ui::Controls::TableViewContextItem* pContextItem, bool activated)
623 DisplayForm::OnGroupedTableViewGroupItemStateChanged(Tizen::Ui::Controls::GroupedTableView& tableView, int groupIndex, Tizen::Ui::Controls::TableViewGroupItem* pItem, Tizen::Ui::Controls::TableViewItemStatus status)
628 DisplayForm::GetBackLightTime(void)
630 int backlightTime = 0;
632 result r = SettingInfo::GetValue(SETTING_INFO_KEY_BACKLIGHT_TIME, backlightTime);
635 AppLogDebug("GetValue Backlight Time fail [%s]", GetErrorMessage(r));
637 return backlightTime;
641 DisplayForm::SetBackLightTime(int itemIndex)
643 int backlightTime = 0;
646 case ID_ITEM_BACKLIGHT_TIME_15_SECONDS:
648 backlightTime = BACKLIGHT_TIME_15_SECONDS;
652 case ID_ITEM_BACKLIGHT_TIME_30_SECONDS:
654 backlightTime = BACKLIGHT_TIME_30_SECONDS;
658 case ID_ITEM_BACKLIGHT_TIME_1_MINUTE:
660 backlightTime = BACKLIGHT_TIME_1_MINUTE;
664 case ID_ITEM_BACKLIGHT_TIME_2_MINUTES:
666 backlightTime = BACKLIGHT_TIME_2_MINUTES;
670 case ID_ITEM_BACKLIGHT_TIME_5_MINUTES:
672 backlightTime = BACKLIGHT_TIME_5_MINUTES;
676 case ID_ITEM_BACKLIGHT_TIME_10_MINUTES:
678 backlightTime = BACKLIGHT_TIME_10_MINUTES;
683 result r = SettingInfo::SetValue(SETTING_INFO_KEY_BACKLIGHT_TIME, backlightTime);
686 AppLogDebug("SetValue Backlight Time fail [%s]", GetErrorMessage(r));
691 DisplayForm::GetBackLightTimeIndex(void)
694 int backlightTime = GetBackLightTime();
696 switch (backlightTime)
698 case BACKLIGHT_TIME_15_SECONDS:
700 itemIndex = ID_ITEM_BACKLIGHT_TIME_15_SECONDS;
704 case BACKLIGHT_TIME_30_SECONDS:
706 itemIndex = ID_ITEM_BACKLIGHT_TIME_30_SECONDS;
710 case BACKLIGHT_TIME_1_MINUTE:
712 itemIndex = ID_ITEM_BACKLIGHT_TIME_1_MINUTE;
716 case BACKLIGHT_TIME_2_MINUTES:
718 itemIndex = ID_ITEM_BACKLIGHT_TIME_2_MINUTES;
722 case BACKLIGHT_TIME_5_MINUTES:
724 itemIndex = ID_ITEM_BACKLIGHT_TIME_5_MINUTES;
728 case BACKLIGHT_TIME_10_MINUTES:
730 itemIndex = ID_ITEM_BACKLIGHT_TIME_10_MINUTES;
739 DisplayForm::GetBackLightTimeIndexString(int itemIndex)
745 case ID_ITEM_BACKLIGHT_TIME_15_SECONDS:
747 itemText = ResourceManager::GetString(L"IDS_ST_BODY_15_SECONDS");
751 case ID_ITEM_BACKLIGHT_TIME_30_SECONDS:
753 itemText = ResourceManager::GetString(L"IDS_ST_BODY_30_SECONDS");
757 case ID_ITEM_BACKLIGHT_TIME_1_MINUTE:
759 itemText = ResourceManager::GetString(L"IDS_ST_BODY_1_MINUTE");
763 case ID_ITEM_BACKLIGHT_TIME_2_MINUTES:
765 itemText = ResourceManager::GetString(L"IDS_ST_BODY_2_MINUTES");
769 case ID_ITEM_BACKLIGHT_TIME_5_MINUTES:
771 itemText = ResourceManager::GetString(L"IDS_ST_BODY_5_MINUTES");
775 case ID_ITEM_BACKLIGHT_TIME_10_MINUTES:
777 itemText = ResourceManager::GetString(L"IDS_ST_BODY_10_MINUTES");