#include "iMaticClientSocket.h"
#pragma comment(lib,"iMaticClientSocket.lib")

//

#pragma once

#define MV_MESSAGE_FINSH_CONNECT_SOCK WM_USER+1
#define MV_MESSAGE_FINSH_SEND_COMMAND WM_USER+2


class CiMatic16Dlg : public CDialogEx
{

public:
	CiMatic16Dlg(CWnd* pParent = NULL);	


	enum { IDD = IDD_IMATIC16_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	



protected:
	HICON m_hIcon;
	iMaticClientSocket *test;

	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	LRESULT FinishConnectServer(WPARAM wParam,LPARAM lparam);

	boolean isConnecting;
	boolean isConneced;

	void SendCommand(int type,int number,int stuate);
	LRESULT FinishSendCommand(WPARAM wParam,LPARAM lparam);
	afx_msg void OnBnClickedConnect();
	afx_msg void OnBnClickedRelay1();
	afx_msg void OnBnClickedRelay2();
	afx_msg void OnBnClickedRelay3();
	afx_msg void OnBnClickedRelay4();
	afx_msg void OnBnClickedRelay5();
	afx_msg void OnBnClickedRelay15();
	afx_msg void OnBnClickedRelay6();
	afx_msg void OnBnClickedRelay7();
	afx_msg void OnBnClickedRelay8();
	afx_msg void OnBnClickedRelay9();
	afx_msg void OnBnClickedRelay10();
	afx_msg void OnBnClickedRelay11();
	afx_msg void OnBnClickedRelay12();
	afx_msg void OnBnClickedRelay13();
	afx_msg void OnBnClickedRelay14();
	afx_msg void OnBnClickedRelay16();
	afx_msg void OnBnClickedRelayall();
	afx_msg void OnBnClickedRefresh();
};
