public SeriesOverviewViewModel() { if (App.Current.MainWindow != null) { DetermineFolders(); _diamgramService = new DiagramService(); _seriesParser = new SeriesParser(); var readSeries = UpdateSeries(); MinG = readSeries.Min(s => s.MaxAccleration); MaxG = readSeries.Max(s => s.MaxAccleration); AtmosphereModel = _diamgramService.PrepareAtmosphereDiagram(0.1921); _selectedLd = readSeries[0].LiftToDragCoefficient; _selectedAngle = readSeries[0].EntryAngle; _selectedSpeed = readSeries[0].EntrySpeed; UpdateSelectedSeries(); UpdateAccelerationGraph(); AvailableLDRatios = new ObservableCollection <double>(readSeries.Select(s => s.LiftToDragCoefficient).Distinct().ToList()); AvailableAngles = new ObservableCollection <double>(readSeries.Select(s => s.EntryAngle).Distinct().ToList()); AvailableSpeeds = new ObservableCollection <int>(readSeries.Select(s => s.EntrySpeed).Distinct().ToList()); _outputService = new OutputService(OutputFolder, _diamgramService); _outputService.WriteAcclerationGraphs(TestSeries); _outputService.WriteTrajectoriesGraphs(TestSeries); } }
public OutputService(string outputFolder, DiagramService _diagramService) { _outputFolder = outputFolder; _aggregateFolder = outputFolder + "aggregate\\"; EnsureFolderExists(_aggregateFolder); this._diagramService = _diagramService; }