| | |
| | | { |
| | | CDialogEx::OnInitDialog(); |
| | | |
| | | // 定时器:1=初始化订阅,2=周期刷新(只增量) |
| | | // 定时器:1=初始化订阅,2=周期刷新(只增量),3=延迟加载首屏数据 |
| | | SetTimer(1, 3000, nullptr); |
| | | SetTimer(2, 2000, nullptr); |
| | | SetTimer(3, 10, nullptr); |
| | | |
| | | // 下拉框控件 |
| | | InitStatusCombo(); |
| | |
| | | m_listCtrl.SetPopupFullTextColumns({ 11, 12 }); |
| | | |
| | | Resize(); |
| | | OnBnClickedButtonSearch(); // 触发一次查询与首屏填充 |
| | | |
| | | return TRUE; // return TRUE unless you set the focus to a control |
| | | } |
| | |
| | | else if (nIDEvent == 2) { |
| | | UpdateWipData(); // 只做增量,不重建 |
| | | } |
| | | else if (nIDEvent == 3) { |
| | | KillTimer(3); |
| | | OnBnClickedButtonSearch(); // 延迟首屏查询,避免卡住 OnInitDialog |
| | | } |
| | | |
| | | CDialogEx::OnTimer(nIDEvent); |
| | | } |
| | |
| | | |
| | | void CPageGlassList::OnBnClickedButtonSearch() |
| | | { |
| | | CWaitCursor wait; // 显示等待光标,提示正在加载 |
| | | |
| | | // 获取关键字输入框内容 |
| | | CString strKeyword; |
| | | GetDlgItemText(IDC_EDIT_KEYWORD, strKeyword); |
| | |
| | | if (!row.pretty.empty()) { |
| | | CFile file; |
| | | if (file.Open(filePath, CFile::modeCreate | CFile::modeWrite)) { |
| | | file.Write(row.pretty.c_str(), row.pretty.length()); |
| | | file.Write(row.pretty.c_str(), (UINT)row.pretty.length()); |
| | | file.Close(); |
| | | |
| | | CString strSuccess; |
| | |
| | | double randomNoise = (rand() % 100 - 50) / 100.0 * variation * 0.3; // 随机噪声 |
| | | |
| | | return baseValue + timeTrend + randomNoise; |
| | | } |
| | | } |