Example #1
0
 public DocumentVM(string path, TimeLine timeLine)
 {
     _path      = path;
     _timeLine  = timeLine;
     TimeLineVM = new TimeLineVM(timeLine, null);
     TimeLines  = new ObservableCollection <TimeLineVM> {
         TimeLineVM
     };
 }
Example #2
0
        public ExhibitVM(Exhibit exhibit, TimeLineVM parent)
        {
            _exhibit = exhibit;

            _content = new ObservableCollection <ContentVM>();

            if (_exhibit.ContentItems != null)
            {
                foreach (var exhibitContentItem in _exhibit.ContentItems)
                {
                    _content.Add(new ContentVM(exhibitContentItem, this));
                }
            }

            _parent = parent;
        }
Example #3
0
        public TimeLineVM(TimeLine timeLine, TimeLineVM parent)
        {
            _timeLine  = timeLine;
            _timeLines = new ObservableCollection <TimeLineVM>();
            _exhibits  = new ObservableCollection <ExhibitVM>();
            _parent    = parent;

            if (timeLine.TimeLines != null)
            {
                foreach (var timeLineTimeLine in timeLine.TimeLines)
                {
                    _timeLines.Add(new TimeLineVM(timeLineTimeLine, this));
                }
            }

            if (_timeLine.Exhibits != null)
            {
                foreach (var timeLineExhibit in _timeLine.Exhibits)
                {
                    _exhibits.Add(new ExhibitVM(timeLineExhibit, this));
                }
            }
        }