/***************************************************************************
**
**    $Header:   D:/ECB2S/SRC/LOG/BAOPTION.CPP   1.2.1.5   17 Apr 1997 15:41:38   ZJRD  $
**
**    $Log:   D:/ECB2S/SRC/LOG/BAOPTION.CPP  $
** 
**    Rev 1.2.1.5   17 Apr 1997 15:41:38   ZJRD
** No change.
** 
**    Rev 1.2.1.4   16 Apr 1997 10:15:38   ZJRD
** No change.
** 
**    Rev 1.2.1.3   10 Apr 1997 15:27:28   ZJRD
** 2.09F
** 
**    Rev 1.2.1.1   03 Apr 1997 15:09:20   ZJRD
** No change.
** 
**    Rev 1.2.1.0   28 Mar 1997 10:14:20   ZJRD
** easy pack sld 2.09d
** 
**    Rev 1.1   19 Mar 1997 11:25:38   ZJRD
** No change.
** 
**    Rev 1.0   12 Mar 1997 14:44:30   ZJRD
** Initial revision.
** 
**    Rev 1.4.1.0.1.2   09 Dec 1996 10:14:22   ZJRD
** EasyPack/SLD Version 2.0P
** 
**    Rev 1.4.1.0.1.0   11 Nov 1996 12:57:38   ZJRD
** EasyPack/SLD Version 2.01
** 
**    Rev 1.4.1.4   09 Sep 1996 13:13:58   ZJRD
** No change.
** 
**    Rev 1.4.1.3   05 Sep 1996 11:25:30   ZJRD
** No change.
** 
**    Rev 1.4.1.2   02 Sep 1996 09:52:38   ZJRD
** No change.
** 
**    Rev 1.4.1.1   28 Aug 1996 15:45:04   ZJRD
** EasyPack/SLD Version 1.9b
** 
**    Rev 1.4.1.0   12 Aug 1996 10:50:14   ZJRD
** EasyPack/SLD Version 1.98
** 
**    Rev 1.1   29 May 1996 09:28:32   ZJRD
** EasyPack/SLD Version 1.95
** 
****************************************************************************/

/////////////////////////////////////////////////////////////////////////////
// baoption.cpp
//
// Michael Long
//                                                                           
// 5/16/96
//
/////////////////////////////////////////////////////////////////////////////

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

#include "toolopt.h"
#include "ba.h"
#include "baoption.h"

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

/////////////////////////////////////////////////////////////////////////////
// BAOption dialog


BAOption::BAOption(BATool * pTool)
    : CPropertyPage(BAOption::IDD)
{                                
    ASSERT(pTool);              
    
    m_pTool = pTool;
    
    LoadData();
    
    //{{AFX_DATA_INIT(BAOption)

	//}}AFX_DATA_INIT
}

void BAOption::DoDataExchange(CDataExchange* pDX)
{
    CPropertyPage::DoDataExchange(pDX);
    //{{AFX_DATA_MAP(BAOption)
    DDX_Check(pDX, IDD_BAOPT_CHECK1, m_fX);
    DDX_Check(pDX, IDD_BAOPT_CHECK3, m_fE);
    DDX_Check(pDX, IDD_BAOPT_CHECK4, m_fS);
    DDX_Text(pDX, IDD_BAOPT_EDIT, m_strMore);
    DDX_Text(pDX, IDC_BAOPT_PATH_EDIT, m_strPath);
	DDX_Text(pDX, IDC_BAOPT_PATH_EDITINC, m_incPath);
	//}}AFX_DATA_MAP
}

void BAOption::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_fX        = m_fX;
    m_pTool->m_fE        = m_fE;
    m_pTool->m_fS        = m_fS;
    m_pTool->m_strMore   = m_strMore;
    m_pTool->m_strPath   = m_strPath;  
    m_pTool->m_incPath   = m_incPath;
}

void BAOption::LoadData(void)
{
    m_fX        = m_pTool->m_fX;
    m_fE        = m_pTool->m_fE;
    m_fS        = m_pTool->m_fS;
    m_strMore   = m_pTool->m_strMore;
    m_strPath   = m_pTool->m_strPath; 
    m_incPath   = m_pTool->m_incPath;
}

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


/////////////////////////////////////////////////////////////////////////////
// BAOption message handlers
