#if !defined(AFX_SHOWCONTENTSDIALOG_H__85CAC6C7_3DD6_47EA_9A9C_420FE6EDB82F__INCLUDED_)
#define AFX_SHOWCONTENTSDIALOG_H__85CAC6C7_3DD6_47EA_9A9C_420FE6EDB82F__INCLUDED_

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

/////////////////////////////////////////////////////////////////////////////
// CShowContentsDialog dialog
class CaplInstance;
class CPSMDoc;

#include "aplStepManager.h"
#include "resource.h"
#include "apl_gui.h"
#include "apl_api.h"
#include "ResizableDialog.h"
#include "InstPropertyCtrl.h"
#include "afxwin.h"


class CShowContentsDialog : public CResizableDialog
{
	class CShowContentsDialog_ch_val
	{
	public:
		CShowContentsDialog_ch_val(CaplInstance *charact0, CaplInstance *type0)
			{charact=charact0; type=type0;};
		CaplInstance *charact;
		CaplInstance *type;
	};
// Construction
public:
	CShowContentsDialog(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CShowContentsDialog)
	enum { IDD = IDD_SHOW_CONTENTS };
	CaplButton	m_run_btn;
	CComboBox	m_sel_context;
	CDateTimeCtrl	m_eff_time;
	CEdit	m_eff_sn;
	CDateTimeCtrl	m_eff_date;
	CButton	m_UseSN;
	CButton	m_UseDT;
	CButton	m_filtr_ramk;
	CButton	m_show_all_part_btn;
	CaplButton	m_exit;
	CaplButton	m_save_to_file;
	CaplButton	m_sel_charact_set;
	CaplButton	m_sel_charact_set_sel;
	CaplButton	m_BtnSelectColumns;
	CaplButton m_btnFilter;
//	CSortListCtrl	m_list;
	CInstPropertyCtrl	m_list;
	CButton	m_prd_sel;
	CString	m_Filter;
	CEdit	m_prd_name;
	CEdit	m_prd_id;
	CEdit	m_pdf_id;
	CButton	m_prd_ramk;	
	//}}AFX_DATA

	int m_mode;
	bool b_no_close;

	CaplInstance *m_pdf;
	CaplInstance *m_pComplectation;
	//CPSMDoc *m_doc;
	CaplAPI *m_api;

	aplInstArray m_ext_pdf;

	CString m_def_file_name;
	CString m_extents,m_fields,m_query;
	CaplDataBuf m_filter_query_buf;
	aplExtent m_list_charact;
	
// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CShowContentsDialog)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	void SetPdf();
	void Clear();

	CaplTAggr<SItemColumnData*,SItemColumnData*,APLAGGR_LIST_OR_AUTOKILLREF> m_Items;
	
	// Generated message map functions
	//{{AFX_MSG(CShowContentsDialog)
	virtual BOOL OnInitDialog();
	afx_msg void OnRclickListObjects(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnPdfSel();
	afx_msg void OnBegin();
	afx_msg void OnSelFilter();
	afx_msg void OnSaveToFile();
	afx_msg void OnSelectCharacterysticSet();
	afx_msg void OnShowAllPart();
	afx_msg void OnUseDatetime();
	afx_msg void OnUseSn();
	virtual void OnCancel();
	afx_msg void OnBtnSelectColumn();
	afx_msg void OnSelectCharacterysticSetSelected();
	afx_msg void OnBnClickedFilter();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()	
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SHOWCONTENTSDIALOG_H__85CAC6C7_3DD6_47EA_9A9C_420FE6EDB82F__INCLUDED_)
