- Timestamp:
- Aug 5, 2011, 5:00:07 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdProvider.cs
r7160 r11911 9 9 public static class PwgCmdProvider 10 10 { 11 public static ICommand _pwgCmdConnect; 12 public static ICommand PwgCmdConnect 11 public static PwgCmdBase GetByType<T>() 12 { 13 PwgCmdBase 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 PwgCmdBase _pwgCmdConnect; 35 public static PwgCmdBase PwgCmdConnect 13 36 { 14 37 get … … 21 44 } 22 45 } 46 47 public static PwgCmdBase _pwgCmdDisconnect; 48 public static PwgCmdBase PwgCmdDisconnect 49 { 50 get 51 { 52 if (_pwgCmdDisconnect == null) 53 { 54 _pwgCmdDisconnect = new PwgCmdDisconnect(); 55 } 56 return _pwgCmdDisconnect; 57 } 58 } 59 60 public static PwgCmdBase _pwgCmdGetImageforCategory; 61 public static PwgCmdBase PwgCmdGetImageforCategory 62 { 63 get 64 { 65 if (_pwgCmdGetImageforCategory == null) 66 { 67 _pwgCmdGetImageforCategory = new PwgCmdGetImageforCategory(); 68 } 69 return _pwgCmdGetImageforCategory; 70 } 71 } 23 72 } 24 73 }
Note: See TracChangeset
for help on using the changeset viewer.