public static Tuple<int, int> GetJumpPosition(Tuple<int,int[]>[] threads) { var window=new JumpToWindow(threads); window.Owner=App.Current.MainWindow; if(window.ShowDialog().Value) return Tuple.Create(window.viewModel.SelectedThread.Item1,window.viewModel.SelectedResNumber); else return null; }
public static Tuple <int, int> GetJumpPosition(Tuple <int, int[]>[] threads) { var window = new JumpToWindow(threads); window.Owner = App.Current.MainWindow; if (window.ShowDialog().Value) { return(Tuple.Create(window.viewModel.SelectedThread.Item1, window.viewModel.SelectedResNumber)); } else { return(null); } }
private void JumpTo() { var jumpPosition = JumpToWindow.GetJumpPosition(threadIndices); if (jumpPosition == null) { return; } for (int i = 0; i < responses.Length; ++i) { if (responses[i].PartNumber == jumpPosition.Item1 && responses[i].ResNumber == jumpPosition.Item2) { CurrentPosition = i; CurrentResponse = responses[CurrentPosition]; System.Windows.Input.CommandManager.InvalidateRequerySuggested(); } } }