示例#1
0
 public ScheduleViewModel(SynchronizationService synchronizationService, Attendee attendee, ImageCache imageCache, SearchModel searchModel)
 {
     _synchronizationService = synchronizationService;
     _attendee = attendee;
     _imageCache = imageCache;
     _searchModel = searchModel;
 }
 public SessionDetailsViewModel(Slot slot, SessionPlace sessionPlace, ImageCache imageCache, SearchModel searchModel, Clock clock)
 {
     _slot = slot;
     _sessionPlace = sessionPlace;
     _imageCache = imageCache;
     _searchModel = searchModel;
     _clock = clock;
 }
示例#3
0
 public MainViewModel(Attendee attendee, SynchronizationService synhronizationService, ImageCache imageCache, SearchModel searchModel, Clock clock)
 {
     _attendee = attendee;
     _synhronizationService = synhronizationService;
     _imageCache = imageCache;
     _searchModel = searchModel;
     _clock = clock;
 }
 public AllSessionsViewModel(
     SynchronizationService synchronizationService,
     SearchModel search,
     Func<Track, TrackViewModel> newTrackViewModel)
 {
     _synchronizationService = synchronizationService;
     _search = search;
     _newTrackViewModel = newTrackViewModel;
 }
示例#5
0
 public TrackViewModel(
     Track track,
     SearchModel search,
     Func<SessionPlace, SessionHeaderViewModel> newSessionHeaderViewModel)
 {
     _track = track;
     _search = search;
     _newSessionHeaderViewModel = newSessionHeaderViewModel;
 }
示例#6
0
 public MainViewModel(
     SynchronizationService synchronizationService,
     SearchModel search,
     SelectionModel selection)
 {
     _synchronizationService = synchronizationService;
     _search = search;
     _selection = selection;
 }
示例#7
0
        public TracksViewModel(Attendee attendee, ImageCache imageCache, SearchModel searchModel)
        {
            _attendee = attendee;
            _imageCache = imageCache;
            _searchModel = searchModel;

            _tracks = new DependentList<Track>(() =>
                from track in _attendee.Conference.Tracks
                orderby track.Name
                select track);
        }
示例#8
0
        public static AllSessionsViewModel CreateViewModel(
            SelectionModel selectionModel,
            SearchModel search,
            SynchronizationService synchronizationService)
        {
            Func<SessionPlace, SessionHeaderViewModel> newSessionHeaderViewModel = s =>
                new SessionHeaderViewModel(s, selectionModel);

            Func<Track, TrackViewModel> newTrackViewModel = t =>
                new TrackViewModel(t, search, newSessionHeaderViewModel);

            return new AllSessionsViewModel(synchronizationService, search, newTrackViewModel);
        }
示例#9
0
        public SearchDayViewModel(Attendee attendee, Day day, ImageCache imageCache, SearchModel searchModel)
        {
            _attendee = attendee;
            _day = day;
            _imageCache = imageCache;
            _searchModel = searchModel;

            _matchingSessionPlaces = new DependentList<SessionPlace>(() =>
                _searchModel.SearchTerm == null || _searchModel.SearchTerm.Length < 3 ?
                    Enumerable.Empty<SessionPlace>() :
                    from time in _day.Times
                    from sessionPlace in time.AvailableSessions
                    where sessionPlace.Session.Matches(_searchModel.SearchTerm.ToLower())
                    select sessionPlace);
        }
示例#10
0
        public ViewModelLocator()
        {
            _synchronizationService = new SynchronizationService();
            if (!DesignerProperties.IsInDesignTool)
                _synchronizationService.Initialize();
            _imageCache = new ImageCache();
            _searchModel = new SearchModel();
            _clock = new Clock();

            _main = new MainViewModel(_synchronizationService.Attendee, _synchronizationService, _imageCache, _searchModel, _clock);
            _schedule = new ScheduleViewModel(_synchronizationService, _synchronizationService.Attendee, _imageCache, _searchModel);
            _tracks = new TracksViewModel(_synchronizationService.Attendee, _imageCache, _searchModel);
            _search = new SearchViewModel(_synchronizationService.Attendee, _imageCache, _searchModel);
            _map = new MapViewModel(_synchronizationService.Attendee, _imageCache, _clock);
            _notices = new NoticesViewModel(_synchronizationService.Attendee, _imageCache, _clock);
            _settings = new SettingsViewModel(_synchronizationService.Individual, _synchronizationService.Attendee);
        }
示例#11
0
 public SearchViewModel(Attendee attendee, ImageCache imageCache, SearchModel searchModel)
 {
     _attendee = attendee;
     _imageCache = imageCache;
     _searchModel = searchModel;
 }