// Baseline1.cpp : implementation file
//

#include "stdafx.h"
#include "CheckTr.h"
#include "Baseline1.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CBaseline dialog


CBaseline::CBaseline(CWnd* pParent /*=NULL*/)
	: CDialog(CBaseline::IDD, pParent)
{
	//{{AFX_DATA_INIT(CBaseline)
	m_Iterations = _T("");
	m_WindSize = _T("");
	m_Loaded1 = FALSE;
	m_Collected1 = TRUE;
	//}}AFX_DATA_INIT
}


void CBaseline::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CBaseline)
	DDX_Text(pDX, IDC_ITERATIONS, m_Iterations);
	DDX_Text(pDX, IDC_WINDOWSIZE, m_WindSize);
	DDX_Check(pDX, IDC_LOADED, m_Loaded1);
	DDX_Check(pDX, IDC_COLLECTED, m_Collected1);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CBaseline, CDialog)
	//{{AFX_MSG_MAP(CBaseline)
	ON_BN_CLICKED(IDC_LOADED, OnLoaded)
	ON_BN_CLICKED(IDC_COLLECTED, OnCollected)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CBaseline message handlers

void CBaseline::OnLoaded() 
{
	if(loaded1==false)
	{
		::CheckDlgButton(GetSafeHwnd(),IDC_LOADED,1);
		::CheckDlgButton(GetSafeHwnd(),IDC_COLLECTED,0);
		loaded1=true;
	}
	else
	{
		::CheckDlgButton(GetSafeHwnd(),IDC_LOADED,0);
		::CheckDlgButton(GetSafeHwnd(),IDC_COLLECTED,1);
		loaded1=false;
	}
}

void CBaseline::OnCollected() 
{
	if(loaded1==false)
	{
		::CheckDlgButton(GetSafeHwnd(),IDC_LOADED,1);
		::CheckDlgButton(GetSafeHwnd(),IDC_COLLECTED,0);
		loaded1=true;
	}
	else
	{
		::CheckDlgButton(GetSafeHwnd(),IDC_LOADED,0);
		::CheckDlgButton(GetSafeHwnd(),IDC_COLLECTED,1);
		loaded1=false;
	}
}
