当前位置: 首页>>代码示例>>C#>>正文


C# IDevice.Start方法代码示例

本文整理汇总了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();
            }
        }
开发者ID:xtephan,项目名称:Gateway-DS325,代码行数:34,代码来源:MainWindow.xaml.cs

示例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();
        }
开发者ID:hpollet,项目名称:Jacare,代码行数:54,代码来源:IisuWrapper.cs

示例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();
        }
开发者ID:xtephan,项目名称:Gateway-DS325,代码行数:26,代码来源:MainWindow.xaml.cs


注:本文中的IDevice.Start方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。