private bool SetMaximumRunSelection() { var oldRunSelection = RunSelection.ToList(); if (UsingActiveSelection) { activeSelection.ListChanged -= RunSelectionChanged; } //add the maximum amount of runs RunSelection.Clear(); while (RunSelection.Count < RunExplorer.MaxConsolidation && RunSelection.Count < controller.Runs.Count) { var nonSelectedRuns = controller.Runs .ToList() .FindAll(run => !RunSelection.Contains(run)) .OrderByDescending(r => r.State); RunSelection.Add(nonSelectedRuns.First()); } if (UsingActiveSelection) { activeSelection.ListChanged += RunSelectionChanged; } var theSame = true; foreach (var run in RunSelection) { if (!oldRunSelection.Contains(run)) { theSame = false; } } foreach (var run in oldRunSelection) { if (!RunSelection.Contains(run)) { theSame = false; } } //return whether the selection was changed return(!theSame); }
private void ExploreSelection() { if (RunExplorer == null) { return; } if (RunExplorer.ConsolidationSupported(RunSelection.ToArray())) { visualizationContainer.Fill(RunExplorer); RunExplorer.LoadRuns(RunSelection.ToArray()); } else { visualizationContainer.Fill(runSelectionUnavailableLabel); } }