- Timestamp:
- Aug 8, 2011, 6:57:56 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdGetImageforCategory.cs
r11911 r11922 10 10 namespace Com.Piwigo.Wpf.Command 11 11 { 12 public sealed class PwgCmdGetImageforCategory : PwgCmdBase12 public sealed class PwgCmdGetImageforCategory : AsyncCommand 13 13 { 14 public override void Execute(object parameter) 14 public override string Text { get { return "Get images for a category"; } } 15 16 protected override void OnExecute(object parameter) 15 17 { 16 18 PwgCategoryWPF catParam; … … 19 21 Int32 acount = 0; 20 22 21 try { 23 try 24 { 22 25 Uri uriServer = new Uri(PwgModelManager.Instance.Session.ServeurName); 23 26 if (parameter is PwgCategoryWPF) 24 27 { 28 PwgImageListWPF lstImgWPF = PwgModelManager.Instance.ImageList; 29 SendUiInfo("Removing image..."); 30 if (lstImgWPF != null) 31 { 32 lstImgWPF.Clear(); 33 } 34 25 35 catParam = (PwgCategoryWPF)parameter; 36 SendUiInfo("Setting up cache data..."); 26 37 ImageCacheManager.Instance.SetCurrentCategory(catParam.Id.ToString()); 27 38 39 SendUiInfo("Retriving images list from server..."); 28 40 List<PwgImage> lstImg = PwgServiceProvider.Instance.PwgCategoriesService.GetListOfImagesFormCategory(catParam.Id, false, null, null, null, null, null, null, null, null, null, null, null, null, null, true, ref aPage, ref aPerPage, ref acount); 29 PwgImageListWPF lstImgWPF = PwgModelManager.Instance.ImageList; 30 41 31 42 PwgImageListWPFHelper.ConvertPwgImageListToPwgImageListWPF(lstImg, ref lstImgWPF); 32 43 } 33 34 44 } 35 45 catch (PwgServiceException ex) 36 46 { 37 Console.WriteLine("Erreur " + ex.NumeroErr + " " + ex.MessageErr); 38 Console.WriteLine(ex.Message); 47 SendUiInfo("Error " + ex.NumeroErr + " " + ex.MessageErr); 39 48 } 40 41 49 } 42 50 }
Note: See TracChangeset
for help on using the changeset viewer.