public static BaseLinkImagesContainer Create(ImageSourceGroup parent) { if (parent is FavoriteImageGroup) return new FavoritesImagesContainer(parent); if (parent is RegularImageGroup) return new RegularImagesContainer(parent); if (parent is SearchResultsImageGroup) return new SearchResultsImagesContainer(parent); throw new ArgumentOutOfRangeException("There is no container control for image group"); }
protected BaseLinkImagesContainer(ImageSourceGroup parent) { InitializeComponent(); _parent = parent; Text = _parent.Name; _parent.DataChanged += OnParentImageGroupChanged; imageListView.ItemClick += OnGalleryItemClick; imageListView.ItemDoubleClick += OnGalleryItemDoubleClick; imageListView.ItemHover += OnGalleryItemHover; imageListView.MouseDown += OnGalleryMouseDown; Disposed += OnDisposed; }
public FavoritesImagesContainer(ImageSourceGroup parent) : base(parent) {}
public RegularImagesContainer(ImageSourceGroup parent) : base(parent) { }
public void Release() { imageListView.ClearSelection(); imageListView.Items.Clear(); _parent = null; }
public SearchResultsImagesContainer(ImageSourceGroup parent) : base(parent) { PageVisible = false; }