Example #1
0
        public static List <GUIListItem> Items(this GUIFacadeControl self)
        {
            if (self.ListLayout() != null)
            {
                return(self.ListLayout().ListItems);
            }
            if (self.AlbumListLayout() != null)
            {
                return(self.AlbumListLayout().ListItems);
            }

            // if the skin does not implement the list control we are out of luck :(
            return(null);
        }
Example #2
0
 /// <summary>
 /// Sets the specified visible property on the facade and all children lists
 /// </summary>
 /// <param name="self"></param>
 /// <param name="value"></param>
 public static void Visible(this GUIFacadeControl self, bool value)
 {
     self.Visible = value;
     if (self.ListLayout() != null)
     {
         self.ListLayout().Visible = value;
     }
     if (self.ThumbnailLayout() != null)
     {
         self.ThumbnailLayout().Visible = value;
     }
     if (self.AlbumListLayout() != null)
     {
         self.AlbumListLayout().Visible = value;
     }
     if (self.FilmstripLayout() != null)
     {
         self.FilmstripLayout().Visible = value;
     }
     if (self.CoverFlowLayout != null)
     {
         self.CoverFlowLayout.Visible = value;
     }
 }
Example #3
0
 /// <summary>
 /// Performs clear on the facade and all children lists
 /// </summary>
 /// <param name="self"></param>
 public static void ClearAll(this GUIFacadeControl self)
 {
     self.Clear();
     if (self.ListLayout() != null)
     {
         self.ListLayout().Clear();
     }
     if (self.ThumbnailLayout() != null)
     {
         self.ThumbnailLayout().Clear();
     }
     if (self.FilmstripLayout() != null)
     {
         self.FilmstripLayout().Clear();
     }
     if (self.AlbumListLayout() != null)
     {
         self.AlbumListLayout().Clear();
     }
     if (self.CoverFlowLayout != null)
     {
         self.CoverFlowLayout.Clear();
     }
 }
Example #4
0
 /// <summary>
 /// Get a value indicating wether the given control is related to this facade
 /// </summary>
 /// <param name="self"></param>
 /// <param name="parent">GUIControl instance to check</param>
 /// <returns>True if the control is related</returns>
 public static bool IsRelated(this GUIFacadeControl self, GUIControl parent)
 {
     return(parent == self || parent == self.FilmstripLayout() || parent == self.CoverFlowLayout || parent == self.ThumbnailLayout() || parent == self.ListLayout() || parent == self.AlbumListLayout());
 }