示例#1
0
 void StateButtonClick(object sender, RoutedEventArgs e)
 {
     Utilities.State s = (Utilities.State)((KinectTileButton)sender).Content;
     #if (DEBUG)
     Console.WriteLine(s.Name + " selected!");
     #endif
     VehicleScreen vs = new VehicleScreen(this.mainWindow, this.sensorChooser, s);
     // Clear the binding
     BindingOperations.ClearBinding(this.kRegion, KinectRegion.KinectSensorProperty);
     // Show the desired screen
     vs.Show();
 }
示例#2
0
 void NavButtonClick(object sender, RoutedEventArgs e)
 {
     if (((KinectTileButton)sender).Name == Constants.ViewNames.TitleScreen.ToString())
     {
         TitleScreen ts = new TitleScreen(this.mainWindow, this.sensorChooser);
         // Clear the binding
         BindingOperations.ClearBinding(this.kRegion, KinectRegion.KinectSensorProperty);
         // Show the desired screen
         ts.Show();
     }
     if (((KinectTileButton)sender).Name == Constants.ViewNames.TimeZoneScreen.ToString())
     {
         ButtonZonesScreen bzs = new ButtonZonesScreen(this.mainWindow, this.sensorChooser);
         // Clear the binding
         BindingOperations.ClearBinding(this.kRegion, KinectRegion.KinectSensorProperty);
         // Show the desired screen
         bzs.Show();
     }
     if (((KinectTileButton)sender).Name == Constants.ViewNames.StatesScreen.ToString())
     {
         StatesScreen ss = new StatesScreen(this.mainWindow, this.sensorChooser, this.state.TimeZone);
         // Clear the binding
         BindingOperations.ClearBinding(this.kRegion, KinectRegion.KinectSensorProperty);
         // Show the desired screen
         ss.Show();
     }
     if (((KinectTileButton)sender).Name == Constants.ViewNames.VehicleScreen.ToString())
     {
         VehicleScreen vs = new VehicleScreen(this.mainWindow, this.sensorChooser, this.state);
         // Clear the binding
         BindingOperations.ClearBinding(this.kRegion, KinectRegion.KinectSensorProperty);
         // Show the desired screen
         vs.Show();
     }
 }