src/FingersDance.ViewModel/ProjectViewModel.cs
author cavaliet
Tue, 24 Nov 2009 12:57:18 +0100
changeset 226 c0661ecf943e
parent 192 11083c390ce4
permissions -rw-r--r--
debug visual bug for "too far" annotation and simplify gesture handler in player.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FingersDance.Data;

namespace FingersDance.ViewModels
{
    public class ProjectViewModel : ViewModelBase
    {
        private Project project = new Project();

        private Dictionary<String, Cutting> _cuttingsDict = new Dictionary<string,Cutting>();

        #region Constructor

        public ProjectViewModel() { }

        public ProjectViewModel(Project p)
        {
            project = p;
            _cuttingsDict = new Dictionary<string, Cutting>();
            foreach(Cutting cut in project.Cuttings)
            {
                _cuttingsDict.Add(cut.Title, cut);
            }
        }

        #endregion

        #region Properties

        public Project Project
        {
            get { return project; }
            set { project = value; }
        }

        public string Date
        {
            get { return project.Date; }
            set { project.Date = value; }
        }

        public string Name
        {
            get { return project.Name; }
            set { project.Name = value; }
        }

        public string Description
        {
            get { return project.Description; }
            set { project.Description = value; }
        }

        public String VideoPath
        {
            get { return project.VideoPath; }
            set { project.VideoPath = value; }
        }

        public List<Cutting> Cuttings
        {
            get { return project.Cuttings; }
            set { project.Cuttings = value; }
        }

        public Dictionary<String, Cutting> CuttingsDict
        {
            get { return _cuttingsDict;  }
            set { _cuttingsDict = value; }
        }

        #endregion
    }
}