当前位置: 首页>>代码示例>>C#>>正文


C# Toolkit.KinectSensorChooser类代码示例

本文整理汇总了C#中Microsoft.Kinect.Toolkit.KinectSensorChooser的典型用法代码示例。如果您正苦于以下问题:C# KinectSensorChooser类的具体用法?C# KinectSensorChooser怎么用?C# KinectSensorChooser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


KinectSensorChooser类属于Microsoft.Kinect.Toolkit命名空间,在下文中一共展示了KinectSensorChooser类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MainWindow

        /// <summary>
        /// Initializes a new instance of the <see cref="MainWindow"/> class. 
        /// </summary>
        public MainWindow()
        {
            this.InitializeComponent();

            // initialize the sensor chooser and UI
            this.sensorChooser = new KinectSensorChooser();
            this.sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
            this.sensorChooserUi.KinectSensorChooser = this.sensorChooser;
            this.sensorChooser.Start();

            // Bind the sensor chooser's current sensor to the KinectRegion
            var regionSensorBinding = new Binding("Kinect") { Source = this.sensorChooser };
            BindingOperations.SetBinding(this.kinectRegion, KinectRegion.KinectSensorProperty, regionSensorBinding);

            // Clear out placeholder content
            this.wrapPanel.Children.Clear();

            // Add in display content
            for (var index = 0; index < 300; ++index)
            {
                var button = new KinectTileButton { Label = (index + 1).ToString(CultureInfo.CurrentCulture) };
                this.wrapPanel.Children.Add(button);
            }

            // Bind listener to scroll viewer scroll position change, and check scroll viewer position
            this.UpdatePagingButtonState();
            scrollViewer.ScrollChanged += (o, e) => this.UpdatePagingButtonState();
        }
开发者ID:flyfj,项目名称:KinectStudio,代码行数:31,代码来源:MainWindow.xaml.cs

示例2: ApplesGameConfigPage

 public ApplesGameConfigPage(string itemId, KinectSensorChooser kinectSensor)
 {
     InitializeComponent();
     _kinectSensor = kinectSensor;
     Config = new ApplesGameConfig();
     DataContext = Config;
 }
开发者ID:guozanhua,项目名称:KinectMiniGames,代码行数:7,代码来源:ApplesGameConfigPage.xaml.cs

示例3: LettersGameConfigPage

 public LettersGameConfigPage(string itemId, KinectSensorChooser sensorChooser)
 {
     InitializeComponent();
     SensorChooser = sensorChooser;
     Config = new LettersGameConfig();
     DataContext = Config;
 }
开发者ID:guozanhua,项目名称:KinectMiniGames,代码行数:7,代码来源:LettersGameConfigPage.xaml.cs

示例4: MainMenu

        public MainMenu()
        {
            InitializeComponent();

            // initialize the sensor chooser and UI
            if (Generics.GlobalKinectSensorChooser == null)
            {
                this.sensorChooser = new KinectSensorChooser();
                this.sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
                this.sensorChooserUi.KinectSensorChooser = this.sensorChooser;
                this.sensorChooser.Start();
                Generics.GlobalKinectSensorChooser = this.sensorChooser;
            }
            else
            {
                this.sensorChooser = new KinectSensorChooser();
                this.sensorChooser = Generics.GlobalKinectSensorChooser;
                this.sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
                this.sensorChooserUi.KinectSensorChooser = sensorChooser;
            }

            // Bind the sensor chooser's current sensor to the KinectRegion
            var regionSensorBinding = new Binding("Kinect") { Source = this.sensorChooser };
            BindingOperations.SetBinding(this.kinectRegion, KinectRegion.KinectSensorProperty, regionSensorBinding);
        }
开发者ID:jiaoyang813,项目名称:MediaHomeCenter,代码行数:25,代码来源:MainMenu.xaml.cs

示例5: initKinectInteraction

 public void initKinectInteraction()
 {
     this.sensorChooser = new KinectSensorChooser();
     this.sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
     this.sensorChooserUi.KinectSensorChooser = this.sensorChooser;
     this.sensorChooser.Start();
 }
开发者ID:Minimata,项目名称:MainProjectIntegrationP1,代码行数:7,代码来源:MainWindow.xaml.cs

示例6: LevelOne

 public LevelOne(KinectSensorChooser sensorChooser)
 {
     InitializeComponent();
     sensorChooser = this.sensorChooser;
     Loaded += OnLoaded;
     long playerpos = Convert.ToInt64(player.GetValue(Canvas.LeftProperty));
 }
开发者ID:IzzyAhmad,项目名称:esilk_kinect,代码行数:7,代码来源:LevelOne.xaml.cs

示例7: StatesScreen

 public StatesScreen(Window MainWindow, KinectSensorChooser SensorChooser, Constants.TimeZones TimeZone)
 {
     // Get the main window and sensor objects
     this.mainWindow = MainWindow;
     this.sensorChooser = SensorChooser;
     // Populate the states based on TimeZone parameter
     this.timeZone = TimeZone;
     this.states = PopulateStates(TimeZone);
     #if (DEBUG)
     Console.WriteLine(TimeZone.ToString() + " states loading...");
     foreach (Utilities.State s in this.states)
     {
         Console.WriteLine(s);
     }
     Console.WriteLine("..." + TimeZone.ToString() + " states loaded!");
     #endif
     // Initialize display containers
     CreateContentGrid();
     CreateKinectRegion();
     CreateInfoGrid();
     CreateKinectScrollViewer();
     // Set up the display
     Grid.SetColumn(this.infoGrid, 0);
     Grid.SetRow(this.infoGrid, 0);
     this.content.Children.Add(this.infoGrid);
     this.kRegion.Content = this.statesKSV;
     Grid.SetColumn(this.kRegion, 0);
     Grid.SetRow(this.kRegion, 1);
     this.content.Children.Add(this.kRegion);
     // Bind the Kinect sensor
     //var regionSensorBinding = new Binding("Kinect") { Source = SensorChooser };
     this.regionSensorBinding = new Binding("Kinect") { Source = SensorChooser };
     BindingOperations.SetBinding(this.kRegion, KinectRegion.KinectSensorProperty, this.regionSensorBinding);
 }
开发者ID:Tribeman,项目名称:CS422,代码行数:34,代码来源:StatesScreen.cs

示例8: Kinecterface

 public Kinecterface(KinectSensorChooser chooser)
 {
     this.chooser = chooser;
     this.chooser.KinectChanged += KinectChanged;
     this.DataRecieved = (skels, depth, colors) => { };
     this.ErrorWhileRecivingData = (s, d, c) => { };
 }
开发者ID:TheSpikesKinectors,项目名称:SecondGame2016,代码行数:7,代码来源:Kinecterface.cs

示例9: OnLoaded

 private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
 {
     this.sensorChooser = new KinectSensorChooser();
     this.sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
     this.sensorChooserUi.KinectSensorChooser = this.sensorChooser;
     this.sensorChooser.Start();
 }
开发者ID:IzzyAhmad,项目名称:esilk_kinect,代码行数:7,代码来源:Learn.xaml.cs

示例10: Window_Loaded_1

 private void Window_Loaded_1(object sender, RoutedEventArgs e)
 {
     miKinect = new KinectSensorChooser();
     miKinect.KinectChanged += miKinect_KinectChanged;
     sensorChooserUI.KinectSensorChooser = miKinect;
     miKinect.Start();
 }
开发者ID:egaleano,项目名称:Kinect,代码行数:7,代码来源:MainWindow.xaml.cs

示例11: MainWindow

 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();
 }
开发者ID:Tribeman,项目名称:CS422,代码行数:32,代码来源:MainWindow.xaml.cs

示例12: MainWindow

        public MainWindow()
        {
            InitializeComponent();

            KinectInit init = new KinectInit();

            init.initialize();

            serial.Init();

            this.sensorChooser = new KinectSensorChooser();

            this.sensorChooser.KinectChanged += SensorChooserOnKinectChanged;

            this.sensorChooserUi.KinectSensorChooser = this.sensorChooser;

            this.sensorChooser.Start();

            var regionSensorBinding = new Binding("Kinect") { Source = this.sensorChooser };

            BindingOperations.SetBinding(this.kinectRegion, KinectRegion.KinectSensorProperty, regionSensorBinding);

            SkeletonTracking trackAngle = new SkeletonTracking();

            trackAngle.InitializeSkeleton();

            trackAngle.SkeletonLoading();
        }
开发者ID:kinect-robotics,项目名称:mainhub,代码行数:28,代码来源:MainWindow.xaml.cs

示例13: OnLoaded

 private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
 {
     _sensorChooser = new KinectSensorChooser();
     _sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
     KinectSensorChooserUi.KinectSensorChooser = _sensorChooser;
     _sensorChooser.Start();
     SetGameField();
 }
开发者ID:guozanhua,项目名称:KinectMiniGames,代码行数:8,代码来源:FirstLevelView.xaml.cs

示例14: DrawingGameConfigPage

 public DrawingGameConfigPage(string itemId, KinectSensorChooser kinectSensor)
 {
    
     this.InitializeComponent();
     this.kinectSensor = kinectSensor;
     config = new DrawingGameConfig();                                 
     this.DataContext = Config;
 }
开发者ID:guozanhua,项目名称:KinectMiniGames,代码行数:8,代码来源:DrawingGameConfigPage.xaml.cs

示例15: SongPlayer

 public SongPlayer(string s,KinectSensorChooser w)
     : this()
 {
     this.songName = s;
     this._sensor = w.Kinect;
     MoviePlayer.Source = new Uri(@"F:\KinectTest\KinectTest\KinectTest\Musics\" + songName + ".MP3", UriKind.Absolute);
     MoviePlayer.Play();
 }
开发者ID:jiaoyang813,项目名称:MediaHomeCenter,代码行数:8,代码来源:SongPlayer.xaml.cs


注:本文中的Microsoft.Kinect.Toolkit.KinectSensorChooser类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。