private void RefreshHabitAndElapsedTimeList() { if (CurrentIndex != -1) { if (HabitTimeList.Count > CurrentIndex) { HabitTimeList.RemoveAt(CurrentIndex); HabitTimeList.Insert(CurrentIndex, CurrentHabitTime); ElapsedTimeList.RemoveAt(CurrentIndex); ElapsedTimeList.Insert(CurrentIndex, ElapsedTime); } } }