//---------------------------------
// Name:			MainDialog.h
// Purpose:			Main dialog of firmware updater application
// Toolchain(s):	Microsoft Visual C++
// Creation date:	26-May-06
// Created by:		JJo
//---------------------------------

#ifndef FIRMWARE_UPGRADE_MAINDIALOG_H
#define FIRMWARE_UPGRADE_MAINDIALOG_H

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

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

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

class MainDialog : public CDialog {

private:
	CComboBox * m_pFilename;
	CButton * m_pUpgrade;
	CButton * m_pSerialPort;
	CComboBox * m_pPort;
	CComboBox * m_pBaudrate;
	CComboBox * m_pParity;
	CComboBox * m_pStopBits;
	CButton * m_pXonXoff;
	CWinThread * m_pThread;
	ProgressDialog * m_pProgressDialog;

	static UINT MainDialog::Upgrade(LPVOID pParam);

public:
	MainDialog::MainDialog();
	MainDialog::~MainDialog();

	afx_msg void MainDialog::OnExitClicked();
	afx_msg void MainDialog::OnClose();
	afx_msg void MainDialog::OnBrowseClicked();
	afx_msg void MainDialog::OnUpgradeClicked();
	afx_msg BOOL MainDialog::OnInitDialog();
	afx_msg void MainDialog::OnSerialPortClicked();
	afx_msg void MainDialog::OnXonXoffClicked();

	DECLARE_MESSAGE_MAP()
};

#endif