增加速度模式和休眠时间设置

This commit is contained in:
gb 2022-12-30 15:24:22 +08:00
parent 506baa0171
commit ca7027a702
4 changed files with 14 additions and 0 deletions

View File

@ -224,6 +224,8 @@ BOOL CDlgMgr::OnInitDialog()
SetDlgItemInt(IDC_EDIT_PID_SRC, 0x200);
SetDlgItemInt(IDC_EDIT_VID_TO, 0x3072);
SetDlgItemInt(IDC_EDIT_PID_TO, 0x0239);
SetDlgItemInt(IDC_EDIT_SLEEP, 5);
SetDlgItemInt(IDC_EDIT_SPEED, 60);
return TRUE; // 除非将焦点设置到控件,否则返回 TRUE
}
@ -427,6 +429,8 @@ std::wstring CDlgMgr::export_config(bool *ok, bool used_in_code, int code_ver)
pid_f = vid_pid_edit_value(GetDlgItem(IDC_EDIT_PID_SRC)->m_hWnd),
vid_t = vid_pid_edit_value(GetDlgItem(IDC_EDIT_VID_TO)->m_hWnd),
pid_t = vid_pid_edit_value(GetDlgItem(IDC_EDIT_PID_TO)->m_hWnd),
sleep = GetDlgItemInt(IDC_EDIT_SLEEP),
speed = GetDlgItemInt(IDC_EDIT_SPEED),
port = 0;
bool report = is_checked(GetDlgItem(IDC_CHECK2));
BYTE ip1 = 0, ip2 = 0, ip3 = 0, ip4 = 0;
@ -471,6 +475,8 @@ std::wstring CDlgMgr::export_config(bool *ok, bool used_in_code, int code_ver)
child->set_value(L"pid-org", pid_f);
child->set_value(L"vid-to", vid_t);
child->set_value(L"pid-to", pid_t);
child->set_value(L"sleep-time", sleep);
child->set_value(L"speed-mode", speed);
if (report)
{
::GetDlgItemTextW(m_hWnd, IDC_EDIT_DB, text, _countof(text) - 1);
@ -619,6 +625,11 @@ void CDlgMgr::reload(std::wstring& cont)
SetDlgItemInt(IDC_EDIT_VID_TO, n);
child->get_value(L"pid-to", n);
SetDlgItemInt(IDC_EDIT_PID_TO, n);
child->get_value(L"sleep-time", n);
SetDlgItemInt(IDC_EDIT_SLEEP, n);
child->get_value(L"speed-mode", n);
SetDlgItemInt(IDC_EDIT_SPEED, n);
if (child->get_value(L"report-url", &val) && val)
{
size_t pos = 0;

View File

@ -33,8 +33,11 @@
#define IDC_STATIC_VER 1017
#define IDC_EDIT_VER 1018
#define IDC_EDIT_NAME 1019
#define IDC_EDIT_VID_TO2 1019
#define IDC_EDIT_SLEEP 1019
#define IDC_EDIT_TITLE 1020
#define IDC_EDIT1 1020
#define IDC_EDIT_SPEED 1020
#define IDC_EDIT_DESC 1021
#define ID_LIST_32771 32771
#define ID_LIST_PASTE_CLIPBOARD 32772