當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。