Rev | Line | |
---|
[7150] | 1 | using System; |
---|
| 2 | using System.Collections.Generic; |
---|
| 3 | using System.Linq; |
---|
| 4 | using System.Text; |
---|
| 5 | using System.Windows.Input; |
---|
| 6 | |
---|
| 7 | namespace 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.