/***************************************************************************
**
**    $Header:   D:/EPSLDV1/SRC/LOG/DCOPTION.CPP   1.5   20 Jun 1996 09:29:26   ZJRD  $
**
**    $Log:   D:/EPSLDV1/SRC/LOG/DCOPTION.CPP  $
** 
**    Rev 1.5   20 Jun 1996 09:29:26   ZJRD
** EasyPack/SLD Version 1.20a
** 
**    Rev 1.3   10 Jun 1996 10:24:04   ZJRD
** EasyPack/SLD Version 1.20
** 
**    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);
    //}}AFX_DATA_MAP
}

void DCOption::SaveData(void)
{                                  
//  UpdateData(TRUE);

    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;
    
   }

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;
    
}

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
