Beispiel #1
0
        public MainViewModel(PageNavigationModel pageNavigation)
        {
            _presentationNavigation = new PresentationNavigationModel();

            _title = new PageTitle(_presentationNavigation);
            _slidesAndCode = new PageSlidesAndCode(_presentationNavigation);
            _aboutMe = new PageAboutMe(_presentationNavigation);
            _ericBrewer = new PageEricBrewer(_presentationNavigation);
            _udiDahan = new PageUdiDahan(_presentationNavigation);
            _gregYoung = new PageGregYoung(_presentationNavigation);
            _definitions = new PageDefinitions(_presentationNavigation);
            _proof = new PageProof(_presentationNavigation);
            _choices = new PageChoices(_presentationNavigation);
            _centralDatabase = new Pages.PageCentralDatabase(_presentationNavigation);
            _cqrs = new Pages.PageCQRS(_presentationNavigation);
            _eventSourcing = new Pages.PageEventSourcing(_presentationNavigation);
            _conclusion = new PageConclusion(_presentationNavigation);

            _pages = new IPage[]
            {
                _title,
                _slidesAndCode,
                _aboutMe,
                _ericBrewer,
                _udiDahan,
                _gregYoung,
                _definitions,
                _proof,
                _choices,
                _centralDatabase,
                _cqrs,
                _eventSourcing,
                _conclusion
            };

            _inertialScale = new InertialProperty(() => (float)PageNavigation.Scale);
            _positionX = new InertialProperty(() => (float)PageNavigation.Position.X);
            _positionY = new InertialProperty(() => (float)PageNavigation.Position.Y);

            _timer = new DispatcherTimer();
            _timer.Interval = TimeSpan.FromSeconds(0.05);
            _timer.Tick += delegate(object sender, EventArgs e)
            {
                _inertialScale.OnTimer();
                _positionX.OnTimer();
                _positionY.OnTimer();
            };
            _timer.Start();
        }
Beispiel #2
0
        public MainViewModel(PageNavigationModel pageNavigation)
        {
            _presentationNavigation = new PresentationNavigationModel();

            _title = new PageTitle(_presentationNavigation);
            _slidesAndCode = new PageSlidesAndCode(_presentationNavigation);
            _aboutMe = new PageAboutMe(_presentationNavigation);
            _ericBrewer = new PageEricBrewer(_presentationNavigation);
            _udiDahan = new PageUdiDahan(_presentationNavigation);
            _gregYoung = new PageGregYoung(_presentationNavigation);
            _definitions = new PageDefinitions(_presentationNavigation);
            _proof = new PageProof(_presentationNavigation);
            _choices = new PageChoices(_presentationNavigation);
            _centralDatabase = new Pages.PageCentralDatabase(_presentationNavigation);
            _cqrs = new Pages.PageCQRS(_presentationNavigation);
            _eventSourcing = new Pages.PageEventSourcing(_presentationNavigation);
            _conclusion = new PageConclusion(_presentationNavigation);

            _pages = new IPage[]
            {
                _title,
                _slidesAndCode,
                _aboutMe,
                _ericBrewer,
                _udiDahan,
                _gregYoung,
                _definitions,
                _proof,
                _choices,
                _centralDatabase,
                _cqrs,
                _eventSourcing,
                _conclusion
            };

            _inertialScale = new InertialProperty(() => (float)PageNavigation.Scale);
            _positionX = new InertialProperty(() => (float)PageNavigation.Position.X);
            _positionY = new InertialProperty(() => (float)PageNavigation.Position.Y);

            _timer = new DispatcherTimer();
            _timer.Interval = TimeSpan.FromSeconds(0.05);
            _timer.Tick += delegate(object sender, EventArgs e)
            {
                _inertialScale.OnTimer();
                _positionX.OnTimer();
                _positionY.OnTimer();
            };
            _timer.Start();
        }