r5sdk/r5dev/sdklauncher/download_surface.h
Kawe Mazidjatari b5626cff23 Major cleanup
Decouple all logic from installer to shared utils, group all constants into 'sdklauncher_const.h'.
2023-07-30 16:51:44 +02:00

38 lines
952 B
C++

#pragma once
class CProgressPanel : public Forms::Form
{
public:
CProgressPanel();
virtual ~CProgressPanel() = default;
// Updates the progress
void UpdateProgress(uint32_t Progress, bool Finished);
bool IsCanceled();
void SetCanCancel(bool bEnable);
void SetAutoClose(bool Value);
void SetExportLabel(const char* pNewLabel);
private:
// Internal routine to setup the component
void InitializeComponent();
// Internal event on finish click
static void OnFinishClick(Forms::Control* Sender);
static void OnCancelClick(Forms::Control* Sender);
void CancelProgress(); // Cancels the progress
// Internal controls reference
UIX::UIXLabel* m_DownloadLabel;
UIX::UIXButton* m_CancelButton;
UIX::UIXButton* m_FinishButton;
UIX::UIXProgressBar* m_ProgressBar;
bool m_bCanClose; // Whether or not we can close.
bool m_bCanceled; // Whether or not we canceled it.
bool m_bAutoClose; // Whether or not to automatically close.
};