本文整理汇总了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();
}
示例2: ApplesGameConfigPage
public ApplesGameConfigPage(string itemId, KinectSensorChooser kinectSensor)
{
InitializeComponent();
_kinectSensor = kinectSensor;
Config = new ApplesGameConfig();
DataContext = Config;
}
示例3: LettersGameConfigPage
public LettersGameConfigPage(string itemId, KinectSensorChooser sensorChooser)
{
InitializeComponent();
SensorChooser = sensorChooser;
Config = new LettersGameConfig();
DataContext = Config;
}
示例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);
}
示例5: initKinectInteraction
public void initKinectInteraction()
{
this.sensorChooser = new KinectSensorChooser();
this.sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
this.sensorChooserUi.KinectSensorChooser = this.sensorChooser;
this.sensorChooser.Start();
}
示例6: LevelOne
public LevelOne(KinectSensorChooser sensorChooser)
{
InitializeComponent();
sensorChooser = this.sensorChooser;
Loaded += OnLoaded;
long playerpos = Convert.ToInt64(player.GetValue(Canvas.LeftProperty));
}
示例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);
}
示例8: Kinecterface
public Kinecterface(KinectSensorChooser chooser)
{
this.chooser = chooser;
this.chooser.KinectChanged += KinectChanged;
this.DataRecieved = (skels, depth, colors) => { };
this.ErrorWhileRecivingData = (s, d, c) => { };
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例13: OnLoaded
private void OnLoaded(object sender, RoutedEventArgs routedEventArgs)
{
_sensorChooser = new KinectSensorChooser();
_sensorChooser.KinectChanged += SensorChooserOnKinectChanged;
KinectSensorChooserUi.KinectSensorChooser = _sensorChooser;
_sensorChooser.Start();
SetGameField();
}
示例14: DrawingGameConfigPage
public DrawingGameConfigPage(string itemId, KinectSensorChooser kinectSensor)
{
this.InitializeComponent();
this.kinectSensor = kinectSensor;
config = new DrawingGameConfig();
this.DataContext = Config;
}
示例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();
}