本文整理汇总了C#中IDevice.Start方法的典型用法代码示例。如果您正苦于以下问题:C# IDevice.Start方法的具体用法?C# IDevice.Start怎么用?C# IDevice.Start使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDevice
的用法示例。
在下文中一共展示了IDevice.Start方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MainWindow
public MainWindow()
{
InitializeComponent();
IContext context = Iisu.Iisu.Context;
// get iisu handle
iisuHandle = context.CreateHandle();
// create iisu device
device = iisuHandle.InitializeDevice();
try
{
// register event listener
device.EventManager.RegisterEventListener("SYSTEM.Error", new OnErrorDelegate(onError));
// launch IID script
device.CommandManager.SendCommand("IID.loadGraph", "gateway-v2.iid");
}
catch (Exception e)
{
Console.WriteLine(e.Message);
Environment.Exit(0);
}
CompositionTarget.Rendering += UpdateColor;
device.Start();
//while (true)
{
//update();
}
}
示例2: IisuWrapper
/// <summary>
/// Constructor Initializes Iisu and loads the input movie
/// </summary>
/// <param name="skvMoviePath">skv movie path</param>
/// <exception cref="System.Exception">
/// Can occur when Iisu cannot be properly initialized
/// or when the input path is not valid.
/// </exception>
public IisuWrapper()
{
// We need to specify where is located the iisu dll and its configuration file.
// in this sample we'll use the SDK's environment variable as resource to locate them
// but you can use any mean you need.
string libraryLocation = System.Environment.GetEnvironmentVariable("IISU_SDK_DIR");
IHandleConfiguration config = Iisu.Iisu.Context.CreateHandleConfiguration();
<<<<<<< HEAD
=======
>>>>>>> b8e918927be2a4af4732581fe5ad6d829df34356
config.IisuBinDir = (libraryLocation + "/bin");
config.ConfigFileName = "iisu_config.xml";
// get iisu handle
_iisuHandle = Iisu.Iisu.Context.CreateHandle(config);
// create iisu device
_device = _iisuHandle.InitializeDevice();
// check if Mode DS325 is Enable
string isCiEnabledString = "";
_iisuHandle.GetConfigString("//CONFIG//PROCESSING//CI", out isCiEnabledString);
bool isCiEnabled = isCiEnabledString.Equals("1");
if (isCiEnabled != true)
{
Console.WriteLine("Hand Control will not be Ok");
}
//Envoi du fichier coincoin.iid dans le le moteur IIsi
_device.CommandManager.SendCommand("IID.loadGraph", Directory.GetCurrentDirectory() + "\\coincoin.iid");
// register even listener
_device.EventManager.RegisterEventListener("SYSTEM.Error", new OnErrorDelegate(onError));
_Hand1Status = _device.RegisterDataHandle<int>("CI.HAND1.Status");
_Hand1PosingGestureId = _device.RegisterDataHandle<int>("CI.HAND1.PosingGestureId");
_Hand1PalmPosition = _device.RegisterDataHandle<Iisu.Data.Vector3>("CI.HAND1.PalmPosition3D");
// enregistrement du la reconnaissance CoinCoin
_coincoin = _device.RegisterDataHandle<bool>("IID.Script.CoinCoin");
_imetaInfo = _device.EventManager.GetMetaInfo("CI.HandPosingGesture");
_device.Start();
}
示例3: initDS
void initDS()
{
IContext context = Iisu.Iisu.Context;
// get iisu handle
iisuHandle = context.CreateHandle();
// create iisu device
device = iisuHandle.InitializeDevice();
try
{
// register event listener
device.EventManager.RegisterEventListener("SYSTEM.Error", new OnErrorDelegate(onError));
// launch IID script
device.CommandManager.SendCommand("IID.loadGraph", "gateway-v2.iid");
}
catch (Exception e)
{
Console.WriteLine(e.Message);
Environment.Exit(0);
}
device.Start();
}