// UCBioBSP_SmartCardViewDemoDlg.h : header file
//
//{{AFX_INCLUDES()
#include "ucbiobsp_smartcardviewctrl.h"
//}}AFX_INCLUDES

#if !defined(AFX_UCBIOBSP_SMARTCARDVIEWDEMODLG_H__E67338E9_21BD_4E36_8D20_7A18B1FDE2A1__INCLUDED_)
#define AFX_UCBIOBSP_SMARTCARDVIEWDEMODLG_H__E67338E9_21BD_4E36_8D20_7A18B1FDE2A1__INCLUDED_

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

#include "UCBioAPI.h"
#include "UCBioAPI_SmartCard.h"
#include "UCBioAPI_Export.h"

/////////////////////////////////////////////////////////////////////////////
// CUCBioBSP_SmartCardViewDemoDlg dialog

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

   UCBioAPI_HANDLE            m_hUCBioAPI;

   UCBioAPI_UINT32            m_nNumDevice;
   UCBioAPI_DEVICE_ID*        m_pDeviceID;
   UCBioAPI_DEVICE_INFO_EX*   m_pDeviceInfoEx;
   UCBioAPI_DEVICE_ID         m_nLastOpenedDeviceID;

   CPtrArray   m_arrayEditCnt;
   CFont* m_pFont;

   void EnumDeviceList();
   void DisplayError(LPCTSTR szMsg, UCBioAPI_RETURN err);
   void DisplayBoolean(BOOL err);
   BOOL GetAuthModeAndKey(BYTE* pKey);

// Dialog Data
	//{{AFX_DATA(CUCBioBSP_SmartCardViewDemoDlg)
	enum { IDD = IDD_UCBIOBSP_SMARTCARDVIEWDEMO_DIALOG };
	CUCBioBSP_SmartCardViewCtrl	m_ctrlSCView;
   CButton	m_radioKeyA;
   CButton	m_radioKeyB;
   CEdit	m_editKeyB6;
	CEdit	m_editKeyB5;
	CEdit	m_editKeyB4;
	CEdit	m_editKeyB3;
	CEdit	m_editKeyB2;
	CEdit	m_editKeyB1;
	CEdit	m_editKeyA6;
	CEdit	m_editKeyA5;
	CEdit	m_editKeyA4;
	CEdit	m_editKeyA3;
	CEdit	m_editKeyA2;
	CEdit	m_editKeyA1;
	CComboBox	m_comboDeviceList;
	CString	m_szSerial;
	CString	m_szKeyA1;
	CString	m_szKeyA2;
	CString	m_szKeyA3;
	CString	m_szKeyA4;
	CString	m_szKeyA5;
	CString	m_szKeyA6;
	CString	m_szKeyB1;
	CString	m_szKeyB2;
	CString	m_szKeyB3;
	CString	m_szKeyB4;
	CString	m_szKeyB5;
	CString	m_szKeyB6;
	CString	m_szOutputMsg;
	int		m_nSector;
	int		m_nSectorKey;
	int		m_nBlock;
	int		m_nData;
	//}}AFX_DATA

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

// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	//{{AFX_MSG(CUCBioBSP_SmartCardViewDemoDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
   afx_msg void OnSelchangeComboDeviceList();
	afx_msg void OnDestroy();
	afx_msg void OnChangeEditKeyA1();
	afx_msg void OnChangeEditKeyA2();
	afx_msg void OnChangeEditKeyA3();
	afx_msg void OnChangeEditKeyA4();
	afx_msg void OnChangeEditKeyA5();
	afx_msg void OnChangeEditKeyA6();
   afx_msg void OnChangeEditKeyB1();
	afx_msg void OnChangeEditKeyB2();
	afx_msg void OnChangeEditKeyB3();
	afx_msg void OnChangeEditKeyB4();
	afx_msg void OnChangeEditKeyB5();
	afx_msg void OnChangeEditKeyB6();
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	afx_msg void OnButtonGetkey();
	afx_msg void OnButtonSetkey();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnButton1k();
	afx_msg void OnButton4k();
	afx_msg void OnButtonPlus();
	afx_msg void OnButtonMinus();
	afx_msg void OnButtonReadall();
	afx_msg void OnButtonWriteall();
	afx_msg void OnButtonClearall();
	afx_msg void OnButtonUndoall();
	afx_msg void OnButtonStarttosetdata();
	afx_msg void OnButtonReadonly();
	afx_msg void OnButtonReadsector();
	afx_msg void OnButtonWritesector();
	afx_msg void OnButtonClearsector();
	afx_msg void OnButtonUndosector();
	afx_msg void OnButtonIsdirtysector();
	afx_msg void OnButtonReadblock();
	afx_msg void OnButtonWriteblock();
	afx_msg void OnButtonClearblock();
	afx_msg void OnButtonUndoblock();
	afx_msg void OnButtonIsdirtyblock();
	afx_msg void OnButtonMark();
	afx_msg void OnButtonEditdata();
	afx_msg void OnButtonSetdata();
	afx_msg void OnButtonGetdata();
	afx_msg void OnButtonSetdatablock();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_UCBIOBSP_SMARTCARDVIEWDEMODLG_H__E67338E9_21BD_4E36_8D20_7A18B1FDE2A1__INCLUDED_)
