equal
deleted
inserted
replaced
20 { |
20 { |
21 public String contexteGrid; |
21 public String contexteGrid; |
22 public int id = 0; |
22 public int id = 0; |
23 public event EventHandler UC_Screen_NewCutting; |
23 public event EventHandler UC_Screen_NewCutting; |
24 private MainViewModel _mainViewModel; |
24 private MainViewModel _mainViewModel; |
25 private String AnnotationOrSearchMode; |
25 public String AnnotationOrSearchMode; |
26 public Cutting Cutting; |
26 public Cutting Cutting; |
27 |
27 |
28 private String videoName; |
28 private String videoName; |
29 private String videoPath; |
29 private String videoPath; |
30 |
30 |
173 la.Add(new Annotation(aId, begin, dur, gt, c)); |
173 la.Add(new Annotation(aId, begin, dur, gt, c)); |
174 } |
174 } |
175 loadedProject.Cuttings.Add(new Cutting(cuttingNode.Attribute("id").Value,cuttingNode.Element("title").Value,la)); |
175 loadedProject.Cuttings.Add(new Cutting(cuttingNode.Attribute("id").Value,cuttingNode.Element("title").Value,la)); |
176 } |
176 } |
177 // We define the loaded project as the current session's project. |
177 // We define the loaded project as the current session's project. |
178 if (AnnotationOrSearchMode == "Annotation") |
178 _mainViewModel.Project = new ProjectViewModel(loadedProject); |
179 { |
179 OpenProject(); |
180 _mainViewModel.Project = new ProjectViewModel(loadedProject); |
|
181 OpenProject(); |
|
182 } |
|
183 } |
180 } |
184 } |
181 } |
185 catch (Exception) |
182 catch (Exception) |
186 { |
183 { |
187 Cutting = null; |
184 Cutting = null; |
214 |
211 |
215 private void OpenProject() |
212 private void OpenProject() |
216 { |
213 { |
217 try |
214 try |
218 { |
215 { |
219 // We display the list of cuttings available for the current project |
216 if (AnnotationOrSearchMode == "Annotation") |
220 UserControlListCutting listCuttings = new UserControlListCutting(_mainViewModel.Project.CuttingsDict); |
217 { |
221 listCuttings.Name = "listCuttings"; |
218 // We display the list of cuttings available for the current project |
222 LayoutRoot.Children.Add(listCuttings); |
219 UserControlListCutting listCuttings = new UserControlListCutting(_mainViewModel.Project.CuttingsDict); |
223 listCuttings.EH_Item_ContactDown += new EventHandler(listCuttings_EH_Item_ContactDown); |
220 listCuttings.Name = "listCuttings"; |
|
221 LayoutRoot.Children.Add(listCuttings); |
|
222 listCuttings.EH_Item_ContactDown += new EventHandler(listCuttings_EH_Item_ContactDown); |
|
223 } |
|
224 else |
|
225 { |
|
226 Cutting = null; |
|
227 if (UC_Screen_NewCutting != null) |
|
228 UC_Screen_NewCutting(this, new EventArgs()); |
|
229 } |
224 } |
230 } |
225 catch (Exception) |
231 catch (Exception) |
226 { |
232 { |
227 Cutting = null; |
233 Cutting = null; |
228 if (UC_Screen_NewCutting != null) |
234 if (UC_Screen_NewCutting != null) |