source: extensions/PiwigoLib/PiwigoWpf/DTO/PwgModelManager.cs @ 11922

Last change on this file since 11922 was 11922, checked in by bayral, 13 years ago

Async image thumbail retriving

File size: 2.3 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.ComponentModel;
6
7namespace 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
27        public class PwgModelManagerBase
28        {
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
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
64            public event PropertyChangedEventHandler PropertyChanged;
65            internal void OnPropertyChanged(String info)
66            {
67                if (PropertyChanged != null)
68                    PropertyChanged(this, new PropertyChangedEventArgs(info));
69            }
70        }
71
72       
73    }
74}
Note: See TracBrowser for help on using the repository browser.