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()));
530 Integer* pIndex = null;
533 int loopCount = pIndexList->GetCount();
534 AppLogDebug("pIndexList->GetCount(%d)", loopCount);
535 for (int i = 0; i < loopCount; ++i)
537 pIndex = static_cast<Integer*>(pIndexList->GetAt(i));
540 checkedIndex = pIndex->ToInt();
541 path = __pPresentationModel->GetContentFilePath(checkedIndex);
544 if (combineText.CompareTo(EMPTY_SPACE) != 0)
546 combineText.Append(L";");
548 combineText.Append(path);
550 HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
551 pDataList->Construct();
552 pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE), new (std::nothrow) String(APPCONTROL_DATA_MMS));
553 pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(combineText));
555 __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_MESSAGE, APPCONTROL_OPERATION_ID_COMPOSE,
557 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
563 AllListSelectionPanel::OnRequestEmail(void)
565 AppLogDebug("ENTER");
566 IList* pIndexList = GetItemCheckedIndexListN();
567 if (pIndexList == null || pIndexList->GetCount() <= 0)
569 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
576 Integer* pIndex = null;
579 int loopCount = pIndexList->GetCount();
580 AppLogDebug("pIndexList->GetCount(%d)", loopCount);
581 for (int i = 0; i < loopCount; ++i)
583 pIndex = static_cast<Integer*>(pIndexList->GetAt(i));
586 checkedIndex = pIndex->ToInt();
587 path = __pPresentationModel->GetContentFilePath(checkedIndex);
590 if (combineText.CompareTo(EMPTY_SPACE) != 0)
592 combineText.Append(L";");
594 combineText.Append(path);
596 HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
597 pDataList->Construct();
598 pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS), new (std::nothrow) String(combineText));
600 __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL,
601 APPCONTROL_OPERATION_ID_COMPOSE, pDataList, null);
602 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
608 AllListSelectionPanel::OnRequestSlideShow(void)
610 AppLogDebug("ENTER");
611 IList* pIndexList = GetItemCheckedIndexListN();
612 if (pIndexList == null)
614 AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
619 HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
620 result r = pDataList->Construct();
625 AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
630 pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_TYPE),
631 new (std::nothrow) String(APPCONTROL_DATA_SLIDE_SHOW));
633 Integer* pRealIndex = null;
638 int loopCount = pIndexList->GetCount();
641 for (int i = 0; i < loopCount; ++i)
643 pRealIndex = static_cast<Integer*>(pIndexList->GetAt(i));
644 if (pRealIndex != null)
646 realIndex = pRealIndex->ToInt();
649 path = __pPresentationModel->GetContentFilePath(realIndex);
650 if (combineText.CompareTo(EMPTY_SPACE) != 0)
652 combineText.Append(L";");
654 combineText.Append(path);
656 pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH),
657 new (std::nothrow) String(combineText));
662 __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_IMAGE,
663 APPCONTROL_OPERATION_ID_VIEW, pDataList, null);
664 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
670 AllListSelectionPanel::ResetSelection(void)
672 AppLogDebug("ENTER");
673 __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL);
674 if (__pSeletedIndexList == null)
680 __itemCount = __pSeletedIndexList->GetCount();
683 SceneManager* pSceneManager = SceneManager::GetInstance();
684 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
686 FileListEditorForm* pFileListEditorForm = dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
687 TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get FileListEditorForm.", GetErrorMessage(GetLastResult()));
690 String bodyText = ResourceManager::GetString(L"IDS_COM_BODY_SELECTED");
691 strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)", bodyText.GetPointer(), __itemCount);
692 pFileListEditorForm->SetTitleText(strTmp);
693 if (__pContentIconListView != null)
695 __pContentIconListView->UpdateList();
698 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
702 AllListSelectionPanel::SetButtonState(void)
704 AppLogDebug("ENTER");
705 SceneManager* pSceneManager = SceneManager::GetInstance();
706 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
708 FileListEditorForm* pFileListEditorForm = dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
709 TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get FileListEditorForm.", GetErrorMessage(GetLastResult()));
711 if (GetItemCheckedCount() > 0)
713 AppLogDebug("BUTTONSTATE : Request Enable");
714 pFileListEditorForm->SetFooterButtonsState(true);
718 AppLogDebug("BUTTONSTATE : Request disable");
719 pFileListEditorForm->SetFooterButtonsState(false);
721 AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
725 AllListSelectionPanel::SelectAllPressed(void)
727 bool needToSelectAll = true;
728 int checkedCount = GetItemCheckedCount();
729 int totalFileCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
730 if (checkedCount == totalFileCount)
732 needToSelectAll = false;
735 if (needToSelectAll == true)
737 for (int i = 0 ; i < totalFileCount; ++i)
739 if (__pContentIconListView->IsItemChecked(i) == false)
741 __pContentIconListView->SetItemChecked(i,true);
742 __pContentIconListView->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY);
748 for (int i = 0 ; i < totalFileCount; ++i)
750 if (__pContentIconListView->IsItemChecked(i) == true)
752 __pContentIconListView->SetItemChecked(i, false);
753 __pContentIconListView->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY);
758 SceneManager* pSceneManager = SceneManager::GetInstance();
759 TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
761 FileListEditorForm* pFileListEditorForm =
762 dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
763 TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get FileListEditorForm.",
764 GetErrorMessage(GetLastResult()));
767 if (needToSelectAll == true)
769 tempString.Format(LENGTH_COUNT_LABEL, L"%ls (%d)",
770 ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), totalFileCount);
774 tempString.Format(LENGTH_COUNT_LABEL, L"%ls (%d)",
775 ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), 0);
777 pFileListEditorForm->SetTitleText(tempString);