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


C# ActivityInfo.TotalAscendingMeters方法代码示例

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


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

示例1: ActivityFields


//.........这里部分代码省略.........
                    fieldValue = activityInfoInstance.AverageCadence.ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;
                case "AVGGRADE":
                    fieldValue = activityInfoInstance.AverageGrade.ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;
                case "AVGHR":
                    fieldValue = activityInfoInstance.AverageHeartRate.ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;
                case "AVGPOWER":
                    fieldValue = activityInfoInstance.AveragePower.ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;
                case "AVGSPEED":
                    fieldValue = activityInfoInstance.AverageSpeedMetersPerSecond.ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;
                case "AVGVERTICALOSCILLATION":
                    fieldValue = activity.VerticalOscillationMillimetersTrack.Avg.ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;
                case "AVGGROUNDCONTACT":
                    fieldValue = activity.GroundContactTimeMillisecondsTrack.Avg.ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;
                case "MAXCADENCE":
                    fieldValue = activityInfoInstance.MaximumCadence.ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;
                case "MAXGRADE":
                    fieldValue = activityInfoInstance.MaximumGrade.ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;
                case "MAXHR":
                    fieldValue = activityInfoInstance.MaximumHeartRate.ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;
                case "MAXPOWER":
                    fieldValue = activityInfoInstance.MaximumPower.ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;
                case "ASCENDING":
                    fieldValue = activityInfoInstance.TotalAscendingMeters(CalculatedFields.GetLogBook().ClimbZones[0]).ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;
                case "DESCENDING":
                    fieldValue = activityInfoInstance.TotalDescendingMeters(CalculatedFields.GetLogBook().ClimbZones[0]).ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;

                // active
                case "ACTIVETIME":
                    fieldValue = activityInfoInstance.ActiveLapsTotalDetail.LapElapsed.TotalSeconds.ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;
                case "ACTIVEHALFTIME":
                    fieldValue = (activityInfoInstance.ActiveLapsTotalDetail.LapElapsed.TotalSeconds / 2f).ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;
                case "ACTIVEDISTANCE":
                    fieldValue = activityInfoInstance.ActiveLapsTotalDetail.LapDistanceMeters.ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;
                case "ACTIVEHALFDISTANCE":
                    fieldValue = (activityInfoInstance.ActiveLapsTotalDetail.LapDistanceMeters / 2f).ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;
                case "ACTIVEAVGPACE":
                    pace = activityInfoInstance.ActiveLapsTotalDetail.LapElapsed.TotalSeconds /
                                activityInfoInstance.ActiveLapsTotalDetail.LapDistanceMeters * 1000;
                    fieldValue = pace.ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;
                case "ACTIVEAVGSPEED":
                    fieldValue = (activityInfoInstance.ActiveLapsTotalDetail.LapDistanceMeters /
                                 activityInfoInstance.ActiveLapsTotalDetail.LapElapsed.TotalSeconds).ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;
                case "ACTIVEAVGCADENCE":
                    fieldValue = activityInfoInstance.ActiveLapsTotalDetail.AverageCadencePerMinute.ToString(CultureInfo.InvariantCulture.NumberFormat);
                    break;
                case "ACTIVEAVGHR":
                    fieldValue = activityInfoInstance.ActiveLapsTotalDetail.AverageHeartRatePerMinute.ToString(CultureInfo.InvariantCulture.NumberFormat);
开发者ID:gerhardol,项目名称:calculatedfields,代码行数:67,代码来源:Evaluator.cs


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