/// <summary>
        /// Initializes a new instance of the MainWindow class.
        /// </summary>
        public MainWindow(Participant_Condition pc, PartWindow p)
        {
            this.part_window         = p;
            this.pc                  = pc;
            this.KinectSensorManager = new KinectSensorManager();
            this.KinectSensorManager.KinectSensorChanged += this.KinectSensorChanged;
            //this.DataContext = this.KinectSensorManager;

            this.viewModel = new KinectWindowViewModel();

            // The KinectSensorManager class is a wrapper for a KinectSensor that adds
            // state logic and property change/binding/etc support, and is the data model
            // for KinectDiagnosticViewer.
            this.viewModel.KinectSensorManager = this.KinectSensorManager;

            Binding sensorBinding = new Binding("KinectSensor");

            sensorBinding.Source = this;
            BindingOperations.SetBinding(this.viewModel.KinectSensorManager, KinectSensorManager.KinectSensorProperty, sensorBinding);

            this.DataContext = this.viewModel;

            InitializeComponent();

            foreach (Tag t in db.Tags)
            {
                this.lstTags.Items.Add(t);
            }

            this.SensorChooserUI.KinectSensorChooser = sensorChooser;
        }
예제 #2
0
        private void click_btnOpenExperiment(object sender, RoutedEventArgs e)
        {
            PartWindow participant = new PartWindow((Experiment)lbExperimentList.SelectedItem);

            participant.Show();
            Close();
        }