/// <summary> /// This method listens to the key down on the ListViewItem and if thekey pressed is the "Enter Key" /// , then it displays the Pairwise sequence alignment report. /// </summary> /// <param name="sender">ListView instance.</param> /// <param name="e">Event Data.</param> private void OnListViewKeyUp(object sender, KeyEventArgs e) { if (e.Key == Key.Enter) { DependencyObject dep = (DependencyObject)e.OriginalSource; if (dep != null) { BlastResultCollator item = this.lstSingleLineReport.ItemContainerGenerator.ItemFromContainer(dep) as BlastResultCollator; if (item != null) { BlastPane.RenderPairwiseSequenceAlignment(item); } } } }
/// <summary> /// This method listens to the double click on the List view /// and if the a ListView item has been clicked, then it displays /// the Pairwise sequence alignment report. /// </summary> /// <param name="sender">ListView instance</param> /// <param name="e"> Event data.</param> private void OnListViewDoubleClick(object sender, MouseButtonEventArgs e) { DependencyObject dep = (DependencyObject)e.OriginalSource; while ((dep != null) && !(dep is ListViewItem)) { dep = VisualTreeHelper.GetParent(dep); } if (dep == null) { return; } BlastResultCollator item = this.lstSingleLineReport.ItemContainerGenerator.ItemFromContainer(dep) as BlastResultCollator; if (item != null) { BlastPane.RenderPairwiseSequenceAlignment(item); } }