|
0
|
1 |
using System; |
|
|
2 |
using System.Net; |
|
|
3 |
using System.Windows; |
|
|
4 |
using System.Windows.Controls; |
|
|
5 |
using System.Windows.Documents; |
|
|
6 |
using System.Windows.Ink; |
|
|
7 |
using System.Windows.Input; |
|
|
8 |
using System.Windows.Media; |
|
|
9 |
using System.Windows.Media.Animation; |
|
|
10 |
using System.Windows.Shapes; |
|
|
11 |
using Iri.Modernisation.Data.Models; |
|
|
12 |
using Iri.Modernisation.BaseMVVM.Commands; |
|
|
13 |
using Iri.Modernisation.BaseMVVM.ViewModel; |
|
17
|
14 |
using Iri.Modernisation.Controls.View; |
|
0
|
15 |
using System.Collections.Generic; |
|
|
16 |
namespace Iri.Modernisation.Controls.ViewModel |
|
|
17 |
{ |
|
|
18 |
public class ProductionTimeLineVM : BaseMVVM.ViewModel.ViewModel |
|
|
19 |
{ |
|
|
20 |
|
|
17
|
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 |
} |
|
0
|
35 |
|
|
|
36 |
private VideoBook _newBook; |
|
|
37 |
private List<VideoSequence>[] _listVideoSequences = new List<VideoSequence>[4]; |
|
|
38 |
public List<VideoSequence> SelectedVideoSequences |
|
|
39 |
{ |
|
|
40 |
get |
|
|
41 |
{ |
|
|
42 |
return _listVideoSequences[SelectedChapter]; |
|
|
43 |
} |
|
|
44 |
set |
|
|
45 |
{ |
|
|
46 |
_listVideoSequences[SelectedChapter] = value; |
|
|
47 |
_newBook.Chapters[SelectedChapter].VideoSequences = value; |
|
|
48 |
OnPropertyChanged("SelectedVideoSequences"); |
|
|
49 |
} |
|
|
50 |
} |
|
17
|
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 |
|
|
0
|
69 |
private int _selectedChapter=0; |
|
|
70 |
public int SelectedChapter |
|
|
71 |
{ |
|
|
72 |
get |
|
|
73 |
{ |
|
|
74 |
return _selectedChapter; |
|
|
75 |
} |
|
|
76 |
set |
|
|
77 |
{ |
|
|
78 |
_selectedChapter = value; |
|
|
79 |
OnPropertyChanged("SelectedChapter"); |
|
|
80 |
} |
|
|
81 |
} |
|
|
82 |
|
|
|
83 |
|
|
|
84 |
|
|
|
85 |
private List<SegmentIndex>[] _listSegmentIndex = new List<SegmentIndex>[4]; |
|
|
86 |
public List<SegmentIndex> SelectedIndex |
|
|
87 |
{ |
|
|
88 |
get |
|
|
89 |
{ |
|
|
90 |
return _listSegmentIndex[SelectedChapter]; |
|
|
91 |
} |
|
|
92 |
set |
|
|
93 |
{ |
|
|
94 |
_listSegmentIndex[SelectedChapter] = value; |
|
|
95 |
_newBook.Chapters[SelectedChapter].Index = value; |
|
|
96 |
OnPropertyChanged("SelectedIndex"); |
|
|
97 |
} |
|
|
98 |
} |
|
|
99 |
|
|
17
|
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 |
|
|
0
|
115 |
public ProductionTimeLineVM() |
|
|
116 |
{ |
|
|
117 |
_newBook = new VideoBook(); |
|
17
|
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; |
|
0
|
128 |
} |
|
|
129 |
} |
|
|
130 |
} |