/***************************************************************************
**
**    $Header:   D:/ECB2S/SRC/LOG/SPAUSER.H__   1.2.1.4   17 Apr 1997 16:00:18   ZJRD  $
**
**    $Log:   D:/ECB2S/SRC/LOG/SPAUSER.H__  $
** 
**    Rev 1.2.1.4   17 Apr 1997 16:00:18   ZJRD
** No change.
** 
**    Rev 1.2.1.3   16 Apr 1997 10:33:14   ZJRD
** No change.
** 
**    Rev 1.2.1.2   10 Apr 1997 15:42:44   ZJRD
** No change.
** 
**    Rev 1.2.1.1   03 Apr 1997 15:21:26   ZJRD
** No change.
** 
**    Rev 1.2.1.0   28 Mar 1997 10:25:38   ZJRD
** easy pack sld 2.09d
** 
**    Rev 1.1   19 Mar 1997 11:35:34   ZJRD
** No change.
** 
**    Rev 1.0   12 Mar 1997 14:50:04   ZJRD
** Initial revision.
** 
**    Rev 1.7.1.0.1.0   11 Nov 1996 12:59:42   ZJRD
** EasyPack/SLD Version 2.01
** 
**    Rev 1.7.1.4   09 Sep 1996 13:18:56   ZJRD
** No change.
** 
**    Rev 1.7.1.3   05 Sep 1996 11:30:28   ZJRD
** No change.
** 
**    Rev 1.7.1.2   02 Sep 1996 09:57:32   ZJRD
** No change.
** 
**    Rev 1.7.1.1   28 Aug 1996 15:52:48   ZJRD
** No change.
** 
**    Rev 1.7.1.0   12 Aug 1996 10:56:10   ZJRD
** No change.
** 
**    Rev 1.7   11 Jun 1996 10:24:24   ZJRD
** EasyPack/SLD Version 1.97
** 
**    Rev 1.5   05 Jun 1996 14:52:08   ZJRD
** EasyPack/SLD Version 1.96
** 
**    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);
	BOOL 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
