void GoBackButtonClick(object sender, RoutedEventArgs e) { #if (DEBUG) Console.WriteLine("User went back to states screen!"); #endif 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(); }
void ZoneButtonClick(object sender, RoutedEventArgs e) { if (((KinectTileButton)sender).Name == Constants.TimeZones.Pacific.ToString()) { #if (DEBUG) Console.WriteLine("User clicked " + Constants.TimeZones.Pacific.ToString()); #endif StatesScreen ss = new StatesScreen(this.mainWindow, this.sensorChooser, Constants.TimeZones.Pacific); // Clear the binding BindingOperations.ClearBinding(this.kRegion, KinectRegion.KinectSensorProperty); // Show the desired screen ss.Show(); } if (((KinectTileButton)sender).Name == Constants.TimeZones.Mountain.ToString()) { #if (DEBUG) Console.WriteLine("User clicked " + Constants.TimeZones.Mountain.ToString()); #endif StatesScreen ss = new StatesScreen(this.mainWindow, this.sensorChooser, Constants.TimeZones.Mountain); // Clear the binding BindingOperations.ClearBinding(this.kRegion, KinectRegion.KinectSensorProperty); // Show the desired screen ss.Show(); } if (((KinectTileButton)sender).Name == Constants.TimeZones.Central.ToString()) { #if (DEBUG) Console.WriteLine("User clicked " + Constants.TimeZones.Central.ToString()); #endif StatesScreen ss = new StatesScreen(this.mainWindow, this.sensorChooser, Constants.TimeZones.Central); // Clear the binding BindingOperations.ClearBinding(this.kRegion, KinectRegion.KinectSensorProperty); // Show the desired screen ss.Show(); } if (((KinectTileButton)sender).Name == Constants.TimeZones.Eastern.ToString()) { #if (DEBUG) Console.WriteLine("User clicked " + Constants.TimeZones.Eastern.ToString()); #endif StatesScreen ss = new StatesScreen(this.mainWindow, this.sensorChooser, Constants.TimeZones.Eastern); // Clear the binding BindingOperations.ClearBinding(this.kRegion, KinectRegion.KinectSensorProperty); // Show the desired screen ss.Show(); } }
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(); } }