コード例 #1
0
ファイル: WorkoutComponent.cs プロジェクト: jpazarzis/hogar
 public WorkoutComponent(Workout workout, Workout previousWorkout)
 {
     _workout = workout;
     _previousWorkout = previousWorkout;
     InitializeComponent();
 }
コード例 #2
0
ファイル: BrisWorkouts.cs プロジェクト: jpazarzis/hogar
        public static Workout Make(ParsableText parsableText, int index)
        {
            var w = new Workout();

            w._date = parsableText.Tokens[FieldIndex.DATE + index].ToString().Trim();
            w._time = parsableText.Tokens[FieldIndex.TIME + index].ToString().Trim();
            w._track = parsableText.Tokens[FieldIndex.TRACK + index].ToString().Trim();
            w._distance = parsableText.Tokens[FieldIndex.DISTANCE + index].ToString().Trim();
            w._trackCondition = parsableText.Tokens[FieldIndex.TRACK_CONDITION + index].ToString().Trim();
            w._description = parsableText.Tokens[FieldIndex.DESCRIPTION + index].ToString().Trim();
            w._mainOrInnerTrackIndicator = parsableText.Tokens[FieldIndex.TRACK_INDICATOR + index].ToString().Trim();
            w._numberOfWorkoutsThatDayOnDistance = parsableText.Tokens[FieldIndex.NUMBER_OF_WORKOUTS + index].ToString().Trim();
            w._rankOfWorkout = parsableText.Tokens[FieldIndex.RANK + index].ToString().Trim();

            return (w._date.Length > 0 && w._distance.Length > 0) ? w : null;
        }