Esempio n. 1
0
        public IEnumerable <(IGraphViewModel graphViewModel, int priority)> GetLeftSideViewModels()
        {
            List <IGraphViewModel> allCharts      = _viewModelFactory.CreateAll <IGraphViewModel>().ToList();
            List <IGraphViewModel> chartsToReturn = allCharts.Where(_graphsSettingsProvider.IsGraphViewModelLeft).ToList();

            allCharts.Except(chartsToReturn).ForEach(x => x.Dispose());

            return(chartsToReturn.Select(x => (x, _graphsSettingsProvider.GetGraphPriority(x))));
        }
Esempio n. 2
0
 public SessionDefinitionViewModel(IViewModelFactory viewModelFactory)
 {
     _viewModelFactory = viewModelFactory;
     AvailableSessionLengthDefinitionViewModels = _viewModelFactory.CreateAll <ISessionLengthDefinitionViewModel>().ToList();
     SelectedSessionLengthDefinitionViewModel   = AvailableSessionLengthDefinitionViewModels.First();
     _points          = new int[15];
     ScoringTemplates = Common.Championship.Scoring.Templates.ScoringTemplates.AllTemplates.OrderBy(x => x.Name).ToArray();
 }