예제 #1
0
        //Load window
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            kinectSensorChooser1.KinectSensorChanged += new DependencyPropertyChangedEventHandler(kinectSensorChooser1_KinectSensorChanged);
            this.Cursor = Cursors.None;
            moves = new LinkedList<Skeleton>();
            Global.canGestureTimer.Elapsed += new System.Timers.ElapsedEventHandler(Global.canGestureTimer_Elapsed);
            Global.windowWidth = mainCanvas.ActualWidth;
            Global.windowHeight = mainCanvas.ActualHeight;

            if (DanceRoutine.saveAlreadyExists("fakeSong.wav"))
            {
                routine = DanceRoutine.load("fakeSong.wav");
            } else  {
                routine = new DanceRoutine("fakeSong.wav");
            }
            routine.deleteDanceSegmentAt(0);
            showRecordingCanvas();

            newSegment = routine.addDanceSegment(0);
            waveform = new Waveform(1800, 259, wfcanvas);
        }
예제 #2
0
        //Load window
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            homeCanvas.Visibility = Visibility.Collapsed;
            mainCanvas.Visibility = Visibility.Visible;
            blackBack.Visibility = Visibility.Collapsed;

            hideMode();
            Canvas.SetTop(playbackMode, 0);
            Canvas.SetTop(recordMode, 0);

            kinectSensorChooser1.KinectSensorChanged += new DependencyPropertyChangedEventHandler(kinectSensorChooser1_KinectSensorChanged);
            this.Cursor = Cursors.None;
            moves = new LinkedList<Skeleton>();
            Global.canGestureTimer.Elapsed += new System.Timers.ElapsedEventHandler(Global.canGestureTimer_Elapsed);
            Global.initializeTimer.Elapsed += new System.Timers.ElapsedEventHandler(Global.initializeTimer_Elapsed);
            Global.windowWidth = containerCanvas.ActualWidth;
            Global.windowHeight = containerCanvas.ActualHeight;

            if (DanceRoutine.saveAlreadyExists(songFilename))
            {
                routine = DanceRoutine.load(DanceRoutine.getSaveDestinationName(songFilename));
            }
            else
            {
                routine = new DanceRoutine(songFilename);
            }
            routine.deleteDanceSegmentAt(0);
            showRecordingCanvas();
            addButtonsToList();

            Canvas wfcanvas = new Canvas();
            wfcanvas.Width = 3600;
            wfcanvas.Height = 160;
            Canvas.SetTop(wfcanvas, 0);
            Canvas.SetLeft(wfcanvas, 0);
            waveButton.hoverCanvas.Children.Add(wfcanvas);
            waveButton.enableExpandAnimation = false;
            waveform = new Waveform(3600, 259, wfcanvas);
            renderSegments();
        }