1 | using System; |
---|
2 | using System.Collections.Generic; |
---|
3 | using System.Text; |
---|
4 | |
---|
5 | using Com.Piwigo.Lib.DTO; |
---|
6 | using System.ComponentModel; |
---|
7 | using System.Collections.ObjectModel; |
---|
8 | |
---|
9 | namespace Com.Piwigo.Wpf.DTO |
---|
10 | { |
---|
11 | |
---|
12 | public class PwgImageWPF : INotifyPropertyChanged |
---|
13 | { |
---|
14 | private String _imgSource; |
---|
15 | public String ImgSource |
---|
16 | { |
---|
17 | set { _imgSource = value; OnPropertyChanged("ImgSource"); } |
---|
18 | get |
---|
19 | { |
---|
20 | if (_imgSource == null) |
---|
21 | { |
---|
22 | _imgSource = Com.Piwigo.Wpf.Service.ImageCacheManager.Instance.GetImageFilename(this); |
---|
23 | } |
---|
24 | return _imgSource; |
---|
25 | } |
---|
26 | } |
---|
27 | |
---|
28 | |
---|
29 | private Int32 _id; |
---|
30 | public Int32 Id |
---|
31 | { |
---|
32 | set { _id = value; OnPropertyChanged("Id"); } |
---|
33 | get { return _id; } |
---|
34 | } |
---|
35 | |
---|
36 | private Int32 _width; |
---|
37 | public Int32 Width |
---|
38 | { |
---|
39 | set { _width = value; OnPropertyChanged("Width"); } |
---|
40 | get { return _width; } |
---|
41 | } |
---|
42 | |
---|
43 | private Int32 _height; |
---|
44 | public Int32 Height |
---|
45 | { |
---|
46 | set { _height = value; OnPropertyChanged("Height"); } |
---|
47 | get { return _height; } |
---|
48 | } |
---|
49 | |
---|
50 | private String _file; |
---|
51 | public String File |
---|
52 | { |
---|
53 | set { _file = value; OnPropertyChanged("File"); } |
---|
54 | get { return _file; } |
---|
55 | } |
---|
56 | |
---|
57 | private Uri _urlThunb; |
---|
58 | public Uri UrlThunb |
---|
59 | { |
---|
60 | set { _urlThunb = value; OnPropertyChanged("UrlThunb"); } |
---|
61 | get { return _urlThunb; } |
---|
62 | } |
---|
63 | |
---|
64 | private Uri _urlElement; |
---|
65 | public Uri UrlElement |
---|
66 | { |
---|
67 | set { _urlElement = value; OnPropertyChanged("UrlElement"); } |
---|
68 | get { return _urlElement; } |
---|
69 | } |
---|
70 | |
---|
71 | private Uri _urlHighDef; |
---|
72 | public Uri UrlHighDef |
---|
73 | { |
---|
74 | set { _urlHighDef = value; OnPropertyChanged("UrlHighDef"); } |
---|
75 | get { return _urlHighDef; } |
---|
76 | } |
---|
77 | |
---|
78 | private Int64 _counter; |
---|
79 | public Int64 Counter |
---|
80 | { |
---|
81 | set { _counter = value; OnPropertyChanged("Counter"); } |
---|
82 | get { return _counter; } |
---|
83 | } |
---|
84 | |
---|
85 | private ObservableCollection<PwgTag> _tags; |
---|
86 | public ObservableCollection<PwgTag> Tags |
---|
87 | { |
---|
88 | set { _tags = value; OnPropertyChanged("Tags"); } |
---|
89 | get { return _tags; } |
---|
90 | } |
---|
91 | |
---|
92 | //public List<PwgCategoryWPF> Categories { get; set; } |
---|
93 | private ObservableCollection<PwgCategoryWPF> _categories; |
---|
94 | public ObservableCollection<PwgCategoryWPF> Categories |
---|
95 | { |
---|
96 | set { _categories = value; OnPropertyChanged("Categories"); } |
---|
97 | get { return _categories; } |
---|
98 | } |
---|
99 | public event PropertyChangedEventHandler PropertyChanged; |
---|
100 | private void OnPropertyChanged(String info) |
---|
101 | { |
---|
102 | if (PropertyChanged != null) |
---|
103 | PropertyChanged(this, new PropertyChangedEventArgs(info)); |
---|
104 | } |
---|
105 | } |
---|
106 | |
---|
107 | public class PwgImageRate : INotifyPropertyChanged |
---|
108 | { |
---|
109 | private Int32 _count; |
---|
110 | public Int32 Count |
---|
111 | { |
---|
112 | set { _count = value; OnPropertyChanged("Count"); } |
---|
113 | get { return _count; } |
---|
114 | } |
---|
115 | |
---|
116 | private Double _average; |
---|
117 | public Double Average |
---|
118 | { |
---|
119 | set { _average = value; OnPropertyChanged("Average"); } |
---|
120 | get { return _average; } |
---|
121 | } |
---|
122 | |
---|
123 | private Double _stdev; |
---|
124 | public Double Stdev |
---|
125 | { |
---|
126 | set { _stdev = value; OnPropertyChanged("Stdev"); } |
---|
127 | get { return _stdev; } |
---|
128 | } |
---|
129 | |
---|
130 | |
---|
131 | public event PropertyChangedEventHandler PropertyChanged; |
---|
132 | private void OnPropertyChanged(String info) |
---|
133 | { |
---|
134 | if (PropertyChanged != null) |
---|
135 | PropertyChanged(this, new PropertyChangedEventArgs(info)); |
---|
136 | } |
---|
137 | } |
---|
138 | } |
---|