// DlgIntelligentSet.cpp : implementation file
//

#include "stdafx.h"
#include "Smart_Smart.h"
#include "DlgIntelligentSet.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CDlgSmartSetup dialog


CDlgSmartSetup::CDlgSmartSetup(CWnd* pParent /*=NULL*/)
	: CDialog(CDlgSmartSetup::IDD, pParent)
{
	//{{AFX_DATA_INIT(CDlgSmartSetup)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CDlgSmartSetup::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CDlgSmartSetup)
	DDX_Control(pDX, IDC_TAB_INTELLIGENT_SET, m_hSmartTab);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CDlgSmartSetup, CDialog)
	//{{AFX_MSG_MAP(CDlgSmartSetup)
	ON_NOTIFY(TCN_SELCHANGE, IDC_TAB_INTELLIGENT_SET, OnSelchangeTabSmartSet)
	ON_WM_CLOSE()
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDlgSmartSetup message handlers

BOOL CDlgSmartSetup::OnInitDialog() 
{
	CDialog::OnInitDialog();

	m_hRuleSet.Create(IDD_DLG_SMABSISET,this);
	m_hRuleSet.ShowWindow(SW_SHOW);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CDlgSmartSetup::OnSelchangeTabSmartSet(NMHDR* pNMHDR, LRESULT* pResult) 
{
    m_hRuleSet.ShowWindow(SW_SHOW);
	*pResult = 0;
}
void CDlgSmartSetup::SetCameraLinkParam(LPCTSTR pDevname,LPCTSTR pUrl,UINT ch,
											UINT port,LPCTSTR pUsername,LPCTSTR pPsw)
{
	m_hRuleSet.SetServerParam(pDevname, pUrl, port, pUsername, pPsw);
}

void CDlgSmartSetup::OnClose() 
{
	// TODO: Add your message handler code here and/or call default
	m_hRuleSet.Stop();
	CDialog::OnClose();
}
