/***************************************************************************
**
**    $Header:   D:/ECB2S/SRC/LOG/DCOPTION.CPP   1.2.1.5   17 Apr 1997 15:47:44   ZJRD  $
**
**    $Log:   D:/ECB2S/SRC/LOG/DCOPTION.CPP  $
** 
**    Rev 1.2.1.5   17 Apr 1997 15:47:44   ZJRD
** No change.
** 
**    Rev 1.2.1.4   16 Apr 1997 10:19:04   ZJRD
** No change.
** 
**    Rev 1.2.1.3   10 Apr 1997 15:30:30   ZJRD
** 2.09F
** 
**    Rev 1.2.1.1   03 Apr 1997 15:11:26   ZJRD
** No change.
** 
**    Rev 1.2.1.0   28 Mar 1997 10:16:28   ZJRD
** easy pack sld 2.09d
** 
**    Rev 1.1   19 Mar 1997 11:27:36   ZJRD
** No change.
** 
**    Rev 1.0   12 Mar 1997 14:45:36   ZJRD
** Initial revision.
** 
**    Rev 1.4.1.0.1.2   09 Dec 1996 10:17:54   ZJRD
** EasyPack/SLD Version 2.0P
** 
**    Rev 1.4.1.0.1.0   11 Nov 1996 13:01:10   ZJRD
** EasyPack/SLD Version 2.01
** 
**    Rev 1.4.1.4   09 Sep 1996 13:22:50   ZJRD
** No change.
** 
**    Rev 1.4.1.3   05 Sep 1996 11:34:18   ZJRD
** No change.
** 
**    Rev 1.4.1.2   02 Sep 1996 10:01:20   ZJRD
** No change.
** 
**    Rev 1.4.1.1   28 Aug 1996 15:45:04   ZJRD
** No change.
** 
**    Rev 1.4.1.0   12 Aug 1996 10:50:14   ZJRD
** EasyPack/SLD Version 1.98
** 
**    Rev 1.1   29 May 1996 09:35:40   ZJRD
** EasyPack/SLD Version 1.95
** 
****************************************************************************/

/////////////////////////////////////////////////////////////////////////////
// dcoption.cpp
//
// Michael Long 
//                                                                           
// 5/14/96
//
/////////////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "resource.h"

#include "toolopt.h"
#include "dc.h"
#include "dcoption.h"

#ifdef _DEBUG
#undef THIS_FILE
static char BASED_CODE THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// DCOption dialog


DCOption::DCOption(DCTool * pTool)
    : CPropertyPage(DCOption::IDD)
{                                
    ASSERT(pTool);
    
    m_pTool = pTool;          
    
    LoadData();

    //{{AFX_DATA_INIT(DCOption)

	//}}AFX_DATA_INIT
}

void DCOption::DoDataExchange(CDataExchange* pDX)
{
    CPropertyPage::DoDataExchange(pDX);
    //{{AFX_DATA_MAP(DCOption)
    DDX_CBIndex(pDX, IDC_DCOPT_BANK, m_nRegBank);
    DDX_CBIndex(pDX, IDC_DCOPT_MODEL, m_nMemoryModel);
    DDX_CBIndex(pDX, IDC_DCOPT_OPTIMIZE, m_nOptimize);
    DDX_Text(pDX, IDC_DCOPT_EDIT, m_strMore);
    DDX_Check(pDX, IDC_DCOPT_CHECK2, m_fDb);
    DDX_Check(pDX, IDC_DCOPT_CHECK1, m_fNopr);
    DDX_Text(pDX, IDC_DCOPT_PATH_EDIT, m_strPath);
	DDX_Text(pDX, IDC_DCOPT_PATH_EDITINC, m_incPath);
	//}}AFX_DATA_MAP
}

void DCOption::SaveData(void)
{                                  
//  UpdateData(TRUE);
    m_strPath.TrimLeft();
    m_strPath.TrimRight();
    m_strMore.TrimLeft();
    m_strMore.TrimRight();  
    m_incPath.TrimLeft();
    m_incPath.TrimRight();

    m_pTool->m_nRegBank     = m_nRegBank;
    m_pTool->m_nMemoryModel = m_nMemoryModel;
    m_pTool->m_nOptimize    = m_nOptimize;
    m_pTool->m_strMore      = m_strMore;
    m_pTool->m_fDb          = m_fDb;
    m_pTool->m_fNopr        = m_fNopr;
    m_pTool->m_strPath      = m_strPath; 
    m_pTool->m_incPath      = m_incPath;
    
   }

void DCOption::LoadData(void)
{
    m_nRegBank     = m_pTool->m_nRegBank;
    m_nMemoryModel = m_pTool->m_nMemoryModel;
    m_nOptimize    = m_pTool->m_nOptimize;
    m_strMore      = m_pTool->m_strMore;
    m_fDb          = m_pTool->m_fDb;
    m_fNopr        = m_pTool->m_fNopr;
    m_strPath      = m_pTool->m_strPath; 
    m_incPath      = m_pTool->m_incPath;
    
}

BEGIN_MESSAGE_MAP(DCOption, CPropertyPage)
    //{{AFX_MSG_MAP(DCOption)
        // NOTE: the ClassWizard will add message map macros here
    //}}AFX_MSG_MAP
END_MESSAGE_MAP()


/////////////////////////////////////////////////////////////////////////////
// DCOption message handlers
