// FileConnectDlg.cpp : implementation file
//

#include "stdafx.h"
#include "dashboard.h"
#include "FileConnectDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CFileConnectDlg dialog


CFileConnectDlg::CFileConnectDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CFileConnectDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CFileConnectDlg)
	m_misStr = _T("");
	m_pasStr = _T("");
	m_usrStr = _T("");
	//}}AFX_DATA_INIT
}


void CFileConnectDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CFileConnectDlg)
	DDX_Control(pDX, IDC_PAS, m_pasControl);
	DDX_Text(pDX, IDC_MIS, m_misStr);
	DDV_MaxChars(pDX, m_misStr, 64);
	DDX_Text(pDX, IDC_PAS, m_pasStr);
	DDV_MaxChars(pDX, m_pasStr, 64);
	DDX_Text(pDX, IDC_USR, m_usrStr);
	DDV_MaxChars(pDX, m_usrStr, 64);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CFileConnectDlg, CDialog)
	//{{AFX_MSG_MAP(CFileConnectDlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CFileConnectDlg message handlers

BOOL CFileConnectDlg::OnInitDialog()
{
	BOOL val = CDialog::OnInitDialog();
	m_pasControl.SetPasswordChar('*');
	return val;
}

BOOL CFileConnectDlg::dataGood()
{
	return _dataGood;
}

void CFileConnectDlg::setUsr(CString u)
{
	m_usrStr = u;
}

void CFileConnectDlg::setPas(CString p)
{
	m_pasStr = p;
}

void CFileConnectDlg::setMis(CString m)
{
	m_misStr = m;
}

CString CFileConnectDlg::getUsr()
{
	CString temp = m_usrStr;
	return temp;
}

CString CFileConnectDlg::getPas()
{
	CString temp = m_pasStr;
	return temp;
}

CString CFileConnectDlg::getMis()
{
	CString temp = m_misStr;
	return temp;
}

void CFileConnectDlg::OnCancel() 
{
	// TODO: Add extra cleanup here

	_dataGood = false;
	CDialog::OnCancel();
}

void CFileConnectDlg::OnOK() 
{
	// TODO: Add extra validation here
	_dataGood = true;
	CDialog::OnOK();
}
