Update CS:GO team score gamedata.
2 using System.Collections.Generic;
3 using System.ComponentModel;
7 using System.Windows.Forms;
11 public partial class Main : Form
13 private ProfileReport m_Report;
17 InitializeComponent();
20 private void menu_file_open_Click(object sender, EventArgs e)
24 res = dialog_open.ShowDialog(this);
26 if (res != DialogResult.OK)
35 m_Report = new ProfileReport(dialog_open.FileName);
37 catch (System.Exception ex)
39 MessageBox.Show("Error opening or parsing file: " + ex.Message);
45 private void UpdateListView()
50 report_list.Items.Clear();
51 report_info_duration.Text = "";
52 report_info_starttime.Text = "";
54 report_info_duration.Text = m_Report.Duration.ToString() + " seconds";
55 report_info_starttime.Text = m_Report.StartTime.ToString();
57 for (int i = 0; i < m_Report.Count; i++)
59 atom = m_Report.GetItem(i);
60 item = new ListViewItem(ProfileReport.TypeStrings[(int)atom.type]);
62 item.SubItems.Add(atom.name);
63 item.SubItems.Add(atom.num_calls.ToString());
64 item.SubItems.Add(atom.AverageTime.ToString("F6"));
65 item.SubItems.Add(atom.min_time.ToString("F6"));
66 item.SubItems.Add(atom.max_time.ToString("F6"));
67 item.SubItems.Add(atom.total_time.ToString("F6"));
69 report_list.Items.Add(item);
73 private void menu_file_exit_Click(object sender, EventArgs e)
78 private void report_list_ColumnClick(object sender, ColumnClickEventArgs e)
82 report_list.ListViewItemSorter = new LIStringComparator(1);
84 else if (e.Column == 2)
86 report_list.ListViewItemSorter = new LIIntComparator(2);
88 else if (e.Column > 2)
90 report_list.ListViewItemSorter = new LIDoubleComparator(e.Column);