diff options
author | Igor Pavlov <ipavlov@users.sourceforge.net> | 2011-04-11 04:00:00 +0400 |
---|---|---|
committer | Kornel LesiĆski <kornel@geekhood.net> | 2016-05-28 02:16:05 +0300 |
commit | 35596517f203f1c4970413b3b5b2e216b849e462 (patch) | |
tree | 93240df3eb4ddbd8eebbe6a5fc65e93f2ccb6495 /CPP/7zip/UI/GUI/BenchmarkDialog.h | |
parent | de4f8c22fe4b9e59b60495b84db2e81de50999a9 (diff) |
9.219.21
Diffstat (limited to 'CPP/7zip/UI/GUI/BenchmarkDialog.h')
-rwxr-xr-x | CPP/7zip/UI/GUI/BenchmarkDialog.h | 34 |
1 files changed, 31 insertions, 3 deletions
diff --git a/CPP/7zip/UI/GUI/BenchmarkDialog.h b/CPP/7zip/UI/GUI/BenchmarkDialog.h index 2b6216fd..b3ab9dcb 100755 --- a/CPP/7zip/UI/GUI/BenchmarkDialog.h +++ b/CPP/7zip/UI/GUI/BenchmarkDialog.h @@ -5,6 +5,7 @@ #include "Windows/Synchronization.h" #include "Windows/Control/ComboBox.h" +#include "Windows/Control/Edit.h" #include "../Common/Bench.h" @@ -37,6 +38,9 @@ public: CBenchInfo2 DecompressingInfoTemp; CBenchInfo2 DecompressingInfo; + AString Text; + bool TextWasChanged; + CProgressSyncInfo() { if (_startEvent.Create() != S_OK) @@ -56,6 +60,9 @@ public: NumPasses = 0; // NumErrors = 0; + + Text.Empty(); + TextWasChanged = true; } void Stop() { @@ -85,14 +92,33 @@ public: void WaitCreating() { _startEvent.Lock(); } }; +struct CMyFont +{ + HFONT _font; + CMyFont(): _font(NULL) {} + ~CMyFont() + { + if (_font) + DeleteObject(_font); + } + void Create(const LOGFONT *lplf) + { + _font = CreateFontIndirect(lplf); + } +}; + + class CBenchmarkDialog: public NWindows::NControl::CModalDialog { NWindows::NControl::CComboBox m_Dictionary; NWindows::NControl::CComboBox m_NumThreads; + NWindows::NControl::CEdit _consoleEdit; UINT_PTR _timer; UINT32 _startTime; + CMyFont _font; + bool OnSize(WPARAM /* wParam */, int xSize, int ySize); bool OnTimer(WPARAM timerID, LPARAM callback); virtual bool OnInit(); void OnRestartButton(); @@ -115,12 +141,14 @@ class CBenchmarkDialog: void OnChangeSettings(); public: CProgressSyncInfo Sync; + bool TotalMode; + CObjectVector<CProperty> Props; - CBenchmarkDialog(): _timer(0) {} + CBenchmarkDialog(): _timer(0), TotalMode(false) {} INT_PTR Create(HWND wndParent = 0) { BIG_DIALOG_SIZE(332, 228); - return CModalDialog::Create(SIZED_DIALOG(IDD_DIALOG_BENCHMARK), wndParent); + return CModalDialog::Create(TotalMode ? IDD_DIALOG_BENCHMARK_TOTAL : SIZED_DIALOG(IDD_DIALOG_BENCHMARK), wndParent); } void MessageBoxError(LPCWSTR message) { @@ -130,6 +158,6 @@ public: HRESULT Benchmark( DECL_EXTERNAL_CODECS_LOC_VARS - UInt32 numThreads, UInt32 dictionarySize, HWND hwndParent = NULL); + const CObjectVector<CProperty> props, HWND hwndParent = NULL); #endif |