private GraphSettingsDto GetGraphSettings(IGraphViewModel graphViewModel) { GraphSettingsDto graphSettings = TelemetrySettings.GraphSettings.FirstOrDefault(x => x.Title == graphViewModel.Title); if (graphSettings == null) { graphSettings = new GraphSettingsDto() { Title = graphViewModel.Title, GraphLocation = _backupProvider.IsGraphViewModelLeft(graphViewModel) ? GraphLocationKind.LeftPanel : GraphLocationKind.RightPanel, GraphPriority = _backupProvider.GetGraphPriority(graphViewModel) }; TelemetrySettings.GraphSettings.Add(graphSettings); _settingsProvider.SetTelemetrySettings(TelemetrySettings, RequestedAction.RefreshCharts); } return(graphSettings); }
private GraphSettingsDto GetGraphSettings(IGraphViewModel graphViewModel) { GraphSettingsDto graphSettings = TelemetrySettings.GraphSettings.FirstOrDefault(x => x.Title == graphViewModel.Title); if (graphSettings == null) { graphSettings = new GraphSettingsDto() { Title = graphViewModel.Title, GraphLocation = _backupProvider.IsGraphViewModelLeft(graphViewModel) ? GraphLocationKind.LeftPanel : GraphLocationKind.RightPanel, GraphPriority = _backupProvider.GetGraphPriority(graphViewModel) }; TelemetrySettings.GraphSettings.Add(graphSettings); _telemetrySettingsRepository.SaveTelemetrySettings(TelemetrySettings); } return(graphSettings); }