#if !defined(AFX_FINDADJUSTCHARACTDLG_H__4857D7E5_7265_48CA_AE0A_0BBE157B3425__INCLUDED_)
#define AFX_FINDADJUSTCHARACTDLG_H__4857D7E5_7265_48CA_AE0A_0BBE157B3425__INCLUDED_

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

struct ElValChar;
class CaplNetStepData;


/////////////////////////////////////////////////////////////////////////////
// CFindAdjustCharactDlg dialog

class CFindAdjustCharactDlg : public CaplTranslateDialog
{
// Construction
public:
	CFindAdjustCharactDlg(CWnd* pParent = NULL);   // standard constructor
	
	CaplAPI *m_api;
	bool m_read_only;
	
	ElValChar* m_el;
	CaplInstance *m_unit;
	CaplInstance *m_cur_ref_val;
	CaplInstance *m_characteristic;
	RECT m_val_rect;
	
	void HideValue();
	void ExtValShow(int state);
	void SetLogOpSet(CaplQLQuery::aplQLLogRelation log_relation);
	void SetCharacterystic(CaplInstance *new_charact);
		

// Dialog Data
	//{{AFX_DATA(CFindAdjustCharactDlg)
	enum { IDD = IDD_FIND_ADJUST_CHARACT };
	CaplButton	m_BtnOk;
	CaplButton	m_BtnCancel;
	CButton	m_ChkStType;
	CButton	m_select_instance;
	CComboBox	m_ExistChar;
	CComboBox	m_type;
	CStatic	m_stat_min;
	CStatic	m_stat_max;
	CComboBox	m_log_op_ctrl_min;
	CComboBox	m_log_op_ctrl_max;
	CButton	m_sel_charact;
	CButton	m_ChkMinDev;
	CButton	m_ChkVal;
	CButton	m_ChkMaxDev;
	CEdit	m_min_dev;
	CEdit	m_max_dev;
	CEdit	m_value_ctrl;
	CEdit	m_str_val_ctrl;
	CStatic	m_stat_value;
	CEdit	m_measure_unit_ctrl;
	CComboBox	m_log_op_ctrl;
	CComboBox	m_enum_val_ctrl;
	CDateTimeCtrl	m_date_ctrl;
	CDateTimeCtrl	m_time_ctrl;
	BOOL	m_ChkType;
	CEdit	m_charact;
	//}}AFX_DATA

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

// Implementation
protected:
	void ValidateControlState();
	bool m_is_update;
	// Generated message map functions
	//{{AFX_MSG(CFindAdjustCharactDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnCheck();
	virtual void OnOK();
	afx_msg void OnSelchangeLogOp();
	afx_msg void OnSelchangeExistChar();
	afx_msg void OnSelectInstance();
	afx_msg void OnSelCharact();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_FINDADJUSTCHARACTDLG_H__4857D7E5_7265_48CA_AE0A_0BBE157B3425__INCLUDED_)
