public ShelvesFront(int num, SelecGameSuper select, ControllerBookStand controller) { this.selectSuper = select; InitializeComponent(); bR = new ShelvesRight(num, this, this.selectSuper); bL = new ShelvesLeft(num, this, this.selectSuper); this.cesta.createBasket(num); this.cesta.controller = controller; bR.cesta = this.cesta; bL.cesta = this.cesta; //this.time.startCrono(); }
private void loadWindow(object sender, RoutedEventArgs e) { sensorChooser = new KinectChooser(this.kinectRegion, this.sensorChooserUi); control = new ControllerBookStand(num); ArrayList list = new ArrayList(); list = control.generateListShopping(); int aux = 0; foreach (int i in list) { Image image = new Image(); image.Width = double.NaN; image.Height = double.NaN; image.Stretch = Stretch.Fill; BitmapImage img = new BitmapImage(); img.BeginInit(); img.UriSource = new Uri(@"Imagenes/Estanterias/" + i + ".png", UriKind.Relative); img.EndInit(); Label l = new Label(); l.Width = 200; l.Height = 200; l.Content = image; image.Source = img; if (aux % 3 == 0) { Col1.Children.Add(l); } else if (aux % 3 == 1) { Col2.Children.Add(l); } else if (aux % 3 == 2) { Col3.Children.Add(l); } aux++; } }