private void UrlList_DoubleClick(object sender, EventArgs e) { if (UrlList.SelectedItem == null) { return; } if (UrlList.IndexFromPoint(UrlList.PointToClient(Control.MousePosition)) == ListBox.NoMatches) { return; } if (UrlList.Items[UrlList.IndexFromPoint(UrlList.PointToClient(Control.MousePosition))] == null) { return; } OK_Button_Click(sender, e); }
private void UrlList_DoubleClick(object sender, EventArgs e) { if (UrlList.SelectedItem == null) { return; } if (UrlList.IndexFromPoint(UrlList.PointToClient(MousePosition)) == ListBox.NoMatches) { return; } if (UrlList.Items[UrlList.IndexFromPoint(UrlList.PointToClient(MousePosition))] == null) { return; } SelectUrlOrCancelDialog(); }