#include "GlImageListEditorPanel.h"
#include "GlResourceManager.h"
#include "GlTypes.h"
+#include "GlFileUpdateTimer.h"
+#include "GlFileListEditorForm.h"
using namespace Tizen::App;
using namespace Tizen::Base;
using namespace Tizen::Ui::Scenes;
static const int H_SELECTALL_REGION = 112;
-static const unsigned int COLOR_SELECTALL_REGION = Color32<0x2A, 0x36, 0x4A>::Value;
+static const int COUNT_LABEL_FONT_SIZE = 33;
static const unsigned int COLOR_COUNT_LABEL = Color32<68, 68, 68>::Value;
static const unsigned int COLOR_SELECT_COUNT_FONT = Color32<255, 255, 255>::Value;
static const Color COLOR_THUMBNAIL_DIM (Color::GetColor(COLOR_ID_BLACK));
, __pLabelSelectCnt(null)
, __itemCount(0)
, __pPresentationModel(null)
+ , __pFileDelete(null)
{
AppLogDebug("ENTER");
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
ImageListEditorPanel::~ImageListEditorPanel(void)
{
AppLogDebug("ENTER");
+ delete __pFileDelete;
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
__itemCount = 0;
Rectangle clientAreaBounds = pForm->GetClientAreaBounds();
- clientAreaBounds.x = clientAreaBounds.y = 0;
- SetBounds(clientAreaBounds);
+ SetBounds(0, 0, clientAreaBounds.width, clientAreaBounds.height);
if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK)
{
if (__pPresentationModel->GetAppControlSelectionMode() == APPCONTROL_SELECTION_MODE_MULTIPLE)
{
- __pContentIconListView->Construct(Rectangle(0, 0, clientAreaBounds.width, clientAreaBounds.height),
+ __pContentIconListView->Construct(Rectangle(0, 0, clientAreaBounds.width, clientAreaBounds.height - H_COUNT_LABEL),
DIMENSION_DEFAULT_THUMBNAIL, ICON_LIST_VIEW_STYLE_MARK,
ICON_LIST_VIEW_SCROLL_DIRECTION_VERTICAL);
Bitmap* pBitmapEmpty = ResourceManager::GetBitmapN(IDB_LISTVIEW_EMPTY);
{
__pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty);
delete pBitmapEmpty;
- pBitmapEmpty = null;
}
__pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
__pContentIconListView->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE);
AddControl(*__pContentIconListView);
__pContentIconListView->SetShowState(true);
- String strTmp;
- strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)",
- ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), 0);
__pLabelSelectCnt = new (std::nothrow) Label();
__pLabelSelectCnt->Construct(Rectangle(0, clientAreaBounds.height-H_COUNT_LABEL,
- clientAreaBounds.width, H_COUNT_LABEL), strTmp);
+ clientAreaBounds.width, H_COUNT_LABEL), ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED"));
__pLabelSelectCnt->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
- __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
+ __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
__pLabelSelectCnt->SetBackgroundColor(COLOR_COUNT_LABEL);
__pLabelSelectCnt->SetTextColor(Color(COLOR_SELECT_COUNT_FONT));
+ __pLabelSelectCnt->SetTextConfig(COUNT_LABEL_FONT_SIZE, LABEL_TEXT_STYLE_BOLD);
AddControl(*__pLabelSelectCnt);
}
else
{
__pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty);
delete pBitmapEmpty;
- pBitmapEmpty = null;
}
__pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
__pContentIconListView->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE);
}
else
{
- Panel* pCheckPanel = new (std::nothrow) Panel();
- pCheckPanel->Construct(Rectangle(0, 0, clientAreaBounds.width, H_SELECTALL_REGION));
- pCheckPanel->SetBackgroundColor(COLOR_SELECTALL_REGION);
- __pCheckButton = new (std::nothrow) CheckButton();
- __pCheckButton->Construct(pCheckPanel->GetBounds(), CHECK_BUTTON_STYLE_MARK, BACKGROUND_STYLE_DEFAULT,
- false, ResourceManager::GetString(L"IDS_COM_BODY_SELECT_ALL"));
- __pCheckButton->SetActionId(ACTION_ID_SELECTALL_CHECKED, ACTION_ID_SELECTALL_UNCHECKED);
- __pCheckButton->AddActionEventListener(*this);
- pCheckPanel->AddControl(*__pCheckButton);
- AddControl(*pCheckPanel);
-
__pContentIconListView = new (std::nothrow) IconListView();
__pContentIconListView->Construct(Rectangle(0, H_SELECTALL_REGION, clientAreaBounds.width,
clientAreaBounds.height - H_SELECTALL_REGION), DIMENSION_DEFAULT_THUMBNAIL,
{
__pContentIconListView->SetBitmapOfEmptyList(pBitmapEmpty);
delete pBitmapEmpty;
- pBitmapEmpty = null;
}
__pContentIconListView->SetTextOfEmptyList(ResourceManager::GetString(L"IDS_COM_BODY_NO_ITEMS"));
__pContentIconListView->SetItemBorderStyle(ICON_LIST_VIEW_ITEM_BORDER_STYLE_NONE);
AddControl(*__pContentIconListView);
__pContentIconListView->SetShowState(true);
- String strTmp;
- strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)",
- ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), 0);
__pLabelSelectCnt = new (std::nothrow) Label();
__pLabelSelectCnt->Construct(
Rectangle(0, clientAreaBounds.height-H_COUNT_LABEL, clientAreaBounds.width, H_COUNT_LABEL),
- strTmp);
+ ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED"));
__pLabelSelectCnt->SetTextVerticalAlignment(ALIGNMENT_MIDDLE);
- __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_CENTER);
+ __pLabelSelectCnt->SetTextHorizontalAlignment(ALIGNMENT_LEFT);
__pLabelSelectCnt->SetBackgroundColor(COLOR_COUNT_LABEL);
__pLabelSelectCnt->SetTextColor(Color(COLOR_SELECT_COUNT_FONT));
AddControl(*__pLabelSelectCnt);
return E_SUCCESS;
}
-void
-ImageListEditorPanel::OnUpdateContentList()
-{
- AppLogDebug("ENTER");
- SceneManager* pSceneManager = SceneManager::GetInstance();
- pSceneManager->GoForward(ForwardSceneTransition(IDSCN_IMAGE_LIST));
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
-void
-ImageListEditorPanel::OnActionPerformed(const Control& source, int actionId)
-{
- AppLogDebug("ENTER");
- SceneManager* pSceneManager = SceneManager::GetInstance();
- AppAssert(pSceneManager);
-
- switch (actionId)
- {
- case ACTION_ID_SELECTALL_CHECKED:
- {
- int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
- for (int i = 0; i < loopCount; ++i)
- {
- if (__pContentIconListView->IsItemChecked(i) == false)
- {
- __pContentIconListView->SetItemChecked(i,true);
- __pContentIconListView->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY);
- }
- }
-
- int checkedCount = GetItemCheckedCount();
- String strTmp;
- strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)",
- ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), checkedCount);
- __pLabelSelectCnt->SetText(strTmp);
- __pLabelSelectCnt->RequestRedraw(true);
- break;
- }
- case ACTION_ID_SELECTALL_UNCHECKED:
- {
- int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
- for (int i = 0; i < loopCount; ++i)
- {
- if (__pContentIconListView->IsItemChecked(i) == true)
- {
- __pContentIconListView->SetItemChecked(i,false);
- }
- }
- int checkedCount = GetItemCheckedCount();
- String strTmp;
- strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)",
- ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), checkedCount);
- __pLabelSelectCnt->SetText(strTmp);
- __pLabelSelectCnt->RequestRedraw(true);
- __pContentIconListView->UpdateList();
- break;
- }
- default:
- {
- break;
- }
- }
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
-}
-
int
ImageListEditorPanel::GetItemCount(void)
{
{
AppLogDebug("ENTER : index(%d)", index);
IconListViewItem* pIconListviewItem = new (std::nothrow) IconListViewItem();
- Bitmap* pBitmap=null;
- String* pItemText=null;
+ Bitmap* pBitmap = null;
+ String* pItemText = null;
result r = __pPresentationModel->GetThumbnailInSyncCacheN(index, pItemText, pBitmap);
if (pBitmap == null || r == E_FAILURE)
pSelectedBitmap->Construct(canvas, canvas.GetBounds());
pIconListviewItem->Construct(*pBitmap, pItemText, pSelectedBitmap);
delete pSelectedBitmap;
- pSelectedBitmap = null;
}
else
{
AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
+ delete pIconListviewItem;
+ delete pItemText;
return null;
}
}
if (pBitmap != null)
{
delete pBitmap;
- pBitmap = null;
}
if (pItemText != null)
{
delete pItemText;
- pItemText = null;
}
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
{
int checkedCount = GetItemCheckedCount();
String strTmp;
- strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)",
- ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), checkedCount);
+ if (checkedCount == 0)
+ {
+ strTmp = ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED");
+ }
+ else if (checkedCount == 1)
+ {
+ strTmp = ResourceManager::GetString(L"IDS_VR_POP_1_ITEM_SELECTED");
+ }
+ else
+ {
+ strTmp.Format(LENGTH_COUNT_LABEL,
+ ResourceManager::GetString(L"IDS_VR_POP_PD_ITEMS_SELECTED").GetPointer(), checkedCount);
+ }
+
__pLabelSelectCnt->SetText(strTmp);
__pLabelSelectCnt->RequestRedraw(true);
__pContentIconListView->RefreshList(index, LIST_REFRESH_TYPE_ITEM_MODIFY);
{
int checkedCount = GetItemCheckedCount();
String strTmp;
- strTmp.Format(LENGTH_COUNT_LABEL, L"%ls (%d)",
- ResourceManager::GetString(L"IDS_COM_BODY_SELECTED").GetPointer(), checkedCount);
+ if (checkedCount == 0)
+ {
+ strTmp = ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED");
+ }
+ else if (checkedCount == 1)
+ {
+ strTmp = ResourceManager::GetString(L"IDS_VR_POP_1_ITEM_SELECTED");
+ }
+ else
+ {
+ strTmp.Format(LENGTH_COUNT_LABEL,
+ ResourceManager::GetString(L"IDS_VR_POP_PD_ITEMS_SELECTED").GetPointer(), checkedCount);
+ }
+
__pLabelSelectCnt->SetText(strTmp);
__pLabelSelectCnt->RequestRedraw(true);
if (__pCheckButton->IsSelected())
result r = map->Construct();
if (r == E_SUCCESS)
{
- map->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH),
- new (std::nothrow) String(__pPresentationModel->GetContentFilePath(index)));
- map->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED),
- new (std::nothrow) String(__pPresentationModel->GetContentFilePath(index)));
+ ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ r = pArrayList->Construct();
- GalleryApp* pApp = dynamic_cast<GalleryApp*>(UiApp::GetInstance());
- if (pApp != null)
+ if (r == E_SUCCESS)
{
- pApp->SendAppControlResult(APP_CTRL_RESULT_SUCCEEDED, map);
- pApp->Terminate();
+ pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(index)));
+ map->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED), (Object*)pArrayList);
+
+ GalleryApp* pApp = dynamic_cast<GalleryApp*>(UiApp::GetInstance());
+ if (pApp != null)
+ {
+ pApp->SendAppControlResult(APP_CTRL_RESULT_SUCCEEDED, map);
+ pApp->Terminate();
+ }
+ else
+ {
+ delete map;
+ }
}
else
{
+ delete pArrayList;
delete map;
- map = null;
}
}
else
{
delete map;
- map = null;
}
}
}
+ SetButtonState();
+
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
const SceneId& currentSceneId, IList* pArgs)
{
AppLogDebug("ENTER");
+
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ __pFileListEditorForm = dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
+
__pPresentationModel = FileListPresentationModel::GetInstance();
if (__pPresentationModel->GetAppControlMode() == APP_CONTROL_MODE_PICK)
}
IList*
-ImageListEditorPanel::GetItemCheckedIndexList(void) const
+ImageListEditorPanel::GetItemCheckedIndexListN(void) const
{
AppLogDebug("ENTER");
IList* pList = new (std::nothrow) ArrayList(SingleObjectDeleter);
- Integer* pIndex=null;
+ Integer* pIndex = null;
if (__pContentIconListView != null)
{
int loopCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
+ AppLogDebug("ENTER loopCount(%d)", loopCount);
for (int i = 0; i < loopCount; ++i)
{
if (__pContentIconListView->IsItemChecked(i))
{
pIndex = new (std::nothrow) Integer(i);
+ AppLogDebug("ENTER loopCount(%d)", loopCount);
+ AppLogDebug("ENTER loopCount(%d)", pIndex->ToInt());
pList->Add(pIndex);
}
}
return pList;
}
-void
-ImageListEditorPanel::OnRequestDeleteAction(void)
+void ImageListEditorPanel::OnFileOpInvalidate(enum FileActionMode actionId)
{
- AppLogDebug("ENTER");
- IList* pIndexList = GetItemCheckedIndexList();
-
- if (pIndexList == null || pIndexList->GetCount() <= 0 || __pPresentationModel == null)
- {
- delete pIndexList;
- AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
- return;
- }
-
- __pPresentationModel->DeleteContentFileList(*pIndexList);
- delete pIndexList;
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ FileListEditorForm* pFileListEditorForm =
+ dynamic_cast<FileListEditorForm*>(pSceneManager->GetCurrentScene()->GetForm());
+ TryReturnVoid(pFileListEditorForm != null, "[%s] fail to get SceneManager.",
+ GetErrorMessage(GetLastResult()));
+ pFileListEditorForm->Invalidate(true);
+}
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+void ImageListEditorPanel::OnFileOpComplete(enum FileActionMode actionId, enum FileActionCompleteRes res)
+{
}
void
-ImageListEditorPanel::OnRequestEmailAction(void)
+ImageListEditorPanel::OnRequestAppExitWithMultipleSelectionAppControlResult(void)
{
AppLogDebug("ENTER");
- IList* pIndexList = GetItemCheckedIndexList();
+ IList* pIndexList = GetItemCheckedIndexListN();
+
if (pIndexList->GetCount() <= 0)
{
+ delete pIndexList;
AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
return;
}
- String combineText;
- String path;
+ ArrayList* pArrayList = new (std::nothrow) ArrayList(SingleObjectDeleter);
+ pArrayList->Construct();
int loopCount = pIndexList->GetCount();
+ Integer* temp = null;
for (int i = 0; i < loopCount; ++i)
{
- path = __pPresentationModel->GetContentFilePath(i);
-
- if (path.EndsWith(CONTENT_EXT_PNG)
- || path.EndsWith(CONTENT_EXT_BMP)
- || path.EndsWith(CONTENT_EXT_JPG)
- || path.EndsWith(CONTENT_EXT_GIF)
- || path.EndsWith(CONTENT_EXT_TIF)
- || path.EndsWith(CONTENT_EXT_MP4)
- || path.EndsWith(CONTENT_EXT_3GP)
- || path.EndsWith(CONTENT_EXT_AVI)
- || path.EndsWith(CONTENT_EXT_RM)
- || path.EndsWith(CONTENT_EXT_WMV)
- || path.EndsWith(CONTENT_EXT_ASF)
- )
- {
- if (combineText.CompareTo(EMPTY_SPACE) != 0)
- {
- combineText.Append(L";");
- }
- combineText.Append(path);
- }
+ temp = static_cast<Integer*>(pIndexList->GetAt(i));
+ pArrayList->Add(new (std::nothrow) String(__pPresentationModel->GetContentFilePath(temp->ToInt())));
}
- HashMap* pDataList = new (std::nothrow) HashMap(SingleObjectDeleter);
- pDataList->Construct();
- pDataList->Add(new (std::nothrow) String(APPCONTROL_KEY_ATTACHMENTS),
- new (std::nothrow) String(combineText));
+ HashMap* map = new (std::nothrow) HashMap(SingleObjectDeleter);
+ map->Construct();
+ map->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED), pArrayList);
- __pPresentationModel->StartAppControl(APPCONTROL_PROVIDER_ID_EMAIL,
- APPCONTROL_OPERATION_ID_COMPOSE, pDataList, null);
+ GalleryApp* pApp = dynamic_cast<GalleryApp*>(UiApp::GetInstance());
+ if (pApp != null)
+ {
+ pApp->SendAppControlResult(APP_CTRL_RESULT_SUCCEEDED, map);
+ pApp->Terminate();
+ }
+
+ delete pIndexList;
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}
void
-ImageListEditorPanel::OnRequestMoveToAction(String& destDirectory)
+ImageListEditorPanel::SelectAllPressed(void)
{
- AppLogDebug("ENTER");
- if (&destDirectory == null || destDirectory.IsEmpty())
+ bool needToSelectAll = true;
+ int checkedCount = GetItemCheckedCount();
+ int totalFileCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
+ if (checkedCount == totalFileCount)
{
- AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
- return;
+ needToSelectAll = false;
}
- IList* pIndexList = GetItemCheckedIndexList();
- if (pIndexList == null || pIndexList->GetCount() <= 0)
+ if (needToSelectAll == true)
{
- AppLogDebug("EXIT 2(%s)", GetErrorMessage(GetLastResult()));
+ for (int i = 0 ; i < totalFileCount; ++i)
+ {
+ if (__pContentIconListView->IsItemChecked(i) == false)
+ {
+ __pContentIconListView->SetItemChecked(i,true);
+ __pContentIconListView->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY);
+ }
+ }
+ }
+ else
+ {
+ for (int i = 0 ; i < totalFileCount; ++i)
+ {
+ if (__pContentIconListView->IsItemChecked(i) == true)
+ {
+ __pContentIconListView->SetItemChecked(i, false);
+ __pContentIconListView->RefreshList(i, LIST_REFRESH_TYPE_ITEM_MODIFY);
+ }
+ }
+ }
- return;
+ String tempString;
+ if (needToSelectAll == true)
+ {
+ tempString.Format(LENGTH_COUNT_LABEL,
+ ResourceManager::GetString(L"IDS_VR_POP_PD_ITEMS_SELECTED").GetPointer(), totalFileCount);
+ }
+ else
+ {
+ tempString = ResourceManager::GetString(L"IDS_ST_POP_NO_ITEMS_SELECTED");
}
- result r = __pPresentationModel->MoveToContentFileList(*pIndexList, destDirectory);
- delete pIndexList;
- pIndexList = null;
- TryReturn(r == E_SUCCESS, , "Failed on OnRequestDeleteAction");
- __pPresentationModel->RefreshCurrentAlbumContentInfoList(CONTENT_TYPE_ALL);
- __itemCount = __pPresentationModel->GetCurrentAlbumContentInfoCount();
- __pContentIconListView->UpdateList();
- AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
+ __pLabelSelectCnt->SetText(tempString);
+ __pLabelSelectCnt->RequestRedraw(true);
}
void
-ImageListEditorPanel::OnRequestAppExitWithMultipleSelectionAppControlResult(void)
+ImageListEditorPanel::SetButtonState(void)
{
AppLogDebug("ENTER");
- IList* pIndexList = GetItemCheckedIndexList();
-
- if (pIndexList->GetCount() <= 0)
- {
- AppLogDebug("EXIT 1(%s)", GetErrorMessage(GetLastResult()));
-
- return;
- }
-
- String combineText;
+ SceneManager* pSceneManager = SceneManager::GetInstance();
+ TryReturnVoid(pSceneManager != null, "[%s] fail to get SceneManager.", GetErrorMessage(GetLastResult()));
- int loopCount = pIndexList->GetCount();
- for (int i = 0; i < loopCount; ++i)
+ if (GetItemCheckedCount() > 0)
{
- combineText.Append(__pPresentationModel->GetContentFilePath(i));
- combineText.Append(L";");
+ AppLogDebug("BUTTONSTATE : Request Enable");
+ __pFileListEditorForm->SetFooterButtonsState(true);
}
-
- HashMap* map = new (std::nothrow) HashMap(SingleObjectDeleter);
- map->Construct();
- map->Add(new (std::nothrow) String(APPCONTROL_KEY_PATH),
- new (std::nothrow) String(combineText));
- map->Add(new (std::nothrow) String(APPCONTROL_KEY_DATA_SELECTED),
- new (std::nothrow) String(combineText));
-
- GalleryApp* pApp = dynamic_cast<GalleryApp*>(UiApp::GetInstance());
- if (pApp != null)
+ else
{
- pApp->SendAppControlResult(APP_CTRL_RESULT_SUCCEEDED, map);
- pApp->Terminate();
+ AppLogDebug("BUTTONSTATE : Request disable");
+ __pFileListEditorForm->SetFooterButtonsState(false);
}
AppLogDebug("EXIT(%s)", GetErrorMessage(GetLastResult()));
}