public void Apply(KinectDriverAbstracter abstracter) { abstracter.SendPoints = SendPoints; abstracter.SendLocalizedPositions = SendLocalized; if (SendingJoints != null) { foreach (var joint in SendingJoints) { abstracter.SendJoint[joint] = true; } } }
public KinectConfig(KinectDriverAbstracter abstracter) { SendPoints = abstracter.SendPoints; SendLocalized = abstracter.SendLocalizedPositions; SendingJoints = new List <JointType>(); foreach (var joint in abstracter.SendJoint) { if (joint.Value) { SendingJoints.Add(joint.Key); } } }
public Gui(KinectDriverAbstracter abstracter) { Abstracter = abstracter; InitializeComponent(); FrontView = new Bitmap(frontViewPB.Width, frontViewPB.Height); SideView = new Bitmap(sideViewPB.Width, sideViewPB.Height); TopView = new Bitmap(topVewPB.Width, topVewPB.Height); frontViewPB.Paint += (sender, args) => { lock (FrontView) args.Graphics.DrawImageUnscaled(FrontView, 0, 0); }; topVewPB.Paint += (sender, args) => { lock (TopView) args.Graphics.DrawImageUnscaled(TopView, 0, 0); }; sideViewPB.Paint += (sender, args) => { lock (SideView) args.Graphics.DrawImageUnscaled(SideView, 0, 0); }; _jointTypes = Enum.GetValues(typeof(JointType)) as JointType[]; var config = KinectConfig.Load(); if (config != null) { config.Apply(Abstracter); } foreach (var value in _jointTypes) { sendPoints.Items.Add(value, Abstracter.SendJoint[value]); } }