/// KinectCam /// MIG module for XBox One Kinect /// Jacobo Amselem 2018 using System.Drawing; using System.Drawing.Imaging; using System; using System.Collections.Generic; using Microsoft.Kinect; using MIG.Config; using System.IO; using System.Windows; using System.Windows.Media; using System.Windows.Media.Imaging; namespace MIG.Interfaces.HGKinect { public class KinectCam : MigInterface { #region MigInterface API commands and events public enum Commands { Control_On, Control_Off, SetControl, GetImage, SetOutputFormat } private String outputFormat = "RGB"; #endregion #region Private fields private bool isConnected; private List modules; #endregion #region Lifecycle public KinectCam() { modules = new List(); var module_1 = new InterfaceModule(); module_1.Domain = this.GetDomain(); module_1.Description = "Kinect Camera"; module_1.Address = "100"; module_1.ModuleType = ModuleTypes.Sensor; // add them to the modules list modules.Add(module_1); OnInterfacePropertyChanged(this.GetDomain(), module_1.Address, "Kinect OFF", "Status.Level", 0); OnInterfacePropertyChanged(this.GetDomain(), module_1.Address, "Output Format", "Output.Format", this.outputFormat); } public void Dispose() { Disconnect(); } #endregion #region MIG Interface members public event InterfaceModulesChangedEventHandler InterfaceModulesChanged; public event InterfacePropertyChangedEventHandler InterfacePropertyChanged; public bool IsEnabled { get; set; } public List