AnalogSinglePropertyDlg.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. #if !defined(AFX_ANALOGSINGLEPROPERTYDLG_H_INCLUDED_)
  2. #define AFX_ANALOGSINGLEPROPERTYDLG_H_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. // CAnalogSinglePropertyDlg dialog
  13. class CAnalogSinglePropertyDlg : public CDialog
  14. {
  15. // Construction
  16. public:
  17. CAnalogSinglePropertyDlg(CWnd* pParent = NULL); // standard constructor
  18. // Dialog Data
  19. //{{AFX_DATA(CAnalogSinglePropertyDlg)
  20. enum { IDD = IDD_SINGLE_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,m_btnAdvanced;
  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(CAnalogSinglePropertyDlg)
  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(CAnalogSinglePropertyDlg)
  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. public:
  57. afx_msg void OnBnClickedBtnCancel();
  58. afx_msg void OnBnClickedBtnSave();
  59. afx_msg void OnBnClickedBtnSelDev();
  60. afx_msg void OnBnClickedBtnSelReg();
  61. afx_msg void OnBnClickedBtnSelBit();
  62. afx_msg void OnBnClickedBtnSetStatus();
  63. afx_msg void OnBnClickedBtnDatePlan();
  64. afx_msg void OnBnClickedBtnAdvanced();
  65. afx_msg void OnCbnSelendokComboVarType();
  66. afx_msg void OnBnClickedBtnSelAlarmVar();
  67. public:
  68. void JudgePermit();
  69. CString m_sVarName;
  70. CString m_sUid;
  71. int m_nVarID;
  72. //for EditMore
  73. void SetControlStatusForEditMore();
  74. void EditMoreVar();
  75. void GetVarForEditMore();
  76. void GetVarForEditMoreOld();
  77. CUIntArray m_nArrayListID;
  78. int m_nVarSaveNum;
  79. CString m_sVarSave[500];
  80. int m_nVarSaveNumOld;
  81. CString m_sVarSaveOld[500];
  82. int m_nPrevRow;
  83. CString GetInvalidMessage( CString sVarName,int iInitValue,int iMinValue,int iMaxValue,int iLowerValue,int iUpperValue,int iNormalValue,int iWarningLevel,int iIdentifyTime );//µÃµ½²»ºÏ·¨µÄ±äÁ¿ÎÊÌâ
  84. };
  85. //{{AFX_INSERT_LOCATION}}
  86. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  87. #endif // !defined(AFX_ANALOGSINGLEPROPERTYDLG_H_INCLUDED_)