11 public class MainViewModel |
11 public class MainViewModel |
12 { |
12 { |
13 #region Attributes |
13 #region Attributes |
14 |
14 |
15 public Dictionary<String, UserViewModel> Users = new Dictionary<string,UserViewModel>(); |
15 public Dictionary<String, UserViewModel> Users = new Dictionary<string,UserViewModel>(); |
16 //public SessionViewModel Session = new SessionViewModel(); |
|
17 public ProjectViewModel Project = new ProjectViewModel(); |
16 public ProjectViewModel Project = new ProjectViewModel(); |
18 |
17 |
19 #endregion |
18 #endregion |
20 |
19 |
21 #region Methods |
20 #region Methods |
22 |
21 |
23 public void CreateProject(string videoName, string videoPath) |
22 public void CreateProject(string videoName, string videoPath) |
24 { |
23 { |
25 Project = new ProjectViewModel(new Project(videoName, videoPath)); |
24 Project = new ProjectViewModel(new Project(videoName, videoPath)); |
26 } |
25 } |
27 |
|
28 //public Project CreateProject(User u) |
|
29 //{ |
|
30 // if (Users.ContainsKey(u.Email)) |
|
31 // { |
|
32 // if (Project.CuttingsDict.ContainsKey(u.Email)) |
|
33 // return Project.CuttingsDict[u.Email]; |
|
34 // else |
|
35 // { |
|
36 // Project p = new Project(u, new Cutting()); |
|
37 // Session.Projects.Add(u.Email, p); |
|
38 // return p; |
|
39 // } |
|
40 // } |
|
41 // else |
|
42 // { |
|
43 // AddUser(u); |
|
44 // Project p = new Project(u, new Cutting()); |
|
45 // Session.Projects.Add(u.Email, p); |
|
46 // return p; |
|
47 // } |
|
48 //} |
|
49 |
|
50 //public void CreateSession(string name, string path) |
|
51 //{ |
|
52 // Session = new SessionViewModel(new Session(name, path)); |
|
53 //} |
|
54 |
|
55 //public void CloseSession() |
|
56 //{ |
|
57 // Session = null; |
|
58 // Session = new SessionViewModel(); |
|
59 //} |
|
60 |
26 |
61 public void CloseProject() |
27 public void CloseProject() |
62 { |
28 { |
63 Project = null; |
29 Project = null; |
64 Project = new ProjectViewModel(); |
30 Project = new ProjectViewModel(); |