// SetupDlg.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CSetupDlg dialog

class CSetupDlg : public CDialog
{
// Construction
public:
	BOOL GetBackup() {return(m_bSaveAllData);} 
	void SetBackup(BOOL var);
	void SetLatLongDev(UINT dev);
	UINT GetLatLongDev() {return m_LatLongDev;}
	void SetLongMean(int longmean);
	int GetLongMean() {return m_LongMean;}
	void SetLatMean(int latmean);
	int GetLatMean() {return m_LatMean;}
	UINT GetServerPortNum();
	void SetServerPortNum(UINT port);
	void GetCorrection(int *lat,int *lon);
	BOOL SetCorrection(int lat,int lon);

	void SetGMTTime(int time) {m_nGMTTime = time;}
	int GetGMTTime() {return m_nGMTTime;}

	CString GetIPString();
	void SetIPString(CString IPaddr);
	BOOL GetMapUpdate();
	void SetMapUpdate(BOOL update);
	CSetupDlg(CWnd* pParent = NULL);   // standard constructor
	void SetPort(UINT Port) {m_nPortnum=Port;}
	UINT GetPort() {return(m_nPortnum);}
	// Get and Set functions for Remote IP Toggle
	void SetRemoteIP(BOOL update) {m_bRemoteIP=update;}
	BOOL GetRemoteIP() {return m_bRemoteIP;}
	void SetTCPMapEnable(BOOL setting) {m_bTCPMapEnable=setting;}
	BOOL GetTCPMapEnable() {return(m_bTCPMapEnable);}
	void SetSaveReport(BOOL setting) {m_bSaveReport=setting;}
	BOOL GetSaveReport() {return(m_bSaveReport);}
	void SetTCPMapPort(UINT portnum) {m_nTCPPortNum=portnum;}
	UINT GetTCPMapPort() {return(m_nTCPPortNum);}

protected:
	void IPStringToNum();
	CString NumToIPString();
	CString IPAddress;

protected:
// Dialog Data
	//{{AFX_DATA(CSetupDlg)
	enum { IDD = IDD_SETUP_DLG };
	UINT	m_nPortnum;
	UINT	m_nIPaddrA;
	UINT	m_nIPaddrB;
	UINT	m_nIPaddrC;
	UINT	m_nIPaddrD;
	BOOL	m_bRemoteIP;
	BOOL	m_bMapUpdate;
	double	m_dLongCorrection;
	double	m_dLatCorrection;
	UINT	m_nServPortNum;
	BOOL	m_bTCPMapEnable;
	UINT	m_nTCPPortNum;
	int		m_LatMean;
	UINT	m_LatLongDev;
	int		m_LongMean;
	BOOL	m_bSaveAllData;
	int		m_nGMTTime;
	BOOL	m_bSaveReport;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSetupDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CSetupDlg)
	afx_msg void OnRemoteIp();
	afx_msg void OnMapupdate();
	virtual void OnOK();
	afx_msg void OnShowWindow(BOOL bShow, UINT nStatus);
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};
