public SleepScreen(KinectPageFactory pageFactory) { InitializeComponent(); this.pageFactory = pageFactory; /* KinectTileButton button = new KinectTileButton(); button.Label = "Wciśnij mnie!"; button.Click += OpenMainMenu; SleepScreenGrid.Children.Add(button);*/ this.modelContentUri = "Content/SleepScreen/Instagram"; //this.instagramApi = new InstagramAPIManager(); //instagramApi.saveRecentImages(); this.LoadModels(modelContentUri); this.random = new Random(); this.tickTimer = new DispatcherTimer(); this.tickTimer.Interval = TimeSpan.FromMilliseconds(TimerIntervalMilliseconds); this.tickTimer.Tick += (s, e) => { this.currentIndex = this.currentIndex < this.Images.Count - 1 ? ++this.currentIndex : 0; int idImage; if (differentImages()) { idImage = random.Next(1, 7); } else { idImage = indexOfRepeatedImage(); this.currentIndex = this.currentIndex < this.Images.Count - 1 ? ++this.currentIndex : 0; } switch (idImage) { case 1: this.CurrentImage1 = this.Images[this.currentIndex]; break; case 2: this.CurrentImage2 = this.Images[this.currentIndex]; break; case 3: this.CurrentImage3 = this.Images[this.currentIndex]; break; case 4: this.CurrentImage4 = this.Images[this.currentIndex]; break; case 5: this.CurrentImage5 = this.Images[this.currentIndex]; break; case 6: this.CurrentImage6 = this.Images[this.currentIndex]; break; } }; }
public AttractionArticle(KinectPageFactory pageFactory, String parameter) { InitializeComponent(); model = new AttractionModel(); this.title = model.getTitleFor(parameter); this.description = setDescription(parameter); this.photos = setPhotos(parameter); this.pageFactory = pageFactory; titleTextBlock.Text = this.title; bigImageSource.Source = new BitmapImage(new Uri(this.photos[0], UriKind.Relative)); firstImageSource.Source = new BitmapImage(new Uri(this.photos[0], UriKind.Relative)); secondImageSource.Source = new BitmapImage(new Uri(this.photos[1], UriKind.Relative)); thirdImageSource.Source = new BitmapImage(new Uri(this.photos[2], UriKind.Relative)); descriptionTextBlock.Text = this.description; }
public MainMenu(KinectPageFactory pageFactory) { InitializeComponent(); this.pageFactory = pageFactory; }