Nanook.QueenBee.EditorForm.lstSearchResults_DoubleClick C# (CSharp) Method

lstSearchResults_DoubleClick() private method

private lstSearchResults_DoubleClick ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void
        private void lstSearchResults_DoubleClick(object sender, EventArgs e)
        {
            ListViewItem li;
            if (lstSearchResults.SelectedItems.Count != 0)
            {
                li = lstSearchResults.SelectedItems[0];
                if (_qbFile == null || (_qbFile != null && _qbFile.Filename != li.SubItems[1].Text))
                {
                    clearInterfaceQb();
                    _qbFile = _pakFile.ReadQbFile(li.SubItems[1].Text);
                    loadEditQBFile(_qbFile.Filename);
                }

                tabs.SelectedTab = tabQb;
                Application.DoEvents();

                bool found = false;
                foreach (ListViewItem lvi in lstQbItems.Items)
                {
                    if (lvi.SubItems[3].Text == li.SubItems[2].Text)
                    {
                        lvi.EnsureVisible();
                        lvi.Selected = true;

                        if (gboEdit.Controls.Count != 0)
                        {
                            if (gboEdit.Controls[0] is ScriptEditor)
                                ((ScriptEditor)gboEdit.Controls[0]).SelectedTabIndex = 0; //select strings tab
                        }

                        found = true;
                        break;
                    }
                }
                if (!found)
                    showError("Select Error", "Item position not found, this can happen if you have modified and saved the PAK after this search was performed.");
            }
        }
EditorForm