#if !defined(AFX_RECEIVEALL_H__92BBCB70_314D_11D3_B2A6_002078154408__INCLUDED_)
#define AFX_RECEIVEALL_H__92BBCB70_314D_11D3_B2A6_002078154408__INCLUDED_

#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
// ReceiveAll.h : header file
//

#include <UserNetwork.h>

#include <ElapsedTime.h>


#define NUM_BLANKS 10 //this is the number of entry lines on the dialog
#define NUM_SPACES 6 //this is the number of entry spaces on each line

/////////////////////////////////////////////////////////////////////////////
// CReceiveAll dialog

class CReceiveAll : public CPropertyPage, CElapsedTime
{
	DECLARE_DYNCREATE(CReceiveAll)

// Construction
public:
	CReceiveAll();
	~CReceiveAll();

// Dialog Data
	//{{AFX_DATA(CReceiveAll)
	enum { IDD = IDD_DIALOG_RECEIVE_ALL };
	CButton	m_ctrlButtonStop;
	CButton	m_ctrlButtonStart;
	//}}AFX_DATA


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

// Implementation
protected:
	// Generated message map functions
	//{{AFX_MSG(CReceiveAll)
	afx_msg void OnCheckStart();
	afx_msg void OnCheckStop();
	virtual BOOL OnInitDialog();
	afx_msg void OnTimer(UINT nIDEvent);
	afx_msg void OnPaint();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

protected:
	void m_SetBlanksNull();
	int m_iCraftIdIds[NUM_BLANKS];
	int m_iHandleIds[NUM_BLANKS];
	int m_iRateIds[NUM_BLANKS];
	int m_iXPosIds[NUM_BLANKS];
	int m_iYPosIds[NUM_BLANKS];
	int m_iZPosIds[NUM_BLANKS];

	static int m_iCurrentCraftId[NUM_BLANKS];
	static CWnd* hSaveDlg[NUM_BLANKS][NUM_SPACES];
	static DWORD dwCurrentTimeMs[NUM_BLANKS],dwLastTimeMs[NUM_BLANKS],dwElapsedTimeMs[NUM_BLANKS];
	static double m_dTotalTimeSec;

	static int m_iCraftID[NUM_BLANKS];
	static CString m_strHandle[NUM_BLANKS];
	static float m_fReceiveRate[NUM_BLANKS];
	static int m_iPosX[NUM_BLANKS];
	static int m_iPosY[NUM_BLANKS];
	static int m_iPosZ[NUM_BLANKS];
	UINT m_uiTimerIDTotalTime[NUM_BLANKS];


public:
	virtual void WorkFunction(UINT uiTimerID);
	static void CALLBACK StaticPacketHandler(Aircraft *aP);
	Aircraft acftReceived;

	UINT m_uiTimerID;
	UINT m_uiTotalTimeID;
	void m_ReceivePackets();


};

//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.




#endif // !defined(AFX_RECEIVEALL_H__92BBCB70_314D_11D3_B2A6_002078154408__INCLUDED_)
