src/FingersDance.ViewModel/MainViewModel.cs
author cavaliet
Tue, 24 Nov 2009 11:35:07 +0100
changeset 225 b60e13ed75c8
parent 214 beebae32b1ed
permissions -rw-r--r--
Now an annotation has a list of gesture string and not simple gesture string. These are saved into and loaded from the ldt xml file.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.ObjectModel;

using FingersDance.Data;

namespace FingersDance.ViewModels
{
    public class MainViewModel
    {
        #region Attributes

        public Dictionary<String, UserViewModel> Users = new Dictionary<string,UserViewModel>();
        public ProjectViewModel Project = new ProjectViewModel();

        #endregion
        
        #region Methods

        public void CreateProject(string videoName, string videoPath)
        {
            Project = new ProjectViewModel(new Project(videoName, videoPath));
        }

        public void CloseProject()
        {
            Project = null;
            Project = new ProjectViewModel();
        }

        private void AddUser(User u)
        {
            UserViewModel uvm = new UserViewModel(u);
            Users.Add(u.Email, uvm);
        }

        #endregion
    }
}