|
26
|
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; |
|
27
|
11 |
using Iri.Modernisation.BaseMVVM.Commands; |
|
|
12 |
using Iri.Modernisation.Data.Models; |
|
26
|
13 |
namespace Iri.Modernisation.Controls.ViewModel |
|
|
14 |
{ |
|
|
15 |
public class HeaderProductionChapterVM : BaseMVVM.ViewModel.ViewModel |
|
|
16 |
{ |
|
27
|
17 |
private VideoChapterDescription _chapterDescription; |
|
|
18 |
public VideoChapterDescription ChapterDescription |
|
26
|
19 |
{ |
|
|
20 |
get |
|
|
21 |
{ |
|
27
|
22 |
return _chapterDescription; |
|
|
23 |
} |
|
|
24 |
private set |
|
|
25 |
{ |
|
|
26 |
_chapterDescription = value; |
|
|
27 |
OnPropertyChanged("ChapterDescription"); |
|
|
28 |
} |
|
|
29 |
} |
|
|
30 |
|
|
|
31 |
|
|
|
32 |
private bool _isActive; |
|
|
33 |
public bool IsActive |
|
|
34 |
{ |
|
|
35 |
get |
|
|
36 |
{ |
|
|
37 |
return _isActive; |
|
26
|
38 |
} |
|
|
39 |
set |
|
|
40 |
{ |
|
27
|
41 |
_isActive = value; |
|
|
42 |
OnPropertyChanged("IsActive"); |
|
26
|
43 |
} |
|
|
44 |
} |
|
|
45 |
|
|
27
|
46 |
private bool _editing=false; |
|
26
|
47 |
public bool Editing |
|
|
48 |
{ |
|
|
49 |
get |
|
|
50 |
{ |
|
|
51 |
return _editing; |
|
|
52 |
} |
|
|
53 |
set |
|
|
54 |
{ |
|
|
55 |
_editing = value; |
|
27
|
56 |
|
|
|
57 |
if(EditEnded!=null) |
|
|
58 |
EditEnded(); |
|
|
59 |
|
|
26
|
60 |
OnPropertyChanged("Editing"); |
|
|
61 |
} |
|
|
62 |
} |
|
|
63 |
|
|
27
|
64 |
private bool _indexing=false; |
|
26
|
65 |
public bool Indexing |
|
|
66 |
{ |
|
|
67 |
get |
|
|
68 |
{ |
|
|
69 |
return _indexing; |
|
|
70 |
} |
|
|
71 |
set |
|
|
72 |
{ |
|
|
73 |
_indexing = value; |
|
|
74 |
OnPropertyChanged("Indexing"); |
|
27
|
75 |
if (Ended!=null) |
|
|
76 |
{ |
|
|
77 |
Ended(); |
|
|
78 |
} |
|
|
79 |
} |
|
|
80 |
} |
|
|
81 |
|
|
31
|
82 |
|
|
|
83 |
|
|
27
|
84 |
private bool _highLight; |
|
|
85 |
public bool HighLight |
|
|
86 |
{ |
|
|
87 |
get |
|
|
88 |
{ |
|
|
89 |
return _highLight; |
|
|
90 |
} |
|
|
91 |
set |
|
|
92 |
{ |
|
|
93 |
_highLight = value; |
|
|
94 |
OnPropertyChanged(String.Empty); |
|
26
|
95 |
} |
|
|
96 |
} |
|
|
97 |
|
|
27
|
98 |
private HeaderProductionChapterVM _next=null; |
|
|
99 |
public HeaderProductionChapterVM Next |
|
|
100 |
{ |
|
|
101 |
get |
|
|
102 |
{ |
|
|
103 |
return _next; |
|
|
104 |
} |
|
|
105 |
set |
|
|
106 |
{ |
|
|
107 |
_next = value; |
|
|
108 |
OnPropertyChanged("Next"); |
|
|
109 |
} |
|
|
110 |
} |
|
|
111 |
|
|
|
112 |
private String _title; |
|
|
113 |
public String Title |
|
|
114 |
{ |
|
|
115 |
get |
|
|
116 |
{ |
|
|
117 |
return _title; |
|
|
118 |
} |
|
|
119 |
set |
|
|
120 |
{ |
|
|
121 |
_title = value; |
|
|
122 |
OnPropertyChanged("Title"); |
|
|
123 |
} |
|
|
124 |
} |
|
26
|
125 |
|
|
|
126 |
public void Enable() |
|
|
127 |
{ |
|
27
|
128 |
IsActive = true; |
|
|
129 |
// Commands.ActivePart.Execute(null,this); |
|
26
|
130 |
} |
|
|
131 |
|
|
27
|
132 |
|
|
|
133 |
|
|
|
134 |
public HeaderProductionChapterVM(VideoChapterDescription Vcd) |
|
26
|
135 |
{ |
|
27
|
136 |
_chapterDescription = Vcd; |
|
|
137 |
_title = Vcd.Title; |
|
|
138 |
HighLight = false; |
|
31
|
139 |
|
|
27
|
140 |
|
|
26
|
141 |
} |
|
27
|
142 |
|
|
|
143 |
public delegate void EditEndedDelegate(); |
|
|
144 |
public event EditEndedDelegate EditEnded; |
|
|
145 |
|
|
|
146 |
public delegate void EndedDelegate(); |
|
|
147 |
public event EndedDelegate Ended; |
|
26
|
148 |
|
|
|
149 |
|
|
|
150 |
} |
|
|
151 |
} |