equal
deleted
inserted
replaced
|
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.BaseMVVM.Commands; |
|
12 using Iri.Modernisation.BaseMVVM.ViewModel; |
|
13 namespace Iri.Modernisation.Controls.ViewModel |
|
14 { |
|
15 public class VideoViewerVM : BaseMVVM.ViewModel.ViewModel |
|
16 { |
|
17 |
|
18 private String _source; |
|
19 public String Source |
|
20 { |
|
21 get |
|
22 { |
|
23 return _source; |
|
24 } |
|
25 set |
|
26 { |
|
27 _source = value; |
|
28 |
|
29 OnPropertyChanged(null); |
|
30 } |
|
31 } |
|
32 public Uri USource |
|
33 { |
|
34 get |
|
35 { |
|
36 if (Source != null) |
|
37 { |
|
38 return new Uri(Source, UriKind.RelativeOrAbsolute); |
|
39 } |
|
40 else |
|
41 { |
|
42 return null; |
|
43 } |
|
44 } |
|
45 |
|
46 } |
|
47 public String Info |
|
48 { |
|
49 get |
|
50 { |
|
51 return position + ":" + Source; |
|
52 } |
|
53 |
|
54 } |
|
55 private TimeSpan position = new TimeSpan(0,0,0); |
|
56 public TimeSpan Position |
|
57 { |
|
58 get |
|
59 { |
|
60 return position; |
|
61 } |
|
62 set |
|
63 { |
|
64 position = value; |
|
65 //OnPropertyChanged("Position"); |
|
66 OnPropertyChanged("Info"); |
|
67 |
|
68 } |
|
69 } |
|
70 public VideoViewerVM() |
|
71 { |
|
72 Commands.VideoViewer.SendPosition.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(SendPosition_Executed); |
|
73 //Commands.GoToTime.Executed += new EventHandler<SLExtensions.Input.ExecutedEventArgs>(GoToTime_Executed); |
|
74 } |
|
75 |
|
76 void SendPosition_Executed(object sender, SLExtensions.Input.ExecutedEventArgs e) |
|
77 { |
|
78 //Position = (TimeSpan)(e.Parameter); |
|
79 } |
|
80 |
|
81 |
|
82 |
|
83 } |
|
84 } |