blob: 96699174da7b8f051554475889235e8a25ae5d8a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
// UpdateCallback.h
#include "StdAfx.h"
#include "UpdateCallback100.h"
#include "Common/Defs.h"
#include "Common/StringConvert.h"
#include "FarUtils.h"
using namespace NFar;
STDMETHODIMP CUpdateCallback100Imp::SetTotal(UINT64 aSize)
{
if (m_ProgressBox != 0)
{
m_ProgressBox->SetTotal(aSize);
m_ProgressBox->PrintCompeteValue(0);
}
return S_OK;
}
STDMETHODIMP CUpdateCallback100Imp::SetCompleted(const UINT64 *aCompleteValue)
{
if(WasEscPressed())
return E_ABORT;
if (m_ProgressBox != 0 && aCompleteValue != NULL)
m_ProgressBox->PrintCompeteValue(*aCompleteValue);
return S_OK;
}
STDMETHODIMP CUpdateCallback100Imp::CompressOperation(const wchar_t* /* name */)
{
return S_OK;
}
STDMETHODIMP CUpdateCallback100Imp::DeleteOperation(const wchar_t* /* name */)
{
return S_OK;
}
STDMETHODIMP CUpdateCallback100Imp::OperationResult(INT32 /* operationResult */)
{
return S_OK;
}
STDMETHODIMP CUpdateCallback100Imp::UpdateErrorMessage(const wchar_t *message)
{
CSysString s = UnicodeStringToMultiByte(message, CP_OEMCP);
if (g_StartupInfo.ShowMessage(s) == -1)
return E_ABORT;
return S_OK;
}
|