/***************************************************************************
**
**    $Header:   D:/ECB2S/SRC/LOG/AAOPTION.CPP   1.2.1.5   17 Apr 1997 15:40:26   ZJRD  $
**
**    $Log:   D:/ECB2S/SRC/LOG/AAOPTION.CPP  $
** 
**    Rev 1.2.1.5   17 Apr 1997 15:40:26   ZJRD
** No change.
** 
**    Rev 1.2.1.4   16 Apr 1997 10:10:42   ZJRD
** No change.
** 
**    Rev 1.2.1.3   10 Apr 1997 15:26:14   ZJRD
** 2.09F
** 
**    Rev 1.2.1.1   03 Apr 1997 15:08:22   ZJRD
** No change.
** 
**    Rev 1.2.1.0   28 Mar 1997 10:13:22   ZJRD
** easy pack sld 2.09d
** 
**    Rev 1.1   19 Mar 1997 11:24:44   ZJRD
** No change.
** 
**    Rev 1.0   12 Mar 1997 14:44:02   ZJRD
** Initial revision.
** 
**    Rev 1.5.1.0.1.2   09 Dec 1996 10:14:28   ZJRD
** EasyPack/SLD Version 2.0P
** 
**    Rev 1.5.1.0.1.0   11 Nov 1996 12:57:44   ZJRD
** EasyPack/SLD Version 2.01
** 
**    Rev 1.5.1.4   09 Sep 1996 13:14:10   ZJRD
** No change.
** 
**    Rev 1.5.1.3   05 Sep 1996 11:25:42   ZJRD
** No change.
** 
**    Rev 1.5.1.2   02 Sep 1996 09:52:50   ZJRD
** No change.
** 
**    Rev 1.5.1.1   28 Aug 1996 15:45:36   ZJRD
** No change.
** 
**    Rev 1.5.1.0   12 Aug 1996 10:50:38   ZJRD
** EasyPack/SLD Version 1.98
** 
**    Rev 1.2   29 May 1996 09:33:58   ZJRD
** EasyPack/SLD Version 1.95
** 
****************************************************************************/

/////////////////////////////////////////////////////////////////////////////
// aaoption.cpp
//
// Roger Zhang
//                                                                           
// 5/2/96
//
/////////////////////////////////////////////////////////////////////////////

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

#include "toolopt.h"
#include "aa.h"
#include "aaoption.h"

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

/////////////////////////////////////////////////////////////////////////////
// AAOption dialog


AAOption::AAOption(AATool * pTool)
    : CPropertyPage(AAOption::IDD)
{                                
    ASSERT(pTool);              
    
    m_pTool = pTool;
    
    LoadData();
    
    //{{AFX_DATA_INIT(AAOption)
	
	//}}AFX_DATA_INIT
}

void AAOption::DoDataExchange(CDataExchange* pDX)
{
    CPropertyPage::DoDataExchange(pDX);
    //{{AFX_DATA_MAP(AAOption)
    DDX_Check(pDX, IDC_AAOPT_CASE, m_fCase);
    DDX_Check(pDX, IDC_AAOPT_DEBUG, m_fDebug);
    DDX_Check(pDX, IDC_AAOPT_LIST, m_fList);
    DDX_Check(pDX, IDC_AAOPT_LISTALL, m_fListAll);
    DDX_Check(pDX, IDC_AAOPT_OPTIMIZE, m_fOptimize);
    DDX_Text(pDX, IDC_AAOPT_MORE, m_strMore);
    DDX_Text(pDX, IDC_AAOPT_PATH_EDIT, m_strPath);
	DDX_Text(pDX, IDC_AAOPT_PATH_EDITINCLUDE, m_incPath);
	//}}AFX_DATA_MAP
}

void AAOption::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_fCase     = m_fCase;
    m_pTool->m_fDebug    = m_fDebug;
    m_pTool->m_fList     = m_fList;
    m_pTool->m_fListAll  = m_fListAll;
    m_pTool->m_fOptimize = m_fOptimize;
    m_pTool->m_strMore   = m_strMore;
    m_pTool->m_strPath   = m_strPath; 
    m_pTool->m_incPath   = m_incPath;
}

void AAOption::LoadData(void)
{
    m_fCase     = m_pTool->m_fCase;
    m_fDebug    = m_pTool->m_fDebug;
    m_fList     = m_pTool->m_fList;
    m_fListAll  = m_pTool->m_fListAll;
    m_fOptimize = m_pTool->m_fOptimize;
    m_strMore   = m_pTool->m_strMore;
    m_strPath   = m_pTool->m_strPath;
    m_incPath   = m_pTool->m_incPath;
}

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


/////////////////////////////////////////////////////////////////////////////
// AAOption message handlers
