Ignore:
Timestamp:
Aug 12, 2011, 4:32:33 PM (13 years ago)
Author:
bayral
Message:

root category handled

Location:
extensions/PiwigoLib/PiwigoWpf/Command
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdConnect.cs

    r11922 r11935  
    3636                PwgSessionWPFHelper.AddPwgSessionInfoToPwgSessionWPF(sess, ref sesWPF);
    3737
    38                 List<PwgCategory> lstCat = PwgServiceProvider.Instance.PwgCategoriesService.GetListOfCategory(null, false, null); //(PwgModelManager.Instance.Session.Status == PwgSessionStatusEnum.Guest)
    39                 PwgCategoryListWPF lstCatWPF = PwgModelManager.Instance.CategoryList;
     38                PwgCategoryListWPFHelper.InitRootCategory();
    4039
    41                 PwgCategoryListWPFHelper.ConvertPwgCategoryListToPwgCategoryListWPF(lstCat, ref lstCatWPF);
     40                List<PwgCategory> lstCat = PwgServiceProvider.Instance.PwgCategoriesService.GetListOfCategory(null, null, null); //(PwgModelManager.Instance.Session.Status == PwgSessionStatusEnum.Guest)
     41                PwgRootCategoryWPF aRootCatWPF = PwgModelManager.Instance.RootCategoryList;
     42
     43                PwgCategoryListWPFHelper.ConvertPwgCategoryListToPwgRootCategoryWPF(lstCat, ref aRootCatWPF);
     44                aRootCatWPF.IsExpanded = true;
    4245
    4346                SendUiInfo("Setting up cache data ...");
  • extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdDisconnect.cs

    r11922 r11935  
    3232                }
    3333
     34                if ((PwgModelManager.Instance.CategoryList != null)
     35                    && (PwgModelManager.Instance.RootCategoryList != null))
     36                {
     37                    PwgModelManager.Instance.RootCategoryList.Childrens.Clear();
     38                }
     39
    3440                if (PwgModelManager.Instance.CategoryList != null)
    3541                {
  • extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdGetImageforCategory.cs

    r11922 r11935  
    2828                    PwgImageListWPF lstImgWPF = PwgModelManager.Instance.ImageList;
    2929                    SendUiInfo("Removing image...");
     30                    PwgModelManager.Instance.ImageShown = null;
    3031                    if (lstImgWPF != null)
    3132                    {
  • extensions/PiwigoLib/PiwigoWpf/Command/PwgCmdProvider.cs

    r11922 r11935  
    2424                    objICom = PwgCmdGetImageforCategory;
    2525                    break;
     26                case "PwgCmdGetSubCategorieforCategory":
     27                    objICom = PwgCmdGetSubCategorieforCategory;
     28                    break;
    2629                default:
    27                     objICom = null;
    28                     break;
     30                    throw new ArgumentException("AsyncCommand GetByType : Command Type unknow.", "Type");
    2931            }
    3032
     
    7072            }
    7173        }
     74
     75        public static AsyncCommand _pwgCmdGetSubCategorieforCategory;
     76        public static AsyncCommand PwgCmdGetSubCategorieforCategory
     77        {
     78            get
     79            {
     80                if (_pwgCmdGetSubCategorieforCategory == null)
     81                {
     82                    _pwgCmdGetSubCategorieforCategory = new PwgCmdGetSubCategorieforCategory();
     83                }
     84                return _pwgCmdGetSubCategorieforCategory;
     85            }
     86        }
     87
    7288    }
    7389}
Note: See TracChangeset for help on using the changeset viewer.