#if !defined(AFX_DLGTCP_H__2B3D97AE_B842_4EEA_881F_74FA933C8A66__INCLUDED_)
#define AFX_DLGTCP_H__2B3D97AE_B842_4EEA_881F_74FA933C8A66__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// DlgTCP.h : header file
//
#include "6046DryEnd.h"
#include "xShadeButton.h"
#include "Led.h"
#include "6046DryEndDlg.h"
#include "folder_dialog.h"
#include "Winsock2.h"
/////////////////////////////////////////////////////////////////////////////
// CDlgTCP dialog

class CDlgTCP : public CDialog
{
// Construction
public:
	
	CDlgTCP(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CDlgTCP)
	enum { IDD = IDD_DLG_TCP };
	CEdit			m_ctrlSyncInterval;
	CButton			m_ctrlCheckSyncInterval;
	CxShadeButton	m_ctrlUpdate;
	CEdit			m_ctrlMaxOverlap;
	CEdit			m_ctrlMaxFile;
	CEdit			m_ctrlLogDir;
	CButton			m_ctrlChkTimeSync;
	CButton			m_ctrlChkAutoSync;
	CxShadeButton	m_ctrlShutdown;
	CEdit			m_ctrlPort;
	CIPAddressCtrl	m_ctrlIpAddress;
	CxShadeButton	m_ctrlDisconnect;
	CxShadeButton	m_ctrlConnect;
	CLed			m_ctrlStatusLed;
	//}}AFX_DATA

	DWORD			m_dIPAdress;
	UINT			m_dPort;
	BOOL			m_bSync6046Time;
	BOOL			m_bAutoHealthChk;
	BOOL			m_bAutoSyncStartup;
	BOOL			m_bSyncOnInterval;
	
	UINT			m_uiSyncInterval;
	ULONG			m_uiMaxFileSize;
	ULONG			m_uiMaxFileOverlap;
	
	CString			m_TargetDir;

	CMy6046DryEndDlg	*m_pMainWnd;
	CSystemConfig		*m_pConfig;


	void			UpdateLoggingDirectory			(	char *loggingDir );


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDlgTCP)
	public:
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	virtual LRESULT WindowProc(UINT message, WPARAM wParam, LPARAM lParam);
	//}}AFX_VIRTUAL

// Implementation
protected:
	// Generated message map functions
	//{{AFX_MSG(CDlgTCP)
	virtual BOOL OnInitDialog();
	afx_msg void OnTcpConnect();
	afx_msg void OnTcpDisconnect();
	afx_msg void OnDestroy();
	afx_msg void OnCancelMode();
	afx_msg void OnCheckTimesync();
	afx_msg void OnTcpShutdown();
	afx_msg void OnCheckAutosync();
	afx_msg void OnTcpUpdate();
	afx_msg void OnCheckSyncinterval();
	afx_msg void OnChangeEditSyncinterval();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

	

private:
	void			LoadSettings			(	void );
	void			SaveSettings			(	void );

	
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DLGTCP_H__2B3D97AE_B842_4EEA_881F_74FA933C8A66__INCLUDED_)
