source: extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdProvider.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.0 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows.Input;
6
7namespace Com.Piwigo.Wpf.Command
8{
9    public static class PwgCmdProvider
10    {
11        public static AsyncCommand GetByType<T>()
12        {
13            AsyncCommand objICom;
14
15            switch (typeof(T).Name)
16            {
17                case "PwgCmdConnect":
18                    objICom = PwgCmdConnect;
19                    break;
20                case "PwgCmdDisconnect":
21                    objICom = PwgCmdDisconnect;
22                    break;
23                case "PwgCmdGetImageforCategory":
24                    objICom = PwgCmdGetImageforCategory;
25                    break;
26                default:
27                    objICom = null;
28                    break;
29            }
30
31            return objICom;
32        }
33
34        public static AsyncCommand _pwgCmdConnect;
35        public static AsyncCommand PwgCmdConnect
36        {
37            get
38            {
39                if (_pwgCmdConnect == null)
40                {
41                    _pwgCmdConnect = new PwgCmdConnect();
42                }
43                return _pwgCmdConnect;
44            }
45        }
46
47        public static AsyncCommand _pwgCmdDisconnect;
48        public static AsyncCommand PwgCmdDisconnect
49        {
50            get
51            {
52                if (_pwgCmdDisconnect == null)
53                {
54                    _pwgCmdDisconnect = new PwgCmdDisconnect();
55                }
56                return _pwgCmdDisconnect;
57            }
58        }
59
60        public static AsyncCommand _pwgCmdGetImageforCategory;
61        public static AsyncCommand PwgCmdGetImageforCategory
62        {
63            get
64            {
65                if (_pwgCmdGetImageforCategory == null)
66                {
67                    _pwgCmdGetImageforCategory = new PwgCmdGetImageforCategory();
68                }
69                return _pwgCmdGetImageforCategory;
70            }
71        }
72    }
73}
Note: See TracBrowser for help on using the repository browser.