Пример #1
0
        private void LoadTrip(object sender, EventArgs e)
        {
            var saveData = new TripSaveData();

            currentTrip = saveData.LoadTrip();
            UpdateAllTripDataOnForm();
        }
Пример #2
0
        private void SaveTrip(object sender, EventArgs e)
        {
            var saveData = new TripSaveData();

            currentTrip.BuildSaveData(saveData);
            saveData.SaveTrip();
        }
Пример #3
0
 public void BuildSaveData(TripSaveData saveData)
 {
     saveData.AddTripStart();
     saveData.AddDestination(Destination);
     saveData.AddOutset(Outset);
     saveData.AddDaysTraveled(DaysTraveled);
     saveData.AddMilesRemaining(milesRemaining);
     saveData.AddPace(CurrentPace);
     saveData.AddFood(FoodCount);
     saveData.AddWater(WaterCount);
     saveData.AddTripEnd();
 }