public ConferenceDetailsViewModel(
     Individual individual,
     ConferenceHeader conferenceHeader,
     ConferenceSelection conferenceSelection)
     : base(conferenceHeader)
 {
     _individual = individual;
     _conferenceSelection = conferenceSelection;
 }
Esempio n. 2
0
        public ViewModelLocator()
        {
            _synchronizationService = new SynchronizationService();
            if (!DesignerProperties.IsInDesignTool)
                _synchronizationService.Initialize();

            _conferenceSelection = new ConferenceSelection();
            _imageCache = new ImageCache();
            _searchModel = new SearchModel();
        }
        public static ConferenceListViewModel Create(string environment, ICommunity community, ConferenceSelection conferenceSelection)
        {
            var catalog = community.AddFact(new Catalog(environment));

            if (LoadSampleData && !catalog.ConferenceHeaders.Ensure().Any())
            {
                DefineConference(
                    community,
                    catalog,
                    "Cowtown Code Camp 2013",
                    "http://cdn.marketplaceimages.windowsphone.com/v8/images/2a24b5e4-d79a-448e-8818-4040ff0d51a6?imageType=ws_icon_large",
                    new DateTime(2013, 3, 17),
                    new DateTime(2013, 3, 17),
                    "Fort Worth, TX");
                DefineConference(
                    community,
                    catalog,
                    "AwesomeFest 2014",
                    "http://files.g4tv.com/ImageDb3/284724_S/darth-vader-rock-guitarist.jpg",
                    new DateTime(2014, 2, 27),
                    new DateTime(2014, 2, 28),
                    "Allen, TX");
                var conference = DefineConference(
                    community,
                    catalog,
                    "That Conference 2013",
                    "http://www.thatconference.com/Images/mainLogo.png",
                    new DateTime(2013, 8, 16),
                    new DateTime(2013, 8, 19),
                    "Wisconsin Dells, WI");
                DefineConferenceSessions(community, conference);
            }

            Func<ConferenceHeader, ConferenceHeaderViewModel> makeConferenceHeaderViewModel =
                conferenceHeader =>
                    new ConferenceHeaderViewModel(conferenceHeader);

            return new ConferenceListViewModel(catalog, conferenceSelection, makeConferenceHeaderViewModel);
        }
 public ConferenceListViewModel(Catalog catalog, ConferenceSelection selection, Func<ConferenceHeader, ConferenceHeaderViewModel> makeConferenceHeaderViewModel)
 {
     _catalog = catalog;
     _selection = selection;
     _makeConferenceHeaderViewModel = makeConferenceHeaderViewModel;
 }