[11904] | 1 | using System; |
---|
| 2 | using System.Collections.Generic; |
---|
| 3 | using System.Linq; |
---|
| 4 | using System.Text; |
---|
[11905] | 5 | using System.ComponentModel; |
---|
[11904] | 6 | |
---|
| 7 | namespace Com.Piwigo.Wpf.DTO |
---|
| 8 | { |
---|
| 9 | public sealed class PwgModelManager |
---|
| 10 | { |
---|
| 11 | static readonly PwgModelManagerBase _instance = new PwgModelManagerBase(); |
---|
| 12 | |
---|
| 13 | // Explicit static constructor to tell C# compiler |
---|
| 14 | // not to mark type as beforefieldinit |
---|
| 15 | static PwgModelManager() |
---|
| 16 | { |
---|
| 17 | } |
---|
| 18 | |
---|
| 19 | public static PwgModelManagerBase Instance |
---|
| 20 | { |
---|
| 21 | get |
---|
| 22 | { |
---|
| 23 | return _instance; |
---|
| 24 | } |
---|
| 25 | } |
---|
| 26 | |
---|
[11926] | 27 | public class PwgModelManagerBase : INotifyPropertyChanged |
---|
[11904] | 28 | { |
---|
[11922] | 29 | private AsyncObservableCollection<String> _lstMsgInfo = new AsyncObservableCollection<String>(); |
---|
| 30 | public AsyncObservableCollection<String> lstMsgInfo |
---|
| 31 | { |
---|
| 32 | set { _lstMsgInfo = value; OnPropertyChanged("lstMsgInfo"); } |
---|
| 33 | get { return _lstMsgInfo; } |
---|
| 34 | } |
---|
| 35 | |
---|
| 36 | private Boolean _booCmdRunning = false; |
---|
| 37 | public Boolean booCmdRunning |
---|
| 38 | { |
---|
| 39 | set { _booCmdRunning = value; OnPropertyChanged("booCmdRunning"); } |
---|
| 40 | get { return _booCmdRunning; } |
---|
| 41 | } |
---|
| 42 | |
---|
[11905] | 43 | private PwgImageListWPF _imageList; |
---|
| 44 | public PwgImageListWPF ImageList |
---|
| 45 | { |
---|
| 46 | set { _imageList = value; OnPropertyChanged("ImageList"); } |
---|
| 47 | get { return _imageList; } |
---|
| 48 | } |
---|
| 49 | |
---|
| 50 | private PwgSessionWPF _session; |
---|
| 51 | public PwgSessionWPF Session |
---|
| 52 | { |
---|
| 53 | set { _session = value; OnPropertyChanged("Session"); } |
---|
| 54 | get { return _session; } |
---|
| 55 | } |
---|
| 56 | |
---|
| 57 | private PwgCategoryListWPF _categoryList; |
---|
| 58 | public PwgCategoryListWPF CategoryList |
---|
| 59 | { |
---|
| 60 | set { _categoryList = value; OnPropertyChanged("CategoryList"); } |
---|
| 61 | get { return _categoryList; } |
---|
| 62 | } |
---|
| 63 | |
---|
[11926] | 64 | private PwgImageWPF _imageShown; |
---|
| 65 | public PwgImageWPF ImageShown |
---|
| 66 | { |
---|
| 67 | get { return _imageShown; } |
---|
| 68 | set { _imageShown = value; OnPropertyChanged("ImageShown"); } |
---|
| 69 | } |
---|
| 70 | |
---|
[11905] | 71 | public event PropertyChangedEventHandler PropertyChanged; |
---|
[11922] | 72 | internal void OnPropertyChanged(String info) |
---|
[11905] | 73 | { |
---|
| 74 | if (PropertyChanged != null) |
---|
| 75 | PropertyChanged(this, new PropertyChangedEventArgs(info)); |
---|
| 76 | } |
---|
[11904] | 77 | } |
---|
| 78 | } |
---|
| 79 | } |
---|