Example #1
0
        public Window1()
        {
            

            colorWindow = new MainWindow();
            nui = Runtime.Kinects[0];
            nui.Initialize(RuntimeOptions.UseColor);
            nui.NuiCamera.ElevationAngle = 0;

            


            // initialize grid
            gridSettings = new GridSettings(colorWindow.Width, colorWindow.Height);
            toleranceSettings = new ToleranceSettings();
            calibrationSettings = new CalibrationSettings();

            smoothSkeleton = new SmoothSkeleton();
       
            this.updateGrid();

            // this will set default crosshair heights
            colorWindow.changeRotationMode(gridSettings.rotation);

            InitializeComponent();

            Screen[] screens = Screen.AllScreens;
            findMonitorSizes(screens);
            
            // set windows' start positions
            colorWindow.WindowStartupLocation = WindowStartupLocation.Manual;
                // put the color window inside the secondary screen's bounds
            colorWindow.Top = screens[1].Bounds.Top;
            colorWindow.Left = screens[1].Bounds.Left;
            
            
            colorWindow.Show();



            toleranceOption1.IsChecked = true;
            gridSettings.setRotationMode(1);
            toggleRotationMode();

            
            
        }