2022-06-18 08:48:41 +00:00
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <Windows.h>
|
|
|
|
|
#include <string>
|
2022-10-09 03:59:45 +00:00
|
|
|
|
#include <map>
|
2022-06-18 08:48:41 +00:00
|
|
|
|
|
2022-06-20 07:17:55 +00:00
|
|
|
|
#include "DlgPage.h"
|
2022-06-18 08:48:41 +00:00
|
|
|
|
|
2022-06-20 07:17:55 +00:00
|
|
|
|
// CDlgIndicator 对话框
|
2022-06-18 08:48:41 +00:00
|
|
|
|
|
2022-06-20 07:17:55 +00:00
|
|
|
|
class dlg_indicator : public dlg_base
|
2022-06-18 08:48:41 +00:00
|
|
|
|
{
|
2022-06-20 07:17:55 +00:00
|
|
|
|
unsigned int papers_;
|
|
|
|
|
unsigned int images_;
|
|
|
|
|
bool err_;
|
2023-05-13 08:27:44 +00:00
|
|
|
|
bool finish_;
|
2022-06-18 08:48:41 +00:00
|
|
|
|
|
2022-06-20 07:17:55 +00:00
|
|
|
|
BOOL handle_message(UINT msg, WPARAM wp, LPARAM lp) override;
|
2022-06-18 08:48:41 +00:00
|
|
|
|
void handle_command(WORD code, WORD id, HANDLE ctrl);
|
2022-06-23 06:01:28 +00:00
|
|
|
|
void notify_over(bool cancel);
|
2022-06-18 08:48:41 +00:00
|
|
|
|
|
|
|
|
|
public:
|
2022-06-20 07:17:55 +00:00
|
|
|
|
dlg_indicator(HWND parent);
|
2022-06-18 08:48:41 +00:00
|
|
|
|
~dlg_indicator();
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
HWND window(void);
|
|
|
|
|
HWND parent(void);
|
|
|
|
|
void notify_data_arrived(bool image);
|
|
|
|
|
void notify_scan_over(const char* msg, bool err);
|
2022-07-01 07:24:58 +00:00
|
|
|
|
void notify_working(void);
|
2022-06-18 08:48:41 +00:00
|
|
|
|
};
|
2022-10-09 03:59:45 +00:00
|
|
|
|
|
2023-04-04 05:50:10 +00:00
|
|
|
|
typedef struct _dev_que
|
|
|
|
|
{
|
|
|
|
|
int id; // ID,用户选中后返回该值
|
|
|
|
|
std::string name; // 设备名称
|
|
|
|
|
std::string sn; // 设备序列号
|
|
|
|
|
}DEVQUE;
|
|
|
|
|
|
2022-10-09 03:59:45 +00:00
|
|
|
|
class dlg_choose_dev : public dlg_base
|
|
|
|
|
{
|
|
|
|
|
std::string sel_;
|
|
|
|
|
int item_;
|
|
|
|
|
|
|
|
|
|
BOOL handle_message(UINT msg, WPARAM wp, LPARAM lp) override;
|
|
|
|
|
void handle_command(WORD code, WORD id, HANDLE ctrl);
|
|
|
|
|
void handle_notify(UINT id, LPNMHDR pnhdr);
|
|
|
|
|
|
|
|
|
|
public:
|
2023-04-04 05:50:10 +00:00
|
|
|
|
dlg_choose_dev(HWND parent, const std::vector<DEVQUE>& devs);
|
2022-10-09 03:59:45 +00:00
|
|
|
|
~dlg_choose_dev();
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
std::string get_selected_device(void);
|
|
|
|
|
};
|