This commit is contained in:
locka%iol.ie 1999-05-27 21:28:46 +00:00
Родитель 2a433b12ce
Коммит 869bf6f9e6
6 изменённых файлов: 387 добавлений и 0 удалений

Просмотреть файл

@ -0,0 +1,66 @@
// TabDOM.cpp : implementation file
//
#include "stdafx.h"
#include "cbrowse.h"
#include "TabDOM.h"
#include "CBrowseDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTabDOM property page
IMPLEMENT_DYNCREATE(CTabDOM, CPropertyPage)
CTabDOM::CTabDOM() : CPropertyPage(CTabDOM::IDD, CTabDOM::IDD)
{
//{{AFX_DATA_INIT(CTabDOM)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
CTabDOM::~CTabDOM()
{
}
void CTabDOM::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTabDOM)
DDX_Control(pDX, IDC_DOMLIST, m_tcDOM);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CTabDOM, CPropertyPage)
//{{AFX_MSG_MAP(CTabDOM)
ON_BN_CLICKED(IDC_REFRESHDOM, OnRefreshDOM)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTabDOM message handlers
void CTabDOM::OnRefreshDOM()
{
if (m_pBrowseDlg)
{
m_pBrowseDlg->OnRefreshDOM();
}
}
BOOL CTabDOM::OnInitDialog()
{
CPropertyPage::OnInitDialog();
// Create the DOM tree
m_tcDOM.SetImageList(&m_pBrowseDlg->m_cImageList, TVSIL_NORMAL);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}

Просмотреть файл

@ -0,0 +1,54 @@
#if !defined(AFX_TABDOM_H__5216DE08_12D4_11D3_9407_000000000000__INCLUDED_)
#define AFX_TABDOM_H__5216DE08_12D4_11D3_9407_000000000000__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// TabDOM.h : header file
//
class CBrowseDlg;
/////////////////////////////////////////////////////////////////////////////
// CTabDOM dialog
class CTabDOM : public CPropertyPage
{
DECLARE_DYNCREATE(CTabDOM)
// Construction
public:
CTabDOM();
~CTabDOM();
CBrowseDlg *m_pBrowseDlg;
// Dialog Data
//{{AFX_DATA(CTabDOM)
enum { IDD = IDD_TAB_DOM };
CTreeCtrl m_tcDOM;
//}}AFX_DATA
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(CTabDOM)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CTabDOM)
afx_msg void OnRefreshDOM();
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TABDOM_H__5216DE08_12D4_11D3_9407_000000000000__INCLUDED_)

Просмотреть файл

@ -0,0 +1,46 @@
// TabMessages.cpp : implementation file
//
#include "stdafx.h"
#include "cbrowse.h"
#include "TabMessages.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTabMessages property page
IMPLEMENT_DYNCREATE(CTabMessages, CPropertyPage)
CTabMessages::CTabMessages() : CPropertyPage(CTabMessages::IDD, CTabMessages::IDD)
{
//{{AFX_DATA_INIT(CTabMessages)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
}
CTabMessages::~CTabMessages()
{
}
void CTabMessages::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTabMessages)
DDX_Control(pDX, IDC_OUTPUT, m_lbMessages);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CTabMessages, CPropertyPage)
//{{AFX_MSG_MAP(CTabMessages)
// NOTE: the ClassWizard will add message map macros here
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTabMessages message handlers

Просмотреть файл

@ -0,0 +1,53 @@
#if !defined(AFX_TABMESSAGES_H__33D0A350_12E1_11D3_9407_000000000000__INCLUDED_)
#define AFX_TABMESSAGES_H__33D0A350_12E1_11D3_9407_000000000000__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// TabMessages.h : header file
//
class CBrowseDlg;
/////////////////////////////////////////////////////////////////////////////
// CTabMessages dialog
class CTabMessages : public CPropertyPage
{
DECLARE_DYNCREATE(CTabMessages)
// Construction
public:
CTabMessages();
~CTabMessages();
CBrowseDlg *m_pBrowseDlg;
// Dialog Data
//{{AFX_DATA(CTabMessages)
enum { IDD = IDD_TAB_MESSAGES };
CListBox m_lbMessages;
//}}AFX_DATA
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(CTabMessages)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CTabMessages)
// NOTE: the ClassWizard will add member functions here
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TABMESSAGES_H__33D0A350_12E1_11D3_9407_000000000000__INCLUDED_)

Просмотреть файл

@ -0,0 +1,110 @@
// TabTests.cpp : implementation file
//
#include "stdafx.h"
#include "cbrowse.h"
#include "TabTests.h"
#include "CBrowseDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTabTests property page
IMPLEMENT_DYNCREATE(CTabTests, CPropertyPage)
CTabTests::CTabTests() : CPropertyPage(CTabTests::IDD, CTabTests::IDD)
{
//{{AFX_DATA_INIT(CTabTests)
m_szTestDescription = _T("");
//}}AFX_DATA_INIT
}
CTabTests::~CTabTests()
{
}
void CTabTests::DoDataExchange(CDataExchange* pDX)
{
CPropertyPage::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTabTests)
DDX_Control(pDX, IDC_RUNTEST, m_btnRunTest);
DDX_Control(pDX, IDC_TESTLIST, m_tcTests);
DDX_Text(pDX, IDC_TESTDESCRIPTION, m_szTestDescription);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CTabTests, CPropertyPage)
//{{AFX_MSG_MAP(CTabTests)
ON_BN_CLICKED(IDC_RUNTEST, OnRunTest)
ON_NOTIFY(TVN_SELCHANGED, IDC_TESTLIST, OnSelchangedTestlist)
ON_NOTIFY(NM_DBLCLK, IDC_TESTLIST, OnDblclkTestlist)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTabTests message handlers
void CTabTests::OnRunTest()
{
m_pBrowseDlg->OnRunTest();
}
void CTabTests::OnSelchangedTestlist(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
BOOL bItemSelected = FALSE;
m_szTestDescription.Empty();
HTREEITEM hItem = m_tcTests.GetNextItem(NULL, TVGN_FIRSTVISIBLE);
while (hItem)
{
UINT nState;
nState = m_tcTests.GetItemState(hItem, TVIS_SELECTED);
if (nState & TVIS_SELECTED)
{
bItemSelected = TRUE;
if (m_tcTests.ItemHasChildren(hItem))
{
TestSet *pTestSet = (TestSet *) m_tcTests.GetItemData(hItem);
m_szTestDescription = pTestSet->szDesc;
}
else
{
Test *pTest = (Test *) m_tcTests.GetItemData(hItem);
m_szTestDescription = pTest->szDesc;
}
}
hItem = m_tcTests.GetNextItem(hItem, TVGN_NEXTVISIBLE);
}
UpdateData(FALSE);
m_btnRunTest.EnableWindow(bItemSelected);
*pResult = 0;
}
void CTabTests::OnDblclkTestlist(NMHDR* pNMHDR, LRESULT* pResult)
{
OnRunTest();
*pResult = 0;
}
BOOL CTabTests::OnInitDialog()
{
CPropertyPage::OnInitDialog();
m_pBrowseDlg->PopulateTests();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}

Просмотреть файл

@ -0,0 +1,58 @@
#if !defined(AFX_TABTESTS_H__33D0A351_12E1_11D3_9407_000000000000__INCLUDED_)
#define AFX_TABTESTS_H__33D0A351_12E1_11D3_9407_000000000000__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// TabTests.h : header file
//
class CBrowseDlg;
/////////////////////////////////////////////////////////////////////////////
// CTabTests dialog
class CTabTests : public CPropertyPage
{
DECLARE_DYNCREATE(CTabTests)
// Construction
public:
CTabTests();
~CTabTests();
CBrowseDlg *m_pBrowseDlg;
// Dialog Data
//{{AFX_DATA(CTabTests)
enum { IDD = IDD_TAB_TESTS };
CButton m_btnRunTest;
CTreeCtrl m_tcTests;
CString m_szTestDescription;
//}}AFX_DATA
// Overrides
// ClassWizard generate virtual function overrides
//{{AFX_VIRTUAL(CTabTests)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CTabTests)
afx_msg void OnRunTest();
afx_msg void OnSelchangedTestlist(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDblclkTestlist(NMHDR* pNMHDR, LRESULT* pResult);
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_TABTESTS_H__33D0A351_12E1_11D3_9407_000000000000__INCLUDED_)