private void buildPerformanceTable() { PerformanceTable.DataSource = performanceList; PerformanceTable.DataBind(); PerformanceTable.Columns[1].ItemStyle.ForeColor = Color.Ivory; for (int i = 0, j = PerformanceTable.PageSize * PerformanceTable.PageIndex; i < PerformanceTable.PageSize && j < performanceList.Count; j++, i++) { PerformanceTable.Rows[i].Cells[1].BackColor = colors[Convert.ToInt16(Math.Floor(performanceList[j].percentage)) / 10]; } }
private void createPerformanceTable(RulesetInfo ruleset, string country, int page = 1) { onLoadStarted(); request = new GetUserRankingsRequest(ruleset, country: country, page: page); ((GetUserRankingsRequest)request).Success += rankings => Schedule(() => { var table = new PerformanceTable(page, rankings.Users); loadTable(table); }); api.Queue(request); }
private void selectItem_button_Click(object sender, RoutedEventArgs e) { if (SearchResults_dataGrid.SelectedItem != null) { //just take the first item foreach (PerformanceTable item in SearchResults_dataGrid.SelectedItems) { perfItem = item; break; } report_textBox.Text = perf.GeneratePerformanceAnalysisText(perfItem); generate_graph_button.IsEnabled = true; } }