private void button4_Click(object sender, EventArgs e) { DateTime time; if (resList != null && resList.Count != 0) { if (DateTime.TryParse(textBox2.Text, out time)) { CompareTime comp = new CompareTime(); resList.Sort(comp); for (int i = resList.Count - 1; i > -1; i--) { if (resList[i].StartTime <= time) { resList.RemoveAt(i); } } textBox1.Clear(); textBox1.AppendText("Name Game time Start time Shifts"); } else { MessageBox.Show("Incorrect time!"); } } else { MessageBox.Show("There are no results yet!"); } }
private void button3_Click(object sender, EventArgs e) { if (resList != null && resList.Count != 0) { CompareTime comp = new CompareTime(); resList.Sort(comp); Print(); } else { MessageBox.Show("Results aren't found!"); } }