//Open selected protocol from MetaData search listbox
        private void OpenChosenProtocol(object sender, SelectionChangedEventArgs e)
        {
            if (lstResults.SelectedIndex == -1)
            {
                return;
            }
            ProtocolDisplayWindow chosenP = new ProtocolDisplayWindow(lstResults.SelectedItem as Protocol);

            chosenP.ShowDialog();
            lstResults.SelectedIndex = -1;
        }
        //Open selected protocol from backwards or Phrase search listbox
        private void OpenChosenPhraseProtocol(object sender, SelectionChangedEventArgs e)
        {
            if (sender == null || !(sender is ListBox))
            {
                return;
            }
            ListBox lst = sender as ListBox;

            if (lst.SelectedIndex == -1)
            {
                return;
            }
            ParagraphMatch        selectedResultItem = (ParagraphMatch)lst.SelectedItem;
            ProtocolDisplayWindow chosenP            = new ProtocolDisplayWindow(selectedResultItem.InParagraph.protocol, selectedResultItem.InParagraph);

            chosenP.ShowDialog();
            lst.SelectedIndex = -1;
        }