src/FingersDance.ViewModel/ProjectViewModel.cs
author cavaliet
Thu, 05 Nov 2009 13:13:52 +0100
changeset 187 b266af50744c
parent 182 25b49d4f1635
child 192 11083c390ce4
permissions -rw-r--r--
Change file and event names for code to be clearer and more coherent with the project and cuttings organisation
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
143
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     1
using System;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     2
using System.Collections.Generic;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     3
using System.Linq;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     4
using System.Text;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     5
using FingersDance.Data;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     6
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     7
namespace FingersDance.ViewModels
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     8
{
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
     9
    public class ProjectViewModel : ViewModelBase
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    10
    {
182
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    11
        private Project project = new Project();
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    12
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    13
        private Dictionary<String, Cutting> _cuttingsDict = new Dictionary<string,Cutting>();
143
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    14
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    15
        #region Constructor
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    16
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    17
        public ProjectViewModel() { }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    18
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    19
        public ProjectViewModel(Project p)
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    20
        {
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    21
            project = p;
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    22
        }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    23
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    24
        #endregion
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    25
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    26
        #region Properties
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    27
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    28
        public Project Project
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    29
        {
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    30
            get { return project; }
182
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    31
            set { project = value; }
148
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    32
        }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    33
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    34
        public string Date
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    35
        {
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    36
            get { return project.Date; }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    37
            set { project.Date = value; }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    38
        }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    39
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    40
        public string Name
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    41
        {
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    42
            get { return project.Name; }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    43
            set { project.Name = value; }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    44
        }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    45
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    46
        public string Description
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    47
        {
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    48
            get { return project.Description; }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    49
            set { project.Description = value; }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    50
        }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents: 143
diff changeset
    51
182
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    52
        public String VideoPath
143
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    53
        {
182
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    54
            get { return project.VideoPath; }
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    55
            set { project.VideoPath = value; }
143
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    56
        }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    57
182
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    58
        //public User User
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    59
        //{
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    60
        //    get { return project.User; }
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    61
        //    set { project.User = value; }
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    62
        //}
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    63
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    64
        public List<Cutting> Cuttings
143
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    65
        {
182
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    66
            get { return project.Cuttings; }
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    67
            set { project.Cuttings = value; }
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    68
        }
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    69
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    70
        public Dictionary<String, Cutting> CuttingsDict
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    71
        {
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    72
            get { return _cuttingsDict;  }
25b49d4f1635 First step of data reorganisation : session is meant to disappear : a "session" is in fact a project and one project owns several cuttings, one per user. WARNING : this commit builds without problems but we can not open more than one UserPanel.
cavaliet
parents: 148
diff changeset
    73
            set { _cuttingsDict = value; }
143
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    74
        }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    75
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    76
        #endregion
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    77
    }
PAMPHILE Jonathan <pamphile@efrei.fr>
parents:
diff changeset
    78
}