/***************************************************************************
**
**    $Header:   D:/ECB2S/SRC/LOG/DIAGNO/DIAGNOST.H__   1.7   17 Apr 1997 16:36:08   ZJRD  $
**
**    $Log:   D:/ECB2S/SRC/LOG/DIAGNO/DIAGNOST.H__  $
** 
**    Rev 1.7   17 Apr 1997 16:36:08   ZJRD
** No change.
** 
**    Rev 1.6   16 Apr 1997 11:13:10   ZJRD
** No change.
** 
**    Rev 1.5   10 Apr 1997 15:57:36   ZJRD
** 2.09F
** 
**    Rev 1.3   03 Apr 1997 15:35:24   ZJRD
** No change.
** 
**    Rev 1.2   27 Mar 1997 15:19:30   ZJRD
** No change.
** 
**    Rev 1.1   19 Mar 1997 11:48:20   ZJRD
** No change.
** 
**    Rev 1.0   12 Mar 1997 15:01:22   ZJRD
** Initial revision.
** 
**    Rev 1.4.1.0.1.2   09 Dec 1996 10:24:36   ZJRD
** EasyPack/SLD Version 2.0P
** 
**    Rev 1.4.1.0.1.0   11 Nov 1996 13:04:36   ZJRD
** EasyPack/SLD Version 2.01
** 
**    Rev 1.4.1.4   09 Sep 1996 13:48:56   ZJRD
** EasyPack/SLD Version 1.9f
** 
**    Rev 1.4.1.3   05 Sep 1996 11:39:42   ZJRD
** No change.
** 
**    Rev 1.4.1.2   02 Sep 1996 10:04:18   ZJRD
** EasyPack/SLD Version 1.9d
** 
**    Rev 1.4.1.0   12 Aug 1996 11:06:20   ZJRD
** EasyPack/SLD Version 1.98
** 
**    Rev 1.2   05 Jun 1996 15:01:02   ZJRD
** EasyPack/SLD Version 1.96
** 
**    Rev 1.1   29 May 1996 09:43:02   ZJRD
** No change.
** 
**    Rev 1.0   16 May 1996 09:12:44   ZJRD
** Initial revision.
** 
****************************************************************************/
// diagnost.h : header file
//
//john chow 96.3
////////////////////////////////////////////////////////////////////////////
// CDiagnosticBox dialog
#ifndef _DIAGNOST_H
#define _DIAGNOST_H
#include "afxwin.h"
#include "afxext.h"
#include "resource.h"  
#include "meter.h" 
#include "abibase.h"

#define IDC_METER 51000

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

// Dialog Data
	//{{AFX_DATA(CDiagnosticBox)
	enum { IDD = IDD_DIAGNOSTICBOX };
	CButton	m_buttonFunction;
	CButton	m_Button_Locate;
	CButton	m_buttonDetail;
	CButton	m_buttonQuit;
	CButton	m_buttonEmulationRam;
	CButton	m_buttonCheckTraceRam;
	CButton	m_buttonCheckSpoonRam;
	CButton	m_buttonCheckPIOCTC;
	CButton	m_buttonCheckMapRam;
	CButton	m_buttonCheckEventDataRam;
	CButton	m_buttonCheckEventAddrRam;
	CButton	m_buttonDiagnostic;
	CButton	m_buttonCheckAll;
	CString	m_POIResult;
	CString	m_MAPRAMResult;
	CString	m_EVENTADDRResult;
	CString	m_EVENTDATARAMResult;
	CString	m_SPOONRAMResult;
	CString	m_EMULATIONRAMResult;
	CString	m_TRACERAMResult;
	CString	m_AllResult;
	//}}AFX_DATA

//members                 
protected:
	WORD wTimerCounter[10];//defined for showing diagnosis percent 
	HINSTANCE hLib;    
	CMeterControl m_Meter;
	CBrush	m_br;
	UINT m_nTimerID;
	BOOL m_isCanTime;
	BYTE m_bCurrentStep; 
	unsigned char m_nErrPIO;
	unsigned char m_nErrTrace;
	
	BYTE m_bPOIResult;
    BYTE m_bMAPRAMResult;
    BYTE m_bEVENTADDRResult;
    BYTE m_bEVENTDATARAMResult;
    BYTE m_bSPOONRAMResult;
    BYTE m_bEMULATIONRAMResult;
    BYTE m_bTRACERAMResult;
             
    WORD m_nPOIResultAddr;
    WORD m_nMAPRAMResultAddr;
    WORD m_nEVENTADDRResultAddr;
    WORD m_nEVENTDATARAMResultAddr;
    WORD m_nSPOONRAMResultAddr;
    WORD m_nEMULATIONRAMResultAddr;
    WORD m_nTRACERAMResultAddr;	

// Implementation
private:
    void DecideDiagnosticButtonStatus();
    void DecideDetailButtonStatus();
    void SetMeter();
    void DeleteMeter();
protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	// Generated message map functions
	//{{AFX_MSG(CDiagnosticBox)
	afx_msg void OnButtonDiagnostic();
	afx_msg void OnCheckAll();
	afx_msg void OnCheckPioctc();
	afx_msg void OnCheckEventaddrram();
	afx_msg void OnCheckEventdataram();
	afx_msg void OnCheckMapram();
	afx_msg void OnCheckSpoonram();
	afx_msg void OnCheckTraceram();
	afx_msg void OnEmulationram();
	virtual BOOL OnInitDialog();
	afx_msg void OnTimer(UINT nIDEvent);
	virtual void OnCancel();
	afx_msg void OnSize(UINT nType, int cx, int cy);
	afx_msg void OnButtonDetail();
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	afx_msg void OnDestroy();
	afx_msg void OnPaint();
	afx_msg void OnButtonLocate();
	afx_msg void OnButtonDetail2();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

/////////////////////////////////////////////////////////////////////////////
// CWaitDlg dialog

class CWaitDlg : public CDialog
{
// Construction
public:
	CWaitDlg(CWnd* pParent = NULL);	// standard constructor
	BOOL Create(CWnd* pParent, CString waitMsg);

// Dialog Data
	//{{AFX_DATA(CWaitDlg)
	enum { IDD = IDD_WAIT };
		// NOTE: the ClassWizard will add data members here
	//}}AFX_DATA

// Implementation
protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support

	// Generated message map functions
	//{{AFX_MSG(CWaitDlg)
	virtual BOOL OnInitDialog();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#endif

///////////////////////////END OF FILE //////////////////////////////////
