private async void OnFindRoutes() { IsAvailable = false; ShowProgressBar = Visibility.Visible; StatusBarText = "Processing market data ..."; var s = Stopwatch.StartNew(); var list = await Task.Run(() => Prophet.FindTradeRoutes()); s.Stop(); var ts = s.Elapsed; var elapsedTime = $"{ts.Hours:00}:{ts.Minutes:00}:{ts.Seconds:00}.{ts.Milliseconds/10:00}"; Debug.WriteLine("Processed market data in " + elapsedTime); StatusBarText = "Processed market data in " + elapsedTime; //Trips = new ObservableCollection<Trip>(EveMarketData.Instance.Trips); if (list != null) { Trips = new ObservableCollection <Trip>(list); TripView = (CollectionView)CollectionViewSource.GetDefaultView(Trips); //TripView.Filter = new Predicate<object>(x => Trips.IndexOf((Trip)x) < Settings.Default.FilterShowAmount); TripView.Refresh(); } ShowProgressBar = Visibility.Hidden; IsAvailable = true; }
private void OnFilterResults(object sender) { var tx = sender as Transaction; FilterSystemStartId = tx.StartSystemId; FilterSystemEndId = tx.EndSystemId; TripView.Filter = FilterSystemPair; TripView.Refresh(); }
private void OnClearFilters() { TripView.Filter = null; TripView.Refresh(); }