AnalogPropertyDlg.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. #if !defined(AFX_ANALOGPROPERTYDLG_H__F2F714D0_8B12_4A66_9D89_433433F3FF2C__INCLUDED_)
  2. #define AFX_ANALOGPROPERTYDLG_H__F2F714D0_8B12_4A66_9D89_433433F3FF2C__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif // _MSC_VER > 1000
  6. // AnalogPropertyDlg.h : header file
  7. //
  8. #include "BtnST.h"
  9. #include "DataComboBox.h"
  10. #include "DDXFields.h"
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CAnalogPropertyDlg dialog
  13. class CAnalogPropertyDlg : public CDialog
  14. {
  15. // Construction
  16. public:
  17. CAnalogPropertyDlg(CWnd* pParent = NULL); // standard constructor
  18. // Dialog Data
  19. //{{AFX_DATA(CAnalogPropertyDlg)
  20. enum { IDD = IDD_ANALOGPRO };
  21. //}}AFX_DATA
  22. public:
  23. CADORecordset* m_pSet;
  24. CDDXFields m_DDXFields;
  25. enum {EDIT, COPY, NEW,EDITMORE};
  26. enum {DATA_NUM, DATA_STR, DATA_BIT, DATA_BOOL, DATA_FLOAT};
  27. int m_operation;
  28. CDataComboBox m_cmbVarType;
  29. CDataComboBox m_cmbFuncCode;
  30. CButtonST m_btnSave,m_btnCancel, m_btnSetStatus, m_btnDatePlan;
  31. CArrayStringBox m_varTypeArray;
  32. CArrayStringBox m_funcCodeArray;
  33. int m_nStartBit, m_nEndBit;
  34. // Overrides
  35. // ClassWizard generated virtual function overrides
  36. //{{AFX_VIRTUAL(CAnalogPropertyDlg)
  37. protected:
  38. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  39. //}}AFX_VIRTUAL
  40. // Implementation
  41. protected:
  42. // Generated message map functions
  43. //{{AFX_MSG(CAnalogPropertyDlg)
  44. virtual BOOL OnInitDialog();
  45. //}}AFX_MSG
  46. DECLARE_MESSAGE_MAP()
  47. private:
  48. void ChangeCtrlInfo();
  49. void ChangeCtrlInfoForEditMore();
  50. void InitCtrlInfo(int nType);
  51. void InitCtrlInfoForEditMore();
  52. void InsertToVariantManager();
  53. void EditVariant(int nVarID);
  54. int CheckDataValid();
  55. void InitRs232Combo();
  56. CString GetInvalidMessage( CString sVarName,int iInitValue,int iMinValue,int iMaxValue,int iLowerValue,int iUpperValue,int iNormalValue,int iWarningLevel,int iIdentifyTime );//µÃµ½²»ºÏ·¨µÄ±äÁ¿ÎÊÌâ
  57. public:
  58. afx_msg void OnBnClickedBtnCancel();
  59. afx_msg void OnBnClickedBtnSave();
  60. afx_msg void OnBnClickedBtnSelDev();
  61. afx_msg void OnBnClickedBtnSelReg();
  62. afx_msg void OnBnClickedBtnSelBit();
  63. afx_msg void OnBnClickedBtnSetStatus();
  64. afx_msg void OnBnClickedBtnDatePlan();
  65. afx_msg void OnCbnSelendokComboVarType();
  66. afx_msg void OnBnClickedBtnSelAlarmVar();
  67. CString m_sVarName;
  68. CString m_sUid;
  69. int m_nVarID;
  70. //for EditMore
  71. void SetControlStatusForEditMore();
  72. void EditMoreVar();
  73. void GetVarForEditMore();
  74. void GetVarForEditMoreOld();
  75. CUIntArray m_nArrayListID;
  76. int m_nVarSaveNum;
  77. CString m_sVarSave[500];
  78. int m_nVarSaveNumOld;
  79. CString m_sVarSaveOld[500];
  80. int m_nPrevRow;
  81. };
  82. //{{AFX_INSERT_LOCATION}}
  83. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  84. #endif // !defined(AFX_ANALOGPROPERTYDLG_H__F2F714D0_8B12_4A66_9D89_433433F3FF2C__INCLUDED_)