9 using System.Windows.Media.Animation; |
9 using System.Windows.Media.Animation; |
10 using System.Windows.Shapes; |
10 using System.Windows.Shapes; |
11 using Iri.Modernisation.Data.Models; |
11 using Iri.Modernisation.Data.Models; |
12 using Iri.Modernisation.BaseMVVM.Commands; |
12 using Iri.Modernisation.BaseMVVM.Commands; |
13 using Iri.Modernisation.BaseMVVM.ViewModel; |
13 using Iri.Modernisation.BaseMVVM.ViewModel; |
|
14 using Iri.Modernisation.Controls.View; |
14 using System.Collections.Generic; |
15 using System.Collections.Generic; |
15 namespace Iri.Modernisation.Controls.ViewModel |
16 namespace Iri.Modernisation.Controls.ViewModel |
16 { |
17 { |
17 public class ProductionTimeLineVM : BaseMVVM.ViewModel.ViewModel |
18 public class ProductionTimeLineVM : BaseMVVM.ViewModel.ViewModel |
18 { |
19 { |
19 |
20 |
20 |
21 |
|
22 private bool _isIndexing; |
|
23 public bool IsIndexing |
|
24 { |
|
25 get |
|
26 { |
|
27 return _isIndexing; |
|
28 } |
|
29 set |
|
30 { |
|
31 _isIndexing = value; |
|
32 OnPropertyChanged("IsIndexing"); |
|
33 } |
|
34 } |
21 |
35 |
22 private VideoBook _newBook; |
36 private VideoBook _newBook; |
23 private List<VideoSequence>[] _listVideoSequences = new List<VideoSequence>[4]; |
37 private List<VideoSequence>[] _listVideoSequences = new List<VideoSequence>[4]; |
24 public List<VideoSequence> SelectedVideoSequences |
38 public List<VideoSequence> SelectedVideoSequences |
25 { |
39 { |
32 _listVideoSequences[SelectedChapter] = value; |
46 _listVideoSequences[SelectedChapter] = value; |
33 _newBook.Chapters[SelectedChapter].VideoSequences = value; |
47 _newBook.Chapters[SelectedChapter].VideoSequences = value; |
34 OnPropertyChanged("SelectedVideoSequences"); |
48 OnPropertyChanged("SelectedVideoSequences"); |
35 } |
49 } |
36 } |
50 } |
|
51 |
|
52 public VideoChapter[] Chapters |
|
53 { |
|
54 get |
|
55 { |
|
56 return _newBook.Chapters; |
|
57 } |
|
58 |
|
59 |
|
60 } |
|
61 public VideoChapter SelectedBookChapter |
|
62 { |
|
63 get |
|
64 { |
|
65 return _newBook.Chapters[SelectedChapter]; |
|
66 } |
|
67 } |
|
68 |
37 private int _selectedChapter=0; |
69 private int _selectedChapter=0; |
38 public int SelectedChapter |
70 public int SelectedChapter |
39 { |
71 { |
40 get |
72 get |
41 { |
73 { |
63 _newBook.Chapters[SelectedChapter].Index = value; |
95 _newBook.Chapters[SelectedChapter].Index = value; |
64 OnPropertyChanged("SelectedIndex"); |
96 OnPropertyChanged("SelectedIndex"); |
65 } |
97 } |
66 } |
98 } |
67 |
99 |
|
100 private VideoChapterType _selectedChapterType; |
|
101 public VideoChapterType SelectedChapterType |
|
102 { |
|
103 get |
|
104 { |
|
105 return _selectedChapterType; |
|
106 } |
|
107 set |
|
108 { |
|
109 _selectedChapterType = value; |
|
110 OnPropertyChanged("SelectedChapterType"); |
|
111 } |
|
112 } |
|
113 |
|
114 |
68 public ProductionTimeLineVM() |
115 public ProductionTimeLineVM() |
69 { |
116 { |
70 _newBook = new VideoBook(); |
117 _newBook = new VideoBook(); |
|
118 |
|
119 |
|
120 Commands.ProductionTimeLine.EditorPartSelected.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(EditorPartSelected_Executed); |
|
121 |
|
122 } |
|
123 |
|
124 void EditorPartSelected_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e) |
|
125 { |
|
126 SelectedChapterType = ((HeaderProductionEventArgs)e.Source).ChapterType ; |
|
127 IsIndexing = ((HeaderProductionEventArgs)e.Source).IsIndexPart; |
71 } |
128 } |
72 } |
129 } |
73 } |
130 } |