예제 #1
0
파일: TracksListVM.cs 프로젝트: t9mike/ADK
        private void LoadList()
        {
            Guid?selectedTrackId = SelectedTrack?.Track.Id;

            var tracks = tracksProvider.Tracks.Select(t => new TrackListItemVM()
            {
                Track     = t,
                Body      = t.Body.Names.First(),
                StartDate = JulianDayToString(t.From),
                EndDate   = JulianDayToString(t.To),
                Color     = t.Color
            });

            Tracks.Clear();
            foreach (var track in tracks)
            {
                Tracks.Add(track);
            }

            if (selectedTrackId != null)
            {
                SelectedTrack = tracks.FirstOrDefault(t => t.Track.Id == selectedTrackId.Value);
            }

            NotifyPropertyChanged(nameof(NoTracks));
        }
예제 #2
0
파일: TracksListVM.cs 프로젝트: t9mike/ADK
 private void SelectTrack(TrackListItemVM t)
 {
     EditTrack(t.Track);
 }