private void OnRefresh() { var facade = FacadeFactory.Create(); resultOverview = facade.Get <ResultOverview>(Bootstrap.Results); if (resultOverview != null) { Source = resultOverview.Source; // Create a list and and an ID integer to play with later. var list = new List <PAOResultOverview>(); int id = 0; // Use a temporary list instead of the enumeration of the instance, because we need to add tests items maybe. resultDict = new Dictionary <int, PAOResult>(); var results = new List <PAOResult>(); results.AddRange(resultOverview.PAOResults); // // Create some fake results for debugging if enabled // AddDebugValues(results); foreach (var paoResult in results) { var paoResultOverview = new PAOResultOverview(id); paoResultOverview.Comment = paoResult.Comment; paoResultOverview.Deck = paoResult.DeckTitle; list.Add(paoResultOverview); resultDict.Add(id, paoResult); id++; } // Refresh the UI Results = new ObservableCollection <PAOResultOverview>(list); RaisePropertyChange("Results"); oldComment = null; oldCurrentDeck = null; ApplyChanges.Refresh(); } }
protected virtual void OnApplyChanges() { ApplyChanges?.Invoke(this, EventArgs.Empty); }