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


C# Device.Connect方法代码示例

本文整理汇总了C#中Device.Connect方法的典型用法代码示例。如果您正苦于以下问题:C# Device.Connect方法的具体用法?C# Device.Connect怎么用?C# Device.Connect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Device的用法示例。


在下文中一共展示了Device.Connect方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Start

        public void Start()
        {
            var platform = manager.GetPlatform(new ObjectId(deviceInfo.PlatformId));
            currentDevice = platform.GetDevice(new ObjectId(deviceInfo.DeviceId));

            currentDevice.Connect();
        }
开发者ID:garyjohnson,项目名称:wpnest,代码行数:7,代码来源:TargetDevice.cs

示例2: EnableSpaceNavigator

        public static void EnableSpaceNavigator(this SceneView sceneView, Speed move = Speed.Normal, Speed zoom = Speed.Normal, Speed rotation = Speed.Normal, Speed tilt = Speed.Normal)
        {
            if (_device == null)
            {
                _device = new Device();
                _device.Connect();
            }

            var sensor = _device.Sensor;
            sensor.SensorInput += () => sceneView.Update(sensor, move.Translate(4000000), zoom.Translate(4000000), rotation.Translate(50000), tilt.Translate(40));
        }
开发者ID:jshirota,项目名称:EsriNetSpaceNavigator,代码行数:11,代码来源:SpaceNavigator.cs

示例3: ConnectionDeviceInstallApp

 /// <summary>
 /// Connection Emulator Device
 /// </summary>
 /// <param name="deviceObj">Device Object</param>
 /// <param name="applicationGuid">Application Guid</param>
 /// <param name="iconFilePath">IconFile Path</param>
 /// <param name="xapFileName">XapFile Name</param>
 /// <returns>return is Connection Device</returns>
 public static void ConnectionDeviceInstallApp(Device deviceObj,Guid applicationGuid,string iconFilePath,string xapFileName)
 {
     if (!string.IsNullOrEmpty(applicationGuid.ToString()))
     {
         try
         {
             deviceObj.Connect();
             ApplicationManager.InstallApplicationAndLaunch(deviceObj, applicationGuid, iconFilePath, xapFileName);
         }
         finally
         {
             deviceObj.Disconnect();
         }
     }
 }
开发者ID:chenkai,项目名称:Windows-phone-Automation-Test-Sample,代码行数:23,代码来源:DeviceManager.cs

示例4: SpaceNavigator

        public SpaceNavigator()
        {
            try
            {
                _device = new Device();
                _sensor = _device.Sensor;
                _sensor.SensorInput += OnSensorInput;
               // keyboard.KeyDown += keyboard_KeyDown;
               // keyboard.KeyUp += keyboard_KeyUp;

                // Associate a configuration with this _device'
                _device.LoadPreferences("csMonitor");
                _device.Connect();

            }
            catch (COMException e)
            {
                Console.WriteLine("{0} Caught exception #1.", e);
                throw e;
            }
        }
开发者ID:evilmachina,项目名称:theMachine,代码行数:21,代码来源:SpaceNavigator.cs

示例5: Connect

 private void Connect()
 {
     try
     {
         _input = new Device();
         _sensor = _input.Sensor;
         _input.DeviceChange += input_DeviceChange;
         _sensor.SensorInput += Sensor_SensorInput;
         _input.Connect();
     }
     catch (COMException e)
     {
         Trace.WriteLine(e.Message);
     }
 }
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:15,代码来源:SpaceNavigatorDecorator.cs


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