/*

 **********************************************************************
 *
 * Original Axis by:
 * Copyright (C) Philip A. Esterle 1998-2002 + (C) parts Adron 2002
 *
 * 55r,56(x) Mods, and Axis2 re-build by:
 * Copyright (C) Benoit Croussette 2004-2006
 * 
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2 of the GNU General Public License as
 * published by the Free Software Foundation.
 * 
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 * 
 **********************************************************************

*/

// AboutDlg.cpp : implementation file
//

#include "stdafx.h"
#include "Axis2.h"
#include "AboutDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CAboutDlg dialog


CAboutDlg::CAboutDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CAboutDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CAboutDlg)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CAboutDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CAboutDlg)
	DDX_Control(pDX, IDC_LICENSE, m_ceLicense);
	DDX_Control(pDX, IDC_SERVER_VERSION, m_csServerVersion);
	DDX_Control(pDX, IDC_ABOUTTIMESTAMP, m_csTimestamp);
	DDX_Control(pDX, IDC_ABOUTTITLE, m_csTitle);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CAboutDlg, CDialog)
	//{{AFX_MSG_MAP(CAboutDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CAboutDlg message handlers

BOOL CAboutDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();

	this->m_csTimestamp.SetWindowText(Main->GetBuildTimestamp());

	this->m_csTitle.SetWindowText(Main->GetVersionTitle());
	this->m_csServerVersion.SetWindowText(SERVER_VERSION);

	CString csLicense;
	CString lf;
	lf.Format("%c%c%c%c", 0x0d, 0x0a, 0x0d, 0x0a);
	csLicense += _T("This program is free software; you can redistribute it and/or modify ");
	csLicense += _T("it under the terms of version 2 of the GNU General Public License as ");
	csLicense += _T("published by the Free Software Foundation.");
	csLicense += lf;
	csLicense += _T("This program is distributed in the hope that it will be useful, but ");
	csLicense += _T("WITHOUT ANY WARRANTY; without even the implied warranty of ");
	csLicense += _T("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU ");
	csLicense += _T("General Public License for more details.");
	csLicense += lf;
	csLicense += _T("You should have received a copy of the GNU General Public License along ");
	csLicense += _T("with this program; if not, write to the Free Software Foundation, Inc., ");
	csLicense += _T("59 Temple Place - Suite 330, Boston, MA 02111-1307, USA");

	m_ceLicense.SetWindowText(csLicense);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CAboutDlg::OnCancel() 
{
	CDialog::OnCancel();
}
