| | |
| | | dlg->labelColors[IDC_STATIC_HUAXIN_TRADE_CHANNEL] = RGB(255, 0, 0); |
| | | dlg->labelHXTradeChannel.SetWindowTextW(st); |
| | | } |
| | | catch (wstring st) { |
| | | dlg->labelColors[IDC_STATIC_HUAXIN_TRADE_CHANNEL] = RGB(255, 0, 0); |
| | | dlg->labelHXTradeChannel.SetWindowTextW(st.c_str()); |
| | | } |
| | | catch (...) { |
| | | |
| | | } |
| | | |
| | | |
| | | if (kill) { |
| | |
| | | dlg->labelTradeChannelState.SetWindowTextW(L"异常"); |
| | | } |
| | | } |
| | | if (data.HasMember(L"today_zylt_updated_count")) { |
| | | int count = data[L"today_zylt_updated_count"].GetInt(); |
| | | dlg->labelTodayZyltVolumeCount.SetWindowTextW(to_wstring(count).c_str()); |
| | | } |
| | | |
| | | if (data.HasMember(L"today_history_k_bar_count")) { |
| | | int count = data[L"today_history_k_bar_count"].GetInt(); |
| | | dlg->labelTodayKBarsCount.SetWindowTextW(to_wstring(count).c_str()); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | else { |
| | | dlg->labelColors[IDC_STATIC_JUEJIN_STATE] = RGB(255, 0, 0); |
| | |
| | | catch (CString st) { |
| | | dlg->labelColors[IDC_STATIC_JUEJIN_STATE] = RGB(255, 0, 0); |
| | | dlg->labelJueJinState.SetWindowTextW(st); |
| | | } |
| | | catch (wstring st) { |
| | | dlg->labelColors[IDC_STATIC_JUEJIN_STATE] = RGB(255, 0, 0); |
| | | dlg->labelJueJinState.SetWindowTextW(CString(st.c_str())); |
| | | } |
| | | if (kill) { |
| | | break; |
| | |
| | | DDX_Control(pDX, IDC_STATIC_L2_LISTEN_ACTIVE, labelL2ListenData); |
| | | DDX_Control(pDX, IDC_LIST_L2_POSITION_CODES, listL2PositionCodes); |
| | | DDX_Control(pDX, IDC_STATIC_L2_POSITION_SUBSCRIPT_CODES_UPDATE_TIME2, labelL2PositionSubscriptCodesUpdateTime); |
| | | DDX_Control(pDX, IDC_STATIC_TODAY_ZYLT_VOLUME_COUNT, labelTodayZyltVolumeCount); |
| | | DDX_Control(pDX, IDC_EDIT_CODE_FOR_SEARCH, editSearchCode); |
| | | DDX_Control(pDX, IDC_BUTTON_SEARCH, btnSearch); |
| | | DDX_Control(pDX, IDC_STATIC_TODAY_K_BARS_COUNT, labelTodayKBarsCount); |
| | | } |
| | | |
| | | |
| | |
| | | ON_BN_CLICKED(IDC_BUTTON_SYNC_SHSZ_CODES, &MonitorDlg::OnBnClickedButtonSyncShszCodes) |
| | | ON_BN_CLICKED(IDC_BUTTON_SAVE_RUNNING_DATA, &MonitorDlg::OnBnClickedButtonSaveRunningData) |
| | | ON_BN_CLICKED(IDC_BUTTON_REPAIRE_TASK, &MonitorDlg::OnBnClickedButtonRepaireTask) |
| | | ON_BN_CLICKED(IDC_BUTTON_SYNC_ZYLT_VOLUME, &MonitorDlg::OnBnClickedButtonSyncZyltVolume) |
| | | ON_BN_CLICKED(IDC_BUTTON_SEARCH, &MonitorDlg::OnBnClickedButtonSearch) |
| | | ON_BN_CLICKED(IDC_BUTTON_SYNC_K_BARS, &MonitorDlg::OnBnClickedButtonSyncKBars) |
| | | END_MESSAGE_MAP() |
| | | |
| | | |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | void MonitorDlg::OnBnClickedButtonSyncZyltVolume() |
| | | { |
| | | // 同步自由流通量 |
| | | string result = NetworkApi::sync_zylt_volume(); |
| | | auto doc = JsonUtil::parseUTF16(result); |
| | | if (doc.IsObject()) { |
| | | if (doc[L"code"].GetInt() == 0) { |
| | | MessageBox(doc[L"msg"].GetString(), L"提示"); |
| | | } |
| | | else { |
| | | AfxMessageBox(doc[L"msg"].GetString()); |
| | | } |
| | | } |
| | | else { |
| | | AfxMessageBox(L"网络请求出错"); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | void MonitorDlg::OnBnClickedButtonSearch() |
| | | { |
| | | CString code; |
| | | editSearchCode.GetWindowTextW(code); |
| | | searchCode = code; |
| | | int itemCount = listL2Codes.GetItemCount(); // 获取列表项数量 |
| | | |
| | | for (int i = 0; i < itemCount; ++i) { |
| | | CString strItemText = listL2Codes.GetItemText(i, 0); |
| | | if (strItemText.Find(searchCode) >= 0) { |
| | | listL2Codes.SetItemState(i, LVIS_SELECTED | LVIS_FOCUSED, LVIS_SELECTED | LVIS_FOCUSED); |
| | | listL2Codes.SetSelectionMark(i); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | void MonitorDlg::OnBnClickedButtonSyncKBars() |
| | | { |
| | | // 同步自由流通量 |
| | | string result = NetworkApi::sync_history_k_bars(); |
| | | auto doc = JsonUtil::parseUTF16(result); |
| | | if (doc.IsObject()) { |
| | | if (doc[L"code"].GetInt() == 0) { |
| | | MessageBox(doc[L"msg"].GetString(), L"提示"); |
| | | } |
| | | else { |
| | | AfxMessageBox(doc[L"msg"].GetString()); |
| | | } |
| | | } |
| | | else { |
| | | AfxMessageBox(L"网络请求出错"); |
| | | } |
| | | |
| | | } |