private void UpdateBackgroundImage() { ImageCache cache = WebSession.ImageCache; cache.Deallocate(_backgroundImageID); if (Active) { _backgroundImageID = cache.Allocate(_backgroundImage); } else { _backgroundImageID = String.Empty; } }
protected override void InternalUpdateImage() { ImageCache cache = Session.Get(this).ImageCache; cache.Deallocate(_menuItem.ImageID); if (Action != null) { _menuItem.ImageID = cache.Allocate(Action.Image); } else { _menuItem.ImageID = String.Empty; } }
private void UpdateIconImage() { if (Active) { ImageCache cache = WebSession.ImageCache; cache.Deallocate(_iconImageID); if (Active) { _iconImageID = cache.Allocate(_iconImage); } else { _iconImageID = String.Empty; } } }
public Session(DataSession session, bool ownsConnection) : base(session, ownsConnection) { _imageCache = new ImageCache(Path.GetTempPath() + ImageCachePath, this); }