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

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

firsts steps of wpf client

File size: 1.7 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 PwgImageListWPF _imageList;
30            public PwgImageListWPF ImageList
31            {
32                set { _imageList = value; OnPropertyChanged("ImageList"); }
33                get { return _imageList; }
34            }
35
36            private PwgSessionWPF _session;
37            public PwgSessionWPF Session
38            {
39                set { _session = value; OnPropertyChanged("Session"); }
40                get { return _session; }
41            }
42
43            private PwgCategoryListWPF _categoryList;
44            public PwgCategoryListWPF CategoryList
45            {
46                set { _categoryList = value; OnPropertyChanged("CategoryList"); }
47                get { return _categoryList; }
48            }
49
50            public event PropertyChangedEventHandler PropertyChanged;
51            private void OnPropertyChanged(String info)
52            {
53                if (PropertyChanged != null)
54                    PropertyChanged(this, new PropertyChangedEventArgs(info));
55            }
56        }
57
58       
59    }
60}
Note: See TracBrowser for help on using the repository browser.