[7150] | 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 | { |
---|
[11926] | 14 | private String _imgSourceThumb; |
---|
| 15 | public String ImgSourceThumb |
---|
| 16 | { |
---|
| 17 | set { _imgSourceThumb = value; OnPropertyChanged("ImgSourceThumb"); } |
---|
| 18 | get |
---|
| 19 | { |
---|
| 20 | if (_imgSourceThumb == null) |
---|
| 21 | { |
---|
| 22 | _imgSourceThumb = Com.Piwigo.Wpf.Service.ImageCacheManager.Instance.GetImageFilename(this, "Thumb"); |
---|
| 23 | } |
---|
| 24 | return _imgSourceThumb; |
---|
| 25 | } |
---|
| 26 | } |
---|
| 27 | |
---|
[11922] | 28 | private String _imgSource; |
---|
| 29 | public String ImgSource |
---|
| 30 | { |
---|
| 31 | set { _imgSource = value; OnPropertyChanged("ImgSource"); } |
---|
| 32 | get |
---|
| 33 | { |
---|
| 34 | if (_imgSource == null) |
---|
| 35 | { |
---|
[11926] | 36 | _imgSource = Com.Piwigo.Wpf.Service.ImageCacheManager.Instance.GetImageFilename(this, "LowRes"); |
---|
[11922] | 37 | } |
---|
| 38 | return _imgSource; |
---|
| 39 | } |
---|
| 40 | } |
---|
| 41 | |
---|
[11926] | 42 | private bool isSelected = false; |
---|
| 43 | public bool IsSelected |
---|
| 44 | { |
---|
| 45 | get { return isSelected; } |
---|
| 46 | set { isSelected = value; OnPropertyChanged("IsSelected"); } |
---|
| 47 | } |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | |
---|
[7150] | 51 | private Int32 _id; |
---|
| 52 | public Int32 Id |
---|
| 53 | { |
---|
| 54 | set { _id = value; OnPropertyChanged("Id"); } |
---|
| 55 | get { return _id; } |
---|
| 56 | } |
---|
| 57 | |
---|
| 58 | private Int32 _width; |
---|
| 59 | public Int32 Width |
---|
| 60 | { |
---|
| 61 | set { _width = value; OnPropertyChanged("Width"); } |
---|
| 62 | get { return _width; } |
---|
| 63 | } |
---|
| 64 | |
---|
| 65 | private Int32 _height; |
---|
| 66 | public Int32 Height |
---|
| 67 | { |
---|
| 68 | set { _height = value; OnPropertyChanged("Height"); } |
---|
| 69 | get { return _height; } |
---|
| 70 | } |
---|
| 71 | |
---|
| 72 | private String _file; |
---|
| 73 | public String File |
---|
| 74 | { |
---|
| 75 | set { _file = value; OnPropertyChanged("File"); } |
---|
| 76 | get { return _file; } |
---|
| 77 | } |
---|
| 78 | |
---|
| 79 | private Uri _urlThunb; |
---|
| 80 | public Uri UrlThunb |
---|
| 81 | { |
---|
| 82 | set { _urlThunb = value; OnPropertyChanged("UrlThunb"); } |
---|
| 83 | get { return _urlThunb; } |
---|
| 84 | } |
---|
| 85 | |
---|
| 86 | private Uri _urlElement; |
---|
| 87 | public Uri UrlElement |
---|
| 88 | { |
---|
| 89 | set { _urlElement = value; OnPropertyChanged("UrlElement"); } |
---|
| 90 | get { return _urlElement; } |
---|
| 91 | } |
---|
| 92 | |
---|
| 93 | private Uri _urlHighDef; |
---|
| 94 | public Uri UrlHighDef |
---|
| 95 | { |
---|
| 96 | set { _urlHighDef = value; OnPropertyChanged("UrlHighDef"); } |
---|
| 97 | get { return _urlHighDef; } |
---|
| 98 | } |
---|
| 99 | |
---|
| 100 | private Int64 _counter; |
---|
| 101 | public Int64 Counter |
---|
| 102 | { |
---|
| 103 | set { _counter = value; OnPropertyChanged("Counter"); } |
---|
| 104 | get { return _counter; } |
---|
| 105 | } |
---|
| 106 | |
---|
| 107 | private ObservableCollection<PwgTag> _tags; |
---|
| 108 | public ObservableCollection<PwgTag> Tags |
---|
| 109 | { |
---|
| 110 | set { _tags = value; OnPropertyChanged("Tags"); } |
---|
| 111 | get { return _tags; } |
---|
| 112 | } |
---|
| 113 | |
---|
| 114 | //public List<PwgCategoryWPF> Categories { get; set; } |
---|
| 115 | private ObservableCollection<PwgCategoryWPF> _categories; |
---|
| 116 | public ObservableCollection<PwgCategoryWPF> Categories |
---|
| 117 | { |
---|
| 118 | set { _categories = value; OnPropertyChanged("Categories"); } |
---|
| 119 | get { return _categories; } |
---|
| 120 | } |
---|
| 121 | public event PropertyChangedEventHandler PropertyChanged; |
---|
| 122 | private void OnPropertyChanged(String info) |
---|
| 123 | { |
---|
| 124 | if (PropertyChanged != null) |
---|
| 125 | PropertyChanged(this, new PropertyChangedEventArgs(info)); |
---|
| 126 | } |
---|
| 127 | } |
---|
| 128 | |
---|
| 129 | public class PwgImageRate : INotifyPropertyChanged |
---|
| 130 | { |
---|
| 131 | private Int32 _count; |
---|
| 132 | public Int32 Count |
---|
| 133 | { |
---|
| 134 | set { _count = value; OnPropertyChanged("Count"); } |
---|
| 135 | get { return _count; } |
---|
| 136 | } |
---|
| 137 | |
---|
| 138 | private Double _average; |
---|
| 139 | public Double Average |
---|
| 140 | { |
---|
| 141 | set { _average = value; OnPropertyChanged("Average"); } |
---|
| 142 | get { return _average; } |
---|
| 143 | } |
---|
| 144 | |
---|
| 145 | private Double _stdev; |
---|
| 146 | public Double Stdev |
---|
| 147 | { |
---|
| 148 | set { _stdev = value; OnPropertyChanged("Stdev"); } |
---|
| 149 | get { return _stdev; } |
---|
| 150 | } |
---|
| 151 | |
---|
| 152 | |
---|
| 153 | public event PropertyChangedEventHandler PropertyChanged; |
---|
| 154 | private void OnPropertyChanged(String info) |
---|
| 155 | { |
---|
| 156 | if (PropertyChanged != null) |
---|
| 157 | PropertyChanged(this, new PropertyChangedEventArgs(info)); |
---|
| 158 | } |
---|
| 159 | } |
---|
| 160 | } |
---|