123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- #pragma once
- // CDeviceView 窗体视图
- class CDeviceView : public CFormView
- {
- DECLARE_DYNCREATE(CDeviceView)
- protected:
- CDeviceView(); // 动态创建所使用的受保护的构造函数
- virtual ~CDeviceView();
- public:
- #ifdef AFX_DESIGN_TIME
- enum { IDD = DLG_DEVICEMANAGER };
- #endif
- #ifdef _DEBUG
- virtual void AssertValid() const;
- #ifndef _WIN32_WCE
- virtual void Dump(CDumpContext& dc) const;
- #endif
- #endif
- protected:
- virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
- DECLARE_MESSAGE_MAP()
- public:
- //////////////////////////////////////////////////////////////////////////
- // 读取baidu.cfg配置文件内容;
- typedef struct __COUNT_INFO__
- {
- std::string app_id;
- std::string api_key;
- std::string secret_key;
- std::string ret_count;
- }CountInfo, *pCountInfo;
- typedef struct __BAIDU_CFG__
- {
- std::string cur_count;
- std::string reset_time;
- std::map<std::string, __COUNT_INFO__> list_count;
- }BaiduCfg, *pBaiduCfg;
- BaiduCfg m_bdcfg;
- TCHAR m_szBaiduCfgPath[MAX_PATH];
- void ReadBaiduCfg(BaiduCfg &bdcfg);
- //////////////////////////////////////////////////////////////////////////
- // 读取resource_run.cfg配置文件内容;
- typedef struct __RS_RUN_CFG__
- {
- std::string sound_list; // 声音级别;
- std::string full_cut; // 是否全步骤截图;('True/False')
- //....
- std::string tg39_port;
- std::string tv_port;
- std::string sat_home;
- std::string sat_result_dir;
- std::string chroma22293;
- //...
- std::string menutree_chip;
- std::string menutree_style;
- std::string menutree_channel;
- //...
- std::string chroma1;
- std::string chroma2;
- }RsRunCfg, *pRsRunCfg;
- RsRunCfg m_rscfg;
- TCHAR m_szRsCfgPath[MAX_PATH];
- void ReadRsRunCfg(RsRunCfg &rscfg);
- //////////////////////////////////////////////////////////////////////////
- // 读取menutree目录;
- typedef struct __UI_TREE__
- {
- std::string ui;
- std::vector<std::string> vtSubUI;
- }UITree, *pUITree;
- std::map<std::string, std::vector<UITree>> m_map_tree;
- void ReadTreePath();
- // 解析json;
- void ParseJson();
- // 运行设备;
- void RunDevice();
- std::vector<std::string> m_vtCOM;
- void InitCombobox_port();
- BOOL IsPortInserted(CComboBox* pCommbox, LPCTSTR lpPort);
- afx_msg BOOL OnDeviceChange(UINT nEventType, DWORD_PTR dwData);
- public:
- virtual void OnInitialUpdate();
- virtual void OnDraw(CDC* /*pDC*/);
- afx_msg void OnPaint();
- afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
- // 全步骤截图;
- afx_msg void OnCheckFullCut();
- afx_msg void OnUpdateCheckFullCut(CCmdUI* pCmdUI);
- // 有声按钮;
- afx_msg void OnHadSound();
- afx_msg void OnUpdateHadSound(CCmdUI* pCmdUI);
- // 声音默认按钮;
- afx_msg void OnDefSound();
- afx_msg void OnUpdateDefSound(CCmdUI* pCmdUI);
- // 声音等级编辑框;
- // OCR账号下拉框;
- afx_msg void OnComboxOcr();
- afx_msg void OnUpdateComboxOcr(CCmdUI* pCmdUI);
- // MenuTree项目下拉框;
- afx_msg void OnComboProduct();
- afx_msg void OnUpdateComboProduct(CCmdUI* pCmdUI);
- // MenuTree UI下拉框;
- afx_msg void OnComboUi();
- afx_msg void OnUpdateComboUi(CCmdUI* pCmdUI);
- // MenuTree 子UI下拉框;
- afx_msg void OnComboSubUi();
- afx_msg void OnUpdateComboSubUi(CCmdUI* pCmdUI);
-
- // 信号仪1下拉框;
- afx_msg void OnCombo1_22293();
- afx_msg void OnUpdateCombo1_22293(CCmdUI* pCmdUI);
- // 信号仪2下拉框;
- afx_msg void OnCombo2_22293();
- afx_msg void OnUpdateCombo2_22293(CCmdUI* pCmdUI);
- // 信号仪1CheckBox;
- afx_msg void OnCheck1_22293();
- afx_msg void OnUpdateCheck1_22293(CCmdUI* pCmdUI);
- // 信号仪2CheckBox;
- afx_msg void OnCheck2_22293();
- afx_msg void OnUpdateCheck2_22293(CCmdUI* pCmdUI);
-
- afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
- //////////////////////////////////////////////////////////////////////////
- // 对话框控件;
- CComboBox m_cb_chroma1;
- CComboBox m_cb_chroma2;
- CButton m_ck_chroma1;
- CButton m_ck_chroma2;
- afx_msg void OnBnClickedButton1();
- afx_msg void OnBnClickedButton2();
- afx_msg void OnBnClickedCheck1();
- afx_msg void OnBnClickedCheck2();
- afx_msg void OnCbnSelchangeCombo1();
- afx_msg void OnCbnSelchangeCombo2();
- };
|