//---------------------------------
// Name:			UpgradingDialog.h
// Purpose:			Dialog showing upgrade progress
// Toolchain(s):	Microsoft Visual C++
// Creation date:	26-May-06
// Created by:		JJo
//---------------------------------

#ifndef FIRMWARE_UPGRADE_UPGRADINGDIALOG_H
#define FIRMWARE_UPGRADE_UPGRADINGDIALOG_H

//---------------------------------
// Includes

#include <afxwin.h>
#include <afxcmn.h>
#include "resource.h"
#include "Misc/Configuration.h"

//---------------------------------
// Class

class UpgradingDialog : public CDialog {

private:
	CProgressCtrl * m_pProgress;
	Configuration * m_pConfiguration;
	CWinThread * m_pThread;
	BOOL m_close;

	static UINT UpgradingDialog::Upgrade(LPVOID pParam);

public:
	UpgradingDialog::UpgradingDialog(CWnd * pParent, Configuration * pConfiguration);
	UpgradingDialog::~UpgradingDialog();

	afx_msg BOOL UpgradingDialog::OnInitDialog();
	afx_msg void UpgradingDialog::OnProgress();
	afx_msg void UpgradingDialog::OnFinished();
	afx_msg void UpgradingDialog::OnCancelClicked();
	afx_msg LRESULT UpgradingDialog::OnShouldClose();

	DECLARE_MESSAGE_MAP()
};

#endif