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
RevLine 
[7150]1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Windows.Input;
6
7namespace Com.Piwigo.Wpf.Command
8{
[7160]9    public static class PwgCmdProvider
[7150]10    {
[11922]11        public static AsyncCommand GetByType<T>()
[7150]12        {
[11922]13            AsyncCommand objICom;
[11911]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
[11922]34        public static AsyncCommand _pwgCmdConnect;
35        public static AsyncCommand PwgCmdConnect
[11911]36        {
[7150]37            get
38            {
39                if (_pwgCmdConnect == null)
40                {
41                    _pwgCmdConnect = new PwgCmdConnect();
42                }
43                return _pwgCmdConnect;
44            }
45        }
[11911]46
[11922]47        public static AsyncCommand _pwgCmdDisconnect;
48        public static AsyncCommand PwgCmdDisconnect
[11911]49        {
50            get
51            {
52                if (_pwgCmdDisconnect == null)
53                {
54                    _pwgCmdDisconnect = new PwgCmdDisconnect();
55                }
56                return _pwgCmdDisconnect;
57            }
58        }
59
[11922]60        public static AsyncCommand _pwgCmdGetImageforCategory;
61        public static AsyncCommand PwgCmdGetImageforCategory
[11911]62        {
63            get
64            {
65                if (_pwgCmdGetImageforCategory == null)
66                {
67                    _pwgCmdGetImageforCategory = new PwgCmdGetImageforCategory();
68                }
69                return _pwgCmdGetImageforCategory;
70            }
71        }
[7150]72    }
73}
Note: See TracBrowser for help on using the repository browser.