1 / 15
文档名称:

wpf UI界面设计方案.doc

格式:doc   大小:41KB   页数:15页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

wpf UI界面设计方案.doc

上传人:luciferios02 2019/3/7 文件大小:41 KB

下载得到文件列表

wpf UI界面设计方案.doc

文档介绍

文档介绍:wpfUI界面设计usingSystem;;;;;;;;;;;;;;namespaceKinectHubDemo{ publicpartialclassMainWindow:Window {KinectSensorkinect; privateList<Button>buttons;privateButtonhoveredButton; privateboolisWindowsClosing=false;///<summary>///启动Kinect设备,默认初始化选项,并注册AllFramesReady同步事件///</summary>privatevoidstartKinect(){if(>0){//选择第一个Kinect设备kinect=[0];if(kinect==null)return;();vartsp=newTransformSmoothParameters{Smoothing=,Correction=,Prediction=,JitterRadius=,MaxDeviationRadius=};(tsp);//启用骨骼跟踪,+=newEventHandler<ColorImageFrameReadyEventArgs>(kinect_ColorFrameReady);+=newEventHandler<SkeletonFrameReadyEventArgs>(kinect_SkeletonFrameReady);文档来自于网络搜索//();}else{("没有发现任何Kinect设备");}}voidkinect_SkeletonFrameReady(objectsender,SkeletonFrameReadyEventArgse)文档来自于网络搜索{using(SkeletonFrameframe=())文档来自于网络搜索{if(frame==null)return;if(==0)return;Skeleton[]allSkeletons=newSkeleton[];(allSkeletons);//Linq语法,查找离Kinect最近的、被跟踪的骨骼,以头部Z坐标为参考SkeletonclosestSkeleton=(==&&[].TrackingState==).OrderBy(s=>[].)();if(closestSkeleton==null)return;if(!=)文档来自于网络搜索ret