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


C# ServiceReference1.Service1Client.CloseAsync方法代码示例

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


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

示例1: SendLiveData

 private void SendLiveData(string type, double value)
 {
     ServiceReference1.Service1Client client = new ServiceReference1.Service1Client();
     client.SendMonitoringDataAsync(eventUniqueID, type, value);
     client.CloseAsync();
 }
开发者ID:Inmeta,项目名称:aspc2016,代码行数:6,代码来源:App.xaml.cs

示例2: TileManager_TileOpened

        private async void TileManager_TileOpened(object sender, BandTileEventArgs<IBandTileOpenedEvent> e)
        {
            //alert!
            //Create new alert in the alerts list
            ServiceReference1.Service1Client client = new ServiceReference1.Service1Client();

            var result = await client.CreateAlertAsync(59.975349, 10.665395, eventUniqueID);
            await client.CloseAsync();
            await bandClient.NotificationManager.ShowDialogAsync(e.TileEvent.TileId, "Help is on the way!", "It shouldn't take long...");
            heartRateMonitor();
            //skinTemperatureMonitor();
            //GyroscopeMonitor();
            //PedometerMonitor();
            //GsrMonitor();
            //UVMonitor();

            // start the Heartrate sensor
            try
            {
                await bandClient.SensorManager.HeartRate.StartReadingsAsync();
            }
            catch (BandException ex)
            {
                // handle a Band connection exception
                throw ex;
            }
            //try
            //{
            //    await bandClient.SensorManager.Gyroscope.StartReadingsAsync();
            //}
            //catch (BandException ex)
            //{
            //    // handle a Band connection exception
            //    throw ex;
            //}
            //try
            //{
            //    await bandClient.SensorManager.Pedometer.StartReadingsAsync();
            //}
            //catch (BandException ex)
            //{
            //    // handle a Band connection exception
            //    throw ex;
            //}
            //try
            //{
            //    await bandClient.SensorManager.Gsr.StartReadingsAsync();
            //}
            //catch (BandException ex)
            //{
            //    // handle a Band connection exception
            //    throw ex;
            //}
            //try
            //{
            //    await bandClient.SensorManager.UV.StartReadingsAsync();
            //}
            //catch (BandException ex)
            //{
            //    // handle a Band connection exception
            //    throw ex;
            //}

            //try
            //{
            //    await bandClient.SensorManager.SkinTemperature.StartReadingsAsync();
            //}
            //catch (BandException ex)
            //{
            //    // handle a Band connection exception
            //    throw ex;
            //}
            




        }
开发者ID:Inmeta,项目名称:aspc2016,代码行数:78,代码来源:App.xaml.cs


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