| 118 | }; |
| 119 | |
| 120 | void CStatisticsDlg::ApplyStatsColor(int index) |
| 121 | { |
| 122 | static char aTrend[] = { 0,0, 2, 1, 0, 2, 1, 0, 1, 2, 0 }; |
| 123 | static int aRes[] = { 0,0, IDC_C0,IDC_C0_3,IDC_C0_2, IDC_C1,IDC_C1_3,IDC_C1_2, IDC_S0,IDC_S3,IDC_S1 }; |
| 124 | static COScopeCtrl** apscope[] = { NULL, NULL, &pscopeDL,&pscopeDL,&pscopeDL, &pscopeUL,&pscopeUL,&pscopeUL, &pscopeConn,&pscopeConn,&pscopeConn }; |
| 125 | |
| 126 | const wxColour& cr = acrStat[index]; |
| 127 | |
| 128 | int iRes = aRes[index]; |
| 129 | int iTrend = aTrend[index]; |
| 130 | COScopeCtrl** ppscope = apscope[index]; |
| 131 | CColorFrameCtrl* ctrl; |
| 132 | switch (index) { |
| 133 | case 0: |
| 134 | pscopeDL->SetBackgroundColor(cr); |
| 135 | pscopeUL->SetBackgroundColor(cr); |
| 136 | pscopeConn->SetBackgroundColor(cr); |
| 137 | break; |
| 138 | case 1: |
| 139 | pscopeDL->SetGridColor(cr); |
| 140 | pscopeUL->SetGridColor(cr); |
| 141 | pscopeConn->SetGridColor(cr); |
| 142 | break; |
| 143 | case 2: case 3: case 4: |
| 144 | case 5: case 6: case 7: |
| 145 | case 8: case 9: case 10: |
| 146 | (*ppscope)->SetPlotColor(cr, iTrend); |
| 147 | if ((ctrl = CastChild(iRes, CColorFrameCtrl)) == NULL) { |
| 148 | throw wxString(CFormat("CStatisticsDlg::ApplyStatsColor: control missing (%d)\n") % iRes); |
| 149 | } |
| 150 | ctrl->SetBackgroundBrushColour(cr); |
| 151 | ctrl->SetFrameBrushColour(*wxBLACK); |
| 152 | break; |
| 153 | default: |
| 154 | break; // ignore unknown index, like SysTray speedbar color |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | void CStatisticsDlg::UpdateStatGraphs(const uint32 peakconnections, const GraphUpdateInfo& update) |
| 159 | { |
no test coverage detected