|
26
|
1 |
using System; |
|
|
2 |
using System.Windows; |
|
|
3 |
using System.Windows.Controls; |
|
|
4 |
using System.Windows.Documents; |
|
|
5 |
using System.Windows.Ink; |
|
|
6 |
using System.Windows.Input; |
|
|
7 |
using System.Windows.Media; |
|
|
8 |
using System.Windows.Media.Animation; |
|
|
9 |
using System.Windows.Shapes; |
|
27
|
10 |
using Iri.Modernisation.Controls.ViewModel; |
|
|
11 |
using Iri.Modernisation.BaseMVVM.Commands; |
|
|
12 |
namespace Iri.Modernisation.Controls.View |
|
26
|
13 |
{ |
|
|
14 |
public partial class HeaderProductionChapter : UserControl |
|
|
15 |
{ |
|
27
|
16 |
|
|
|
17 |
|
|
|
18 |
|
|
|
19 |
|
|
|
20 |
|
|
|
21 |
public bool Selected |
|
|
22 |
{ |
|
|
23 |
get { return (bool)GetValue(SelectedProperty); } |
|
|
24 |
set |
|
|
25 |
{ |
|
|
26 |
SetValue(SelectedProperty, value); |
|
|
27 |
|
|
|
28 |
} |
|
|
29 |
|
|
|
30 |
} |
|
|
31 |
|
|
|
32 |
// Using a DependencyProperty as the backing store for Selected. This enables animation, styling, binding, etc... |
|
|
33 |
public static readonly DependencyProperty SelectedProperty = |
|
|
34 |
DependencyProperty.Register("Selected", typeof(bool), typeof(HeaderProductionChapter), new PropertyMetadata(false)); |
|
|
35 |
|
|
|
36 |
|
|
|
37 |
|
|
26
|
38 |
public HeaderProductionChapter() |
|
|
39 |
{ |
|
|
40 |
// Required to initialize variables |
|
|
41 |
InitializeComponent(); |
|
27
|
42 |
EditionController.Text = Iri.Modernisation.Lang.LangResource.EditingLabel; |
|
|
43 |
IndexController.Text = Iri.Modernisation.Lang.LangResource.IndexingLabel; |
|
|
44 |
// Commands.ActivePart.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(ActivePart_Executed); |
|
|
45 |
EditionController.HeaderProductionPartFinished += new EventHandler<HeaderProductionPartControlerEventArgs>(EditionController_HeaderProductionPartFinished); |
|
|
46 |
IndexController.HeaderProductionPartFinished += new EventHandler<HeaderProductionPartControlerEventArgs>(IndexController_HeaderProductionPartFinished); |
|
|
47 |
} |
|
|
48 |
|
|
|
49 |
void IndexController_HeaderProductionPartFinished(object sender, HeaderProductionPartControlerEventArgs e) |
|
|
50 |
{ |
|
|
51 |
((HeaderProductionChapterVM)DataContext).Indexing = true; |
|
|
52 |
} |
|
|
53 |
|
|
|
54 |
void EditionController_HeaderProductionPartFinished(object sender, HeaderProductionPartControlerEventArgs e) |
|
|
55 |
{ |
|
|
56 |
((HeaderProductionChapterVM)DataContext).Editing = true; |
|
|
57 |
} |
|
|
58 |
|
|
|
59 |
void ActivePart_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e) |
|
|
60 |
{ |
|
|
61 |
|
|
|
62 |
//IndexController.IsActive = true; |
|
|
63 |
} |
|
26
|
64 |
} |
|
|
65 |
} |