#if !defined(AFX_MPROCSTARTDIALOG_H__E780CA1B_E13A_4302_BF31_6C3651766753__INCLUDED_)
#define AFX_MPROCSTARTDIALOG_H__E780CA1B_E13A_4302_BF31_6C3651766753__INCLUDED_

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

#include "resource.h"
#include "apl_api.h"
/////////////////////////////////////////////////////////////////////////////
// CMProcStartDialog dialog

class CMProcStartDialog : public CaplResizableDialog
{
// Construction
public:
	CMProcStartDialog(CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CMProcStartDialog)
	enum { IDD = IDD_MULTIPROC_DIALOG };
	CListCtrl	m_lcList;
	CComboBox	m_cbSet;
	CString		m_csTempl;
	CaplButton	m_OK;
	CaplButton	m_Cancel;
	CaplButton	m_bProps;
	CaplButton	m_bDel;
	CaplButton	m_bAdd;
	CComboBox	m_cbPrototypes;
	int		m_iProcSchema;
	//}}AFX_DATA

	CaplAPI*				m_api;
	CaplWorkFlowManager*	m_wf_mgr;

	CaplInstance*			m_ciTemplate;
	CString					m_csTemplId;
	CString					m_csTemplName;
	CString					m_csTemplDescr;
	COleDateTimeSpan		m_dtsTemplDuration;

	//	Activity -> column & Column -> Activity
	CMapPtrToWord			m_Act2Col;
	CMapWordToPtr			m_Col2Act;


	bool					m_bSavedAutoSave;
	bool					m_bAutoAddProcInst;


	CaplInstance*			m_ciTask;

	aplExtent				m_aeProcesses;
	aplExtent				m_aeComponents;


	void					SetAnchors(void);
	void					InitControls(void);
	//	читаем аттрибуты из template один раз.
	void					InitVars(void);

	void					ChangeCtrlsState(void);


	inline BOOL				ShowPerf(void);

	void					FillList(void);
	void					FillRow(int iRow,CaplInstance* ciProc,BOOL bShowPerf);

	BOOL					SetUsers(int iRow,int iCol);
	CaplInstance*			BAdd();


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

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CMProcStartDialog)
	virtual BOOL OnInitDialog();
	virtual void OnOK();
	afx_msg void OnBAdd();
	afx_msg void OnBProps();
	afx_msg void OnBDel();
	afx_msg void OnItemchangedLcList(NMHDR* pNMHDR, LRESULT* pResult);
	afx_msg void OnDestroy();
	afx_msg void OnDblclkLcList(NMHDR* pNMHDR, LRESULT* pResult);
	virtual void OnCancel();
	afx_msg void OnSelchangeCbSet();
	afx_msg void OnSelchangePrototypes();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_MPROCSTARTDIALOG_H__E780CA1B_E13A_4302_BF31_6C3651766753__INCLUDED_)
