author | PAMPHILE Jonathan <pamphile@efrei.fr> |
Mon, 23 Nov 2009 16:16:21 +0100 | |
changeset 220 | 0aba45e2f907 |
parent 214 | beebae32b1ed |
permissions | -rw-r--r-- |
143 | 1 |
using System; |
2 |
using System.Collections.Generic; |
|
3 |
using System.Linq; |
|
4 |
using System.Text; |
|
5 |
using System.Collections.ObjectModel; |
|
6 |
||
7 |
using FingersDance.Data; |
|
8 |
||
9 |
namespace FingersDance.ViewModels |
|
10 |
{ |
|
11 |
public class MainViewModel |
|
12 |
{ |
|
13 |
#region Attributes |
|
14 |
||
15 |
public Dictionary<String, UserViewModel> Users = new Dictionary<string,UserViewModel>(); |
|
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:
143
diff
changeset
|
16 |
public ProjectViewModel Project = new ProjectViewModel(); |
143 | 17 |
|
18 |
#endregion |
|
19 |
|
|
20 |
#region Methods |
|
21 |
||
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:
143
diff
changeset
|
22 |
public void CreateProject(string videoName, string videoPath) |
143 | 23 |
{ |
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:
143
diff
changeset
|
24 |
Project = new ProjectViewModel(new Project(videoName, videoPath)); |
143 | 25 |
} |
26 |
||
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:
143
diff
changeset
|
27 |
public void CloseProject() |
143 | 28 |
{ |
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:
143
diff
changeset
|
29 |
Project = null; |
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:
143
diff
changeset
|
30 |
Project = new ProjectViewModel(); |
143 | 31 |
} |
32 |
||
33 |
private void AddUser(User u) |
|
34 |
{ |
|
35 |
UserViewModel uvm = new UserViewModel(u); |
|
36 |
Users.Add(u.Email, uvm); |
|
37 |
} |
|
38 |
||
39 |
#endregion |
|
40 |
} |
|
41 |
} |