private void buttonLoadTest_Click(object sender, EventArgs e) { try { var test = testinfolist[TestsListBox.SelectedIndex]; var formtestview = new FormTestView(test); formtestview.ShowDialog(this); } catch (Exception) { return; } }