/***************************************************************************
**
**    $Header:   D:/EPSLDV1/SRC/LOG/SPAUSER.H__   1.8   20 Jun 1996 09:24:36   ZJRD  $
**
**    $Log:   D:/EPSLDV1/SRC/LOG/SPAUSER.H__  $
** 
**    Rev 1.8   20 Jun 1996 09:24:36   ZJRD
** EasyPack/SLD Version 1.20a
** 
**    Rev 1.6   10 Jun 1996 10:19:14   ZJRD
** EasyPack/SLD Version 1.20
** 
**    Rev 1.4   29 May 1996 09:28:10   ZJRD
** EasyPack/SLD Version 1.95
** 
**    Rev 1.3   16 May 1996 09:08:32   ZJRD
** No change.
** 
**    Rev 1.2   10 May 1996 09:09:02   ZJRD
** EasyPack/SLD Version 1.93
** 
**    Rev 1.1   02 May 1996 10:26:28   ZJRD
** EasyPack/SLD Version 1.92
** 
**    Rev 1.1   18 Apr 1996 12:54:20   Shirley
** EasyPack/SLD Version 1.91
** 
**    Rev 1.0   12 Apr 1996 10:36:22   Shirley
** Initial revision.
** 
****************************************************************************/

/////////////////////////////////////////////////////////////////////////////
//
//  File name: SPAUSER.H
//
//  Description: The header file for the class: CSpaUserDefineDlg.
//
//  Author: Chen Jun
//
//  Date: 03/21/96
//
//  Modification:
//      1. 03/21/96, Initial version of the class: CSpaUserDefineDlg.
//
//  Copyright (C) 1996 Microtek International. All rights reserved.
//
/////////////////////////////////////////////////////////////////////////////
#ifndef _SPAUSER_H_
#define _SPAUSER_H_

/////////////////////////////////////////////////////////////////////////////
// CSpaUserDefineDlg dialog

class CSpaUserDefineDlg : public CDialog
{
// Construction
public:
	CSpaUserDefineDlg(CSpaGroupSheet* pSheet, CWnd* pParent = NULL);

// Dialog Data
	//{{AFX_DATA(CSpaUserDefineDlg)
	enum { IDD = IDD_SPA_DEFINE };
	CButton	m_btnAdd;
	CButton	m_btnModify;
	CButton	m_btnDelete;
	CButton	m_btnBrowse;
	CStatic	m_staticEnd;
	CEdit	m_editEnd;
	CListBox	m_listRange;
	int		m_nSelect;
	CString	m_strStart;
	CString	m_strEnd;
	CString	m_strDefine;
	//}}AFX_DATA

private:
	CSpaGroupSheet* m_pSheet;

	enum { executionRange = 0, entryRange };
	int m_nRangeSelect;

	enum { defineLen = 80, startLen = 80, endLen = 80 };
	CString m_strPath, m_strFile;
	
	enum { btnAdd = 0, btnModify, btnOnlyName };
	
	BOOL m_bShowBrowse, m_bShowAdd, m_bShowDelete, m_bShowModify;

// Implementation
private:
	void UpdateRecord(void);
	void TransferData(void);
	void DisableControl(void);

    void ReadRecord(void);
	void WriteRecord(void);
	
	void MakeRecordDirectory(void);

	void CheckInputSyntax(int nWhichButton);

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

	// Generated message map functions
	//{{AFX_MSG(CSpaUserDefineDlg)
	virtual BOOL OnInitDialog();
	virtual void OnCancel();
	afx_msg void OnButtonSpaUserAdd();
	afx_msg void OnButtonSpaUserDelete();
	afx_msg void OnButtonSpaUserModify();
	afx_msg void OnSelchangeListSpaRange();
	afx_msg void OnButtonSpaUserBrowse();
	virtual void OnOK();
	afx_msg void OnChangeEditSpaUser();
	afx_msg void OnChangeEditSpaStart();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

#endif
