#if !defined(AFX_DLGSBPPARAMS_H__D438716E_D90E_467B_9BE9_23AF01484D93__INCLUDED_)
#define AFX_DLGSBPPARAMS_H__D438716E_D90E_467B_9BE9_23AF01484D93__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DlgSBPParams.h : header file
//

#include <vector>
using namespace std;

#include "xShadeButton.h"
#include "StaticEx.h"

#include "6046DryEndDlg.h"


#define GAIN_CELLS		12
#define POWER_CELLS		101
#define DURATION_CELLS	50

/////////////////////////////////////////////////////////////////////////////
// CDlgSBPParams dialog

class CDlgSBPParams : public CDialog
{
// Construction
public:
	void AddPulseFile(CString fileName);
	CDlgSBPParams(CWnd* pParent = NULL);   // standard constructor

	void	SetSensorIndex(UINT index);
	UINT	m_dSensorIndex;

	void	AddPulseFiles();
	vector<CString> m_vecPulseFiles;

	CMy6046DryEndDlg	*m_pMainWnd;
	CSystemConfig		*m_pConfig;

	DWORD				SetCurrentRange			( float range );
	DWORD				SetCurrentPower			( UINT  power );

	BOOL	m_bPingEnabled;

// Dialog Data
	//{{AFX_DATA(CDlgSBPParams)
	enum { IDD = IDD_DLG_SBPPARAMS };
	CComboBox		m_ctrlComboPulse;
	CEdit			m_ctrlDuration;
	CxShadeButton	m_ctrlAcceptDuration;
	CxShadeButton	m_ctrlUpdate;
	CxShadeButton	m_ctrlPowerUp;
	CxShadeButton	m_ctrlPowerDown;
	CxShadeButton	m_ctrlPESBP;
	CxShadeButton	m_ctrlGainUp;
	CxShadeButton	m_ctrlGainDown;
	CStaticEx		m_ctrlPower;
	CStaticEx		m_ctrlGain;
	CString			m_strGain;
	CString			m_strPower;
	float			m_fDuration;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDlgSBPParams)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CDlgSBPParams)
	virtual void OnOK();
	virtual BOOL OnInitDialog();
	afx_msg void OnGaindownSbp();
	afx_msg void OnGainupSbp();
	afx_msg void OnPeSbp();
	afx_msg void OnPowerdownSbp();
	afx_msg void OnPowerupSbp();
	afx_msg void OnUpdateSbp();
	afx_msg void OnDoubleclickedDurationdownSbp();
	afx_msg void OnDoubleclickedDurationupSbp();
	afx_msg void OnDoubleclickedGaindownSbp();
	afx_msg void OnDoubleclickedGainupSbp();
	afx_msg void OnDoubleclickedPowerdownSbp();
	afx_msg void OnDoubleclickedPowerupSbp();
	afx_msg void OnDestroy();
	afx_msg void OnCancelMode();
	afx_msg void OnAcceptduration();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

private:
	void SaveSettings();
	void LoadSettings();

	int   m_dGain, m_dPower; //Index into arrays
	char  *m_pPulseFile;
	BOOL  m_bPingEnable;

	//Storage of settings values
	static int   m_aiGain[GAIN_CELLS];
		   int   m_aiPower[POWER_CELLS];

};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DLGSBPPARAMS_H__D438716E_D90E_467B_9BE9_23AF01484D93__INCLUDED_)
