
// MBARI_TestDlg.h : header file
//

#pragma once
#include "CTD_TCP.h"
#include "Status.h"
#include "ColorListBox.h"
#include "TimeSync.h"
#include "afxwin.h"
#include "afxcmn.h"

// CMBARI_TestDlg dialog
class CMBARI_TestDlg : public CDialogEx
{
public:
	enum { IDD = IDD_MBARI_TEST_DIALOG };

	CMBARI_TestDlg(CWnd* pParent = NULL);	 

	void UpdateStatus();
	virtual void DoDataExchange(CDataExchange* pDX);	 
	virtual BOOL OnInitDialog();
	void GetSettings();
	LRESULT OnExit(WPARAM wParam, LPARAM lParam );

	afx_msg void OnBnClickedCTD_TCP();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnTimer(UINT_PTR nIDEvent);
	afx_msg void OnBnClickedTimeSyncTCP();
	afx_msg void OnClose();
	afx_msg void OnCbnSelchangeHeadlist();
	DECLARE_MESSAGE_MAP()

//private:
	HICON					m_hIcon;

	Status				*m_pStatus;
	CTD_TCP				*m_pCTD_TCP;
	CTD_TCP				*m_pCTD_TCP2;
	TimeSync				*m_pTimeSync;
	CComboBox			m_PortList;
	CComboBox			m_HeadList;
	CComboBox			m_HeadList2;
	CColorListBox		m_StatusListBox;
	CIPAddressCtrl		m_IPAddress;
	CIPAddressCtrl		m_IPAddress2;

	bool					m_bCTDState1;
	bool					m_bCTDState2;
	bool					m_bINUState;
	bool					m_bFirstEntry;
	bool					m_bStartup;

	char					m_LastMessage[ Status::MSG_SIZE];
	CString				m_strTimeZDA;
	CString				m_strCTD;
 
	CString				m_strCTDPort1;
	CString				m_strCTDPort2;
	CString				m_strZDAPort1;
	CString				m_strZDAPort2;
	CString				m_strIP1;
	CString				m_strIP2;
	CString				m_strCTD_TEMPC;

	int					m_CTDPort1;
	int					m_CTDPort2;
	int					m_ZDAPort1;
	int					m_ZDAPort2;
	float					m_ForceCTD_C;

	CButton				m_chkForceCTD;
};
