// SDK_USBm_SM642Dlg.h : header file
//

#if !defined(AFX_SDK_USBm_SM642DLG_H__0207F1DA_6E9B_434D_B340_5194EE4D0B3A__INCLUDED_)
#define AFX_SDK_USBm_SM642DLG_H__0207F1DA_6E9B_434D_B340_5194EE4D0B3A__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/////////////////////////////////////////////////////////////////////////////
// CSDK_USBm_SM642Dlg dialog
#include "SPdbUSBmDLL.h"

class CSDK_USBm_SM642Dlg : public CDialog
{
// Construction
public:
	CSDK_USBm_SM642Dlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CSDK_USBm_SM642Dlg)
	enum { IDD = IDD_SDK_USBm_SM642_DIALOG };
	CButton	m_btnAssign;
//	CButton	m_btnTrigger;
	CEdit	m_edSaveFileName;
	CEdit	m_edTimeAve;
	CEdit	m_edIntTime;
	CComboBox	m_cbChnlNum;
	CButton	m_btnGetDataCrnt;
	CButton	m_btnGetDataAll;
	CButton	m_btnClose;
	CButton	m_btnChkCnct;
	CButton	m_btnChkChnl;
	BOOL	m_bExtTrigger;
	CString	m_strSaveFileName;
	CString	m_strChkChnl;
	CString	m_strChkCnct;
	long	m_lIntTime;
	int		m_iTimeAve;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSDK_USBm_SM642Dlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	void DeactivateCtrls();
//	int SaveData(CString strName, float *fData, int iNum);
	short GetAndSaveData(CString strName, short sChnlID);
	short m_sPixelNum;		// CCD Pixel number, SONY 511: 2080 (32 dummy pixels + 2048 real pixels)
	short m_sTotChnlNum;	// Total Channel number
	short m_sCurChnl;		// Current Channel number
	short m_asChnIDs[MAX_USB_PORT_NUM];	// Channel IDs connected
	long m_alIntTime[MAX_USB_PORT_NUM];	// Integration Time per each channel
	BOOL m_bTriggerOld;	// Trigger mode (old)
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CSDK_USBm_SM642Dlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnBtnClose();
	afx_msg void OnBtnAssign();
	afx_msg void OnBtnChkConnect();
	afx_msg void OnBtnChkChannels();
	afx_msg void OnClose();
	afx_msg void OnSelchangeCbChannelNum();
	afx_msg void OnChangeEditIntTime();
	afx_msg void OnBtnGetDataCurrentChnl();
	afx_msg void OnBtnGetDataAllChannels();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
public:
	BOOL m_bOutputTrg;
	UINT m_TriggerMode;
	UINT m_TriggerModeOld;
	BOOL m_bTrgModeChange;
	afx_msg void OnBnClickedBtnTrgset();
	afx_msg void TrgModeChange(UINT nID);
	int m_iSelOutTrgPin;
	afx_msg void OnEnKillfocusEditSelouttrgpin();
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SDK_USBm_SM642DLG_H__0207F1DA_6E9B_434D_B340_5194EE4D0B3A__INCLUDED_)
