void Top20Btn_Click(object sender, EventArgs e) { if (CurrentUser == null) { Check_User_Click(null, null); return; } if (CheckedListBoxTest.CheckedItems.Count != 1) { MessageBox.Show("Нужно выбрать 1 тему"); return; } Authorization auth = new Authorization(PathToFileAuth); string thema = CheckedListBoxTest.CheckedItems[0].ToString().Trim(); List <User> usersTop = auth.GetTop20(thema); if (usersTop.Count < 1) { MessageBox.Show("Список пуст"); return; } ShowRezults rezults = new ShowRezults(usersTop, thema); rezults.Show(); }
void ShowRezultBtn_Click(object sender, EventArgs e) { if (CurrentUser != null) { ShowRezults rezults = new ShowRezults(CurrentUser); rezults.Show(); } else { Check_User_Click(null, null); } }