#if !defined(AFX_ALERTPROPERTIESDLG_H__FCA32B1E_7A82_4686_AA6F_2A1CC99568E5__INCLUDED_)
#define AFX_ALERTPROPERTIESDLG_H__FCA32B1E_7A82_4686_AA6F_2A1CC99568E5__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// AlertPropertiesDlg.h : header file
//
#include "resource.h"
#include "apl_gui.h"

class CaplInstance;
class CaplAPI;
/////////////////////////////////////////////////////////////////////////////
// CAlertPropertiesDlg dialog

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

	CaplAPI *m_api;
	CaplInstance *m_alert;
	CaplInstance *m_author;
	CaplInstance *m_recipient;
	CaplInstance *m_object;
	CaplInstance *m_cur_person;
	long m_mode;
	bool m_read_only;

	int m_active_state;
	int m_completed_state;

	bool SaveChanges();
	void SetReadOnlyItems();
// Dialog Data
	//{{AFX_DATA(CAlertPropertiesDlg)
	enum { IDD = IDD_ALERT_PROPERTIES_DLG };
	CaplButton	m_clear_object_btn;
	CButton	m_select_object_btn;
	CEdit	m_object_ctrl;
	CButton	m_select_recipient_btn;
	CButton	m_select_author_btn;
	CEdit	m_recipient_ctrl;
	CEdit	m_author_ctrl;
	CComboBox	m_state_ctrl;
	CStatic	m_state_text;
	CButton	m_notify_check;
	CButton	m_delete_completed_check;
	CButton	m_start_alert_to_btn;
	CButton	m_start_alert_from_btn;
	CEdit	m_start_alert_minuts_ctrl;
	CEdit	m_start_alert_hours_ctrl;
	CEdit	m_start_alert_days_ctrl;
	CaplButton	m_ok_btn;
	CaplButton	m_cancel_btn;
	CEdit	m_span_minuts_ctrl;
	CEdit	m_span_hours_ctrl;
	CDateTimeCtrl	m_perf_time_ctrl;
	CDateTimeCtrl	m_perf_date_ctrl;
	CDateTimeCtrl	m_next_time_ctrl;
	CDateTimeCtrl	m_next_date_ctrl;
	CEdit	m_alert_text_ctrl;
	//}}AFX_DATA


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

// Implementation
protected:
	// предотвращаем потерю модальности после диалога с бочками из aplSocketTransport
	CaplParentWndProcesser m_pwp;

	// Generated message map functions
	//{{AFX_MSG(CAlertPropertiesDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnStartAlertTo();
	afx_msg void OnStartAlertFrom();
	virtual void OnOK();
	afx_msg void OnSelectAuthorBtn();
	afx_msg void OnSelectRecipientBtn();
	afx_msg void OnSelectObjectBtn();
	afx_msg void OnClearObject();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

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

#endif // !defined(AFX_ALERTPROPERTIESDLG_H__FCA32B1E_7A82_4686_AA6F_2A1CC99568E5__INCLUDED_)
