private void btnView_Click(object sender, EventArgs e) { ArticleView view = new ArticleView(this, new int[] { tabControl1.SelectedIndex, comboBoxes[tabControl1.SelectedIndex].SelectedIndex }, (tabControl1.SelectedIndex == 1 ? listViewerArticles : listSearchArticles)[comboBoxes[tabControl1.SelectedIndex].SelectedIndex], (tabControl1.SelectedIndex == 1 ? listViewerAnnotations : listSearchAnnotations)[comboBoxes[tabControl1.SelectedIndex].SelectedIndex]); view.ShowDialog(); }