Beispiel #1
0
 public MainWindow()
 {
     #if (DEBUG)
     Console.WriteLine("Starting Crash Fatality Inspector");
     #endif
     InitializeComponent();
     //
     //this.WindowState = System.Windows.WindowState.Maximized;
     this.Closing += MainWindow_Closing;
     //
     string exePath = System.Reflection.Assembly.GetExecutingAssembly().Location;
     string appPath = System.IO.Path.GetDirectoryName(exePath);
     #if (DEBUG)
     Console.WriteLine("Executable Path: " + exePath);
     Console.WriteLine("Application Path: " + appPath);
     #endif
     //
     Utilities.Data.LoadData(appPath);
     //
     #if (DEBUG)
     Console.WriteLine("Starting the Kinect sensor...");
     #endif
     this.sensorChooser = new KinectSensorChooser();
     this.sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
     this.sensorChooser.Start();
     #if (DEBUG)
     Console.WriteLine("...Kinect started!");
     #endif
     //
     Views.TitleScreen titleScreen = new Views.TitleScreen(this, this.sensorChooser);
     titleScreen.Show();
 }
Beispiel #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();
     }
 }
Beispiel #3
0
 void kcb_Click(object sender, RoutedEventArgs e)
 {
     TitleScreen ts = new TitleScreen(this.mainWindow, this.sensorChooser);
     ts.Show();
 }