2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (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 GlAllListSelectionPanel.cpp
19 * @brief This is the implementation file for AllListSelectionPanel class.
24 #include "GlAllListSelectionPanel.h"
25 #include "GlCommonUtil.h"
26 #include "GlFileListEditorForm.h"
27 #include "GlFileListPresentationModel.h"
28 #include "GlResourceManager.h"
30 #include "GlFileDeleteTimer.h"
32 using namespace Tizen::App;
33 using namespace Tizen::Base;
34 using namespace Tizen::Base::Collection;
35 using namespace Tizen::Base::Utility;
36 using namespace Tizen::Content;
37 using namespace Tizen::Graphics;
38 using namespace Tizen::Media;
39 using namespace Tizen::Ui::Controls;
40 using namespace Tizen::Ui::Scenes;
42 static const int LENGTH_COUNT_LABEL = 256;
43 static const int H_CONTENT_MARGIN = 9;
44 static const int W_CONTENT_MARGIN = 6;
45 static const int W_CONTENT_SPACE = 6;
46 static const int H_CONTENT_SPACE = 6;
47 static const Color COLOR_THUMBNAIL_DIM (Color::GetColor(COLOR_ID_BLACK));
48 static const int ALPHA_THUMBNAIL_DIM = 70;
50 static const Rectangle RECT_INITIAL (0, 0, 10, 10);
52 AllListSelectionPanel::AllListSelectionPanel(void)
53 : __pContentIconListView(null)
54 , __pSeletedIndexList(null)
56 , __deleteInProgress(false)
57 , __pPresentationModel(null)
61 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
64 AllListSelectionPanel::~AllListSelectionPanel(void)
68 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
72 AllListSelectionPanel::Initialize(void)
75 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
77 return Construct(RECT_INITIAL); // Should be set proper area at OnInitializing()
81 AllListSelectionPanel::OnInitializing(void)
84 const Form* pForm = dynamic_cast<Form*>(GetParent());
85 TryReturn(pForm != null, E_FAILURE, "[%s] fail to get the form.", GetErrorMessage(GetLastResult()));
87 __pPresentationModel = FileListPresentationModel::GetInstance();
88 __pPresentationModel->ClearThumbnailRequests();
89 __pPresentationModel->AddPresentationModelListener(this);
91 Rectangle clientAreaBounds = pForm->GetClientAreaBounds();
92 clientAreaBounds.x = clientAreaBounds.y = 0;
93 result r = SetBounds(clientAreaBounds);
95 __pContentIconListView = new (std::nothrow) IconListView();
96 __pContentIconListView->Construct(Rectangle(0, 0, clientAreaBounds.width, clientAreaBounds.height),
97 DIMENSION_DEFAULT_THUMBNAIL, ICON_LIST_VIEW_STYLE_MARK, ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL);
98 Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY);
99 if (pBitmapEmpty != null)
101 __pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty);
104 __pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
105 __pContentIconListView->SetMargin(MARGIN_TYPE_LEFT, W_CONTENT_MARGIN);
106 __pContentIconListView->SetMargin(MARGIN_TYPE_RIGHT, W_CONTENT_MARGIN);
107 __pContentIconListView->SetMargin(MARGIN_TYPE_TOP, H_CONTENT_MARGIN);
108 __pContentIconListView->SetItemSpacing(W_CONTENT_SPACE, H_CONTENT_SPACE);
109 __pContentIconListView->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE);
110 __pContentIconListView->SetItemProvider(*this);
111 __pContentIconListView->SetCheckBoxPosition(ICON_LIST_VIEW_CHECK_BOX_POSITION_TOP_LEFT);
112 __pContentIconListView->AddIconListViewItemEventListener(*this);
113 __pContentIconListView->SetTouchAnimationEnabled(false);
114 AddControl(*__pContentIconListView);
115 __pContentIconListView->SetShowState(true);
118 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
124 AllListSelectionPanel::UpdatePanelContent()
126 AppLogDebug("ENTER");
127 SceneManager* pSceneManager = SceneManager::GetInstance();
128 FileListEditorForm* pFileListEditorForm =
129 dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
130 TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get SceneManager.",
131 GetErrorMessage(GetLastResult()));
133 if (pFileListEditorForm->GetOverlayStatus() == false && __deleteInProgress == false)
135 SceneManager* pSceneManager = SceneManager::GetInstance();
136 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST));
138 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
142 AllListSelectionPanel::OnTerminating(void)
144 AppLogDebug("ENTER");
145 result r = E_SUCCESS;
146 __pPresentationModel->RemovePresentationModelListener(*this);
147 if (__pSeletedIndexList != null)
149 delete __pSeletedIndexList;
150 __pSeletedIndexList = null;
152 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
158 AllListSelectionPanel::GetItemCount(void)
160 AppLogDebug("ENTER");
161 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
167 AllListSelectionPanel::CreateItem(int index)
169 AppLogDebug("ENTER : index(%d)", index);
170 IconListViewItem* pIconListviewItem;
171 Bitmap* pBitmap = null;
172 String* pItemText = null;
174 int realIndex = GetRealindexFromVirtualIndex(index);
175 result r = __pPresentationModel->GetThumbnailInSyncCacheN(realIndex, pItemText, pBitmap);
176 if (pBitmap == null || r == E_FAILURE)
178 __pPresentationModel->RequestThumbnail(realIndex);
179 pBitmap = CommonUtil::GetEmptyThumbnailN();
182 if (pItemText == null)
184 pItemText = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE"));
186 else if ((*pItemText) != ResourceManager::GetString(L"EMPTY_SPACE"))
189 pItemText = new (std::nothrow) String(ResourceManager::GetString(L"EMPTY_SPACE"));
192 if (__pContentIconListView->IsItemChecked(index) == true)
196 BufferInfo bufferInfo;
197 pBitmap->Lock(bufferInfo, INFINITE);
200 Color dimColor(COLOR_THUMBNAIL_DIM);
201 dimColor.SetAlpha(ALPHA_THUMBNAIL_DIM);
204 canvas.Construct(bufferInfo);
205 canvas.FillRectangle(dimColor, canvas.GetBounds());
207 Bitmap* pSelectedBitmap = new (std::nothrow) Bitmap();
208 pSelectedBitmap->Construct(canvas, canvas.GetBounds());
209 pIconListviewItem = new (std::nothrow) IconListViewItem();
210 pIconListviewItem->Construct(*pBitmap, pItemText, pSelectedBitmap);
211 delete pSelectedBitmap;
215 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
222 pIconListviewItem = new (std::nothrow) IconListViewItem();
223 pIconListviewItem->Construct(*pBitmap, pItemText);
230 if (pItemText != null)
234 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
236 return pIconListviewItem;
240 AllListSelectionPanel::DeleteItem(int index, IconListViewItem* pItem)
242 AppLogDebug("ENTER");
244 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
250 AllListSelectionPanel::OnIconListViewItemStateChanged(IconListView& view, int index, IconListViewItemStatus status)
252 AppLogDebug("ENTER");
253 if (status == ICON_LIST_VIEW_ITEM_CHECKED || status == ICON_LIST_VIEW_ITEM_UNCHECKED)
255 SceneManager* pSceneManager = SceneManager::GetInstance();
256 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
258 FileListEditorForm* pFileListEditorForm =
259 dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
260 TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get FileListEditorForm.",
261 GetErrorMessage(GetLastResult()));
264 strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)",
265 ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), GetItemCheckedCount());
266 pFileListEditorForm->SetTitleText(strTmp);
267 __pContentIconListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY);
271 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
275 AllListSelectionPanel::OnFileInfoChanged(const ContentType contentType)
277 AppLogDebug("ENTER");
278 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
282 AllListSelectionPanel::OnThumbnailDecoded(const int index)
284 AppLogDebug("ENTER : index(%d)", index);
287 int virtualIndex = -1;
288 int loopCount = __pSeletedIndexList->GetCount();
289 for (int i = 0; i < loopCount; ++i)
291 virtualIndex = GetVirtualIndexFromRealIndex(index);
292 if (virtualIndex >= 0)
294 __pContentIconListView->RefreshList(virtualIndex, LIST_REFRESH_TYPE_ITEM_MODIFY);
299 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
303 AllListSelectionPanel::OnSceneActivatedN(const SceneId& previousSceneId,
304 const SceneId& currentSceneId, IList* pArgs)
306 AppLogDebug("ENTER");
307 __pPresentationModel = FileListPresentationModel::GetInstance();
309 SceneManager* pSceneManager = SceneManager::GetInstance();
310 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
312 if (previousSceneId == IDSCN_ALL_LIST_EDITOR)
316 __pSeletedIndexList = pArgs;
319 int loopCount = __pSeletedIndexList->GetCount();
320 for (int i = 0; i < loopCount; ++i)
322 __pContentIconListView->SetItemChecked(i, true);
323 __pContentIconListView->RequestRedraw(true);
327 FileListEditorForm* pFileListEditorForm =
328 dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
329 TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get FileListEditorForm.",
330 GetErrorMessage(GetLastResult()));
332 if (pArgs != null && pArgs->GetCount() > 0)
334 String* pDirectory = static_cast<String*>(pArgs->GetAt(0));
335 if (pDirectory != null && pDirectory->GetLength() > 0)
337 pFileListEditorForm->MoveToAlbum(*pDirectory);
340 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
344 AllListSelectionPanel::OnSceneDeactivated(const SceneId& currentSceneId,
345 const SceneId& nextSceneId)
347 AppLogDebug("ENTER");
348 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
352 AllListSelectionPanel::GetItemCheckedCount(void) const
354 AppLogDebug("ENTER");
356 if (__pContentIconListView != null && __pSeletedIndexList != null)
358 int loopCount = __pSeletedIndexList->GetCount();
359 for (int i = 0; i < loopCount; ++i)
361 if (__pContentIconListView->IsItemChecked(i))
367 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
373 AllListSelectionPanel::GetItemCheckedIndexListN(void)
375 AppLogDebug("ENTER");
376 IList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
377 Integer* pIndex = null;
379 if (__pContentIconListView!=null)
382 int loopCount = __pSeletedIndexList->GetCount();
383 for (int i = 0; i < loopCount; ++i)
385 if (__pContentIconListView->IsItemChecked(i))
387 realIndex = GetRealindexFromVirtualIndex(i);
388 pIndex = new (std::nothrow) Integer(realIndex);
393 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
399 AllListSelectionPanel::GetRealindexFromVirtualIndex(int virtualIndex)
401 if (__pSeletedIndexList == null || __pSeletedIndexList->GetCount() == 0)
403 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
408 Integer* pRealIndex = static_cast<Integer*>(__pSeletedIndexList->GetAt(virtualIndex));
410 if (pRealIndex != null)
412 realIndex = pRealIndex->ToInt();
414 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
420 AllListSelectionPanel::GetVirtualIndexFromRealIndex(int realIndex)
422 int returnValue = -1;
423 int loopCount = __pSeletedIndexList->GetCount();
424 for (int i = 0; i < loopCount; ++i)
426 Integer* pRealIndex = static_cast<Integer*>(__pSeletedIndexList->GetAt(i));
428 if (pRealIndex != null)
430 index = pRealIndex->ToInt();
433 if (index == realIndex)
439 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
445 AllListSelectionPanel::OnRequestDelete(void)
447 AppLogDebug("ENTER");
448 IList* pIndexList = GetItemCheckedIndexListN();
449 if (pIndexList->GetCount() <= 0)
451 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
456 delete __pFileDelete;
457 __pFileDelete = new FileDeleteTimer(pIndexList, __pPresentationModel, this);
458 result r = __pFileDelete->StartTimer();
462 delete __pFileDelete;
463 __pFileDelete = null;
468 __deleteInProgress = true;
474 void AllListSelectionPanel::OnFileOpInvalidate(enum FileActionMode actionId)
476 SceneManager* pSceneManager = SceneManager::GetInstance();
477 FileListEditorForm* pFileListEditorForm =
478 dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
479 TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get SceneManager.",
480 GetErrorMessage(GetLastResult()));
481 pFileListEditorForm->Invalidate(true);
484 void AllListSelectionPanel::OnFileOpComplete(enum FileActionMode actionId, enum FileActionCompleteRes res)
486 __deleteInProgress = false;
487 SceneManager* pSceneManager = SceneManager::GetInstance();
488 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.",
489 GetErrorMessage(GetLastResult()));
491 FileListEditorForm* pFileListEditorForm =
492 dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
493 TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get SceneManager.",
494 GetErrorMessage(GetLastResult()));
497 String selectString = ResourceManager::GetString(L"IDS_COM_BODY_SELECTED");
498 strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", selectString.GetPointer(), 0);
499 pFileListEditorForm->SetTitleText(strTmp);
501 __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL);
502 __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
503 __pContentIconListView->UpdateList();
505 if (GetItemCount() > 0)
507 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALL_LIST));
511 pSceneManager->GoForward(ForwardSceneTransition(IDSCN_ALBUM_LIST));
513 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
517 AllListSelectionPanel::OnRequestMessage(void)
519 AppLogDebug("ENTER");
520 IList* pIndexList = GetItemCheckedIndexListN();
521 if (pIndexList == null || pIndexList->GetCount() <= 0)
523 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
528 Integer* pIndex = null;
530 ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
531 pArrayList->Construct();
532 int loopCount = pIndexList->GetCount();
534 for (int i = 0; i < loopCount; ++i)
536 pIndex = static_cast<Integer*>(pIndexList->GetAt(i));
539 checkedIndex = pIndex->ToInt();
540 pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(checkedIndex)));
544 HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
545 pDataList->Construct();
546 pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_MESSAGE_TYPE),
547 new (std::nothrow) String(APPCONTROL_DATA_MMS));
548 pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
550 __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGE, APPCONTROL_OPERATION_ID_COMPOSE, null,
552 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
558 AllListSelectionPanel::OnRequestEmail(void)
560 AppLogDebug("ENTER");
561 IList* pIndexList = GetItemCheckedIndexListN();
562 if (pIndexList == null || pIndexList->GetCount() <= 0)
564 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
569 Integer* pIndex = null;
571 ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
572 pArrayList->Construct();
573 int loopCount = pIndexList->GetCount();
575 for (int i = 0; i < loopCount; ++i)
577 pIndex = static_cast<Integer*>(pIndexList->GetAt(i));
580 checkedIndex = pIndex->ToInt();
581 pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(checkedIndex)));
585 HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
586 pDataList->Construct();
587 pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
589 __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL, APPCONTROL_OPERATION_ID_COMPOSE, null,
591 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
597 AllListSelectionPanel::OnRequestSlideShow(void)
599 AppLogDebug("ENTER");
600 IList* pIndexList = GetItemCheckedIndexListN();
601 if (pIndexList == null)
603 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
607 Integer* pRealIndex = null;
609 ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
610 pArrayList->Construct();
611 int loopCount = pIndexList->GetCount();
613 for (int i = 0; i < loopCount; ++i)
615 pRealIndex = static_cast<Integer*>(pIndexList->GetAt(i));
616 if (pRealIndex != null)
618 realIndex = pRealIndex->ToInt();
619 pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(realIndex)));
623 HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
624 pDataList->Construct();
625 pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_SLIDE_SHOW));
626 pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH), (Object*)pArrayList);
628 __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE, APPCONTROL_OPERATION_ID_VIEW, null,
630 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
636 AllListSelectionPanel::ResetSelection(void)
638 AppLogDebug("ENTER");
639 __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL);
640 if (__pSeletedIndexList == null)
646 __itemCount = __pSeletedIndexList->GetCount();
649 SceneManager* pSceneManager = SceneManager::GetInstance();
650 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
652 FileListEditorForm* pFileListEditorForm = dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
653 TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get FileListEditorForm.", GetErrorMessage(GetLastResult()));
656 String bodyText = ResourceManager::GetString(L"IDS_COM_BODY_SELECTED");
657 strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", bodyText.GetPointer(), __itemCount);
658 pFileListEditorForm->SetTitleText(strTmp);
659 if (__pContentIconListView != null)
661 __pContentIconListView->UpdateList();
664 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
668 AllListSelectionPanel::SetButtonState(void)
670 AppLogDebug("ENTER");
671 SceneManager* pSceneManager = SceneManager::GetInstance();
672 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
674 FileListEditorForm* pFileListEditorForm = dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
675 TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get FileListEditorForm.", GetErrorMessage(GetLastResult()));
677 if (GetItemCheckedCount() > 0)
679 AppLogDebug("BUTTONSTATE : Request Enable");
680 pFileListEditorForm->SetFooterButtonsState(true);
684 AppLogDebug("BUTTONSTATE : Request disable");
685 pFileListEditorForm->SetFooterButtonsState(false);
687 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
691 AllListSelectionPanel::SelectAllPressed(void)
693 bool needToSelectAll = true;
694 int checkedCount = GetItemCheckedCount();
695 if (checkedCount == __itemCount)
697 needToSelectAll = false;
700 if (needToSelectAll == true)
702 for (int i = 0 ; i < __itemCount; ++i)
704 if (__pContentIconListView->IsItemChecked(i) == false)
706 __pContentIconListView->SetItemChecked(i,true);
707 __pContentIconListView->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY);
713 for (int i = 0 ; i < __itemCount; ++i)
715 if (__pContentIconListView->IsItemChecked(i) == true)
717 __pContentIconListView->SetItemChecked(i, false);
718 __pContentIconListView->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY);
723 SceneManager* pSceneManager = SceneManager::GetInstance();
724 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
726 FileListEditorForm* pFileListEditorForm =
727 dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
728 TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get FileListEditorForm.",
729 GetErrorMessage(GetLastResult()));
732 if (needToSelectAll == true)
734 tempString.Format(LENGTH_COUNT_LABEL, L"%ls (%d)",
735 ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), __itemCount);
739 tempString.Format(LENGTH_COUNT_LABEL, L"%ls (%d)",
740 ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), 0);
742 pFileListEditorForm->SetTitleText(tempString);