Пример #1
0
        public welcome()
        {
            InitializeComponent();
            page3 = new selectNeighborhood();

            //Window size setup
            Application.Current.MainWindow.WindowState = WindowState.Maximized;

            //  DispatcherTimer setup
            var timer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1) };
            timer.Start();

            timer.Tick += (sender, args) =>
            {
                timer.Stop();
                this.NavigationService.Navigate(new selectCategory(page3));
            };
        }
Пример #2
0
 public selectCategory(selectNeighborhood loadedPage)
 {
     InitializeComponent();
     if (Generics.GlobalKinectSensorChooser == null)
     {
         // initialize the sensor chooser and UI
         this.sensorChooser = new KinectSensorChooser();
         this.sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
         this.sensorChooserUi.KinectSensorChooser = this.sensorChooser;
         this.sensorChooser.Start();
         Generics.GlobalKinectSensorChooser = this.sensorChooser;
     }
     else
     {   // initialize the sensor chooser and UI
         this.sensorChooser = new KinectSensorChooser();
         this.sensorChooser = Generics.GlobalKinectSensorChooser;
         this.sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
         this.sensorChooserUi.KinectSensorChooser = sensorChooser;
     }
     page3 = loadedPage;
     //page3 = new selectNeighborhood();
     var regionSensorBinding = new Binding("Kinect") { Source = this.sensorChooser };
     BindingOperations.SetBinding(this.kinectRegion, KinectRegion.KinectSensorProperty, regionSensorBinding);
 }