Changeset 11905 for extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdConnect.cs
- Timestamp:
- Aug 4, 2011, 5:34:52 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdConnect.cs
r11904 r11905 12 12 public sealed class PwgCmdConnect : PwgCmdBase 13 13 { 14 public override bool CanExecute(object parameter)15 {16 Boolean retVal = false;17 if ( AppHelper.IsInDesignModeStatic == true)18 {19 retVal = false;20 }21 else22 {23 if ((PwgModelManager.Instance.Session != null)24 & (PwgModelManager.Instance.Session.ServeurName != null))25 {26 retVal = !String.IsNullOrWhiteSpace(PwgModelManager.Instance.Session.ServeurName);27 }28 }29 return (retVal);30 }31 32 14 public override void Execute(object parameter) 33 15 { 34 16 try { 17 IsRunning = true; 35 18 Uri uriServer = new Uri(PwgModelManager.Instance.Session.ServeurName); 36 19 … … 43 26 PwgSessionWPFHelper.AddPwgSessionInfoToPwgSessionWPF(sess, ref sesWPF); 44 27 45 List<PwgCategory> lstCat = PwgServiceProvider.Instance.PwgCategoriesService.GetListOfCategory(null, false, (PwgModelManager.Instance.Session.Status == PwgSessionStatusEnum.Guest));28 List<PwgCategory> lstCat = PwgServiceProvider.Instance.PwgCategoriesService.GetListOfCategory(null, false, null); //(PwgModelManager.Instance.Session.Status == PwgSessionStatusEnum.Guest) 46 29 PwgCategoryListWPF lstCatWPF = PwgModelManager.Instance.CategoryList; 47 30 … … 49 32 50 33 ImageCacheManager.Instance.SetCurrentServer(uriServer.AbsoluteUri); 34 IsRunning = false; 51 35 } 52 36 catch (PwgServiceException ex)
Note: See TracChangeset
for help on using the changeset viewer.