public override void ShownOnScreen() { DateTime now; if (this._userImageUri1 != null && this._userImageUri1.IsAbsoluteUri) { string originalString = this._userImageUri1.OriginalString; now = DateTime.Now; long ticks = now.Ticks; VeryLowProfileImageLoader.SetPriority(originalString, ticks); } if (this._userImageUri2 != null && this._userImageUri2.IsAbsoluteUri) { string originalString = this._userImageUri2.OriginalString; now = DateTime.Now; long ticks = now.Ticks; VeryLowProfileImageLoader.SetPriority(originalString, ticks); } if (!(this._userImageUri3 != null) || !this._userImageUri3.IsAbsoluteUri) { return; } string originalString1 = this._userImageUri3.OriginalString; now = DateTime.Now; long ticks1 = now.Ticks; VeryLowProfileImageLoader.SetPriority(originalString1, ticks1); }
public override void ShownOnScreen() { if (!(this._mapUri != null) || !this._mapUri.IsAbsoluteUri) { return; } VeryLowProfileImageLoader.SetPriority(this._mapUri.OriginalString, DateTime.Now.Ticks); }
public override void ReleaseResources() { VeryLowProfileImageLoader.SetUriSource(this.image1, null); if (this._docHeader2 == null) { return; } VeryLowProfileImageLoader.SetUriSource(this.image2, null); }
public override void LoadFullyNonVirtualizableItems() { VeryLowProfileImageLoader.SetUriSource(this.image1, this._docImageUri1); if (this._docHeader2 == null) { return; } VeryLowProfileImageLoader.SetUriSource(this.image2, this._docImageUri2); }
public override void ReleaseResources() { if (this._image == null) { return; } VeryLowProfileImageLoader.SetUriSource(this._image, null); ((Panel)this._imageContainer).Background = ((Brush)Application.Current.Resources["PhoneChromeBrush"]); }
private void UpdateState(bool animate = false) { if (this.CurrentDataContext == null || this.CurrentDataContext.IsEmoji) { base.Visibility = Visibility.Collapsed; } else { StoreProduct stickerProduct = this.CurrentDataContext.StickerProduct; if (stickerProduct == null) { return; } if (BatchDownloadManager.IsDownloaded(stickerProduct.id.ToString())) { base.Visibility = Visibility.Collapsed; } else { base.Visibility = Visibility.Visible; int id = stickerProduct.id; if (BatchDownloadManager.IsDownloading(id.ToString())) { ((UIElement)this.progressBar).Visibility = Visibility.Visible; ((UIElement)this.ButtonDownload).Opacity = 0.0; id = stickerProduct.id; double to = BatchDownloadManager.DownloadProgress(id.ToString()); if (!animate) { ProgressBar progressBar = this.progressBar; id = stickerProduct.id; double num = BatchDownloadManager.DownloadProgress(id.ToString()); ((RangeBase)progressBar).Value = num; } else { ((DependencyObject)this.progressBar).Animate(((RangeBase)this.progressBar).Value, to, RangeBase.ValueProperty, 100, new int?(), null, null); } } else { ((UIElement)this.progressBar).Visibility = Visibility.Collapsed; ((UIElement)this.ButtonDownload).Opacity = 1.0; ((RangeBase)this.progressBar).Value = 0.0; } Uri uriSource = VeryLowProfileImageLoader.GetUriSource(this.previewImage); if (uriSource == null || uriSource.OriginalString != stickerProduct.photo_140) { VeryLowProfileImageLoader.SetUriSource(this.previewImage, stickerProduct.photo_140 == null ? null : new Uri(stickerProduct.photo_140)); } this.textBlockAuthor.Text = (stickerProduct.author ?? ""); this.textBlockTitle.Text = (stickerProduct.title ?? ""); this.textBlockDesc.Text = (stickerProduct.description ?? ""); } } }
public override void ShownOnScreen() { string imageUrl = this._imageUrl; if ((imageUrl != null ? (imageUrl.ConvertToUri().IsAbsoluteUri ? 1 : 0) : 0) == 0) { return; } VeryLowProfileImageLoader.SetPriority(this._imageUrl, DateTime.Now.Ticks); }
public override void LoadFullyNonVirtualizableItems() { if (this._link.money_transfer == null) { VeryLowProfileImageLoader.SetUriSource(this.image, this._imageUrl.ConvertToUri()); } else { MultiResImageLoader.SetUriSource(this.image, this._imageUrl); } }
private void SaveState() { ConversationsViewModel.Save(); CountersManager.Current.Save(); AppGlobalStateManager.Current.SaveState(); CacheManager.TrySerialize((IBinarySerializable)ImageCache.Current, App._imageDictionaryKey, false, CacheManager.DataType.CachedData); VeryLowProfileImageLoader.SaveState(); SubscriptionFromPostManager.Instance.Save(); ConversationViewModelCache.Current.FlushToPersistentStorage(); AudioCacheManager.Instance.Save(); MediaLRUCache.Instance.Save(); StickersAutoSuggestDictionary.Instance.SaveState(); }
public override void LoadFullyNonVirtualizableItems() { if (this._image == null) { return; } if (this._newsfeed.layout == UserNotificationNewsfeedLayout.banner) { ((Panel)this._imageContainer).Background = ((Brush)Application.Current.Resources["PhoneChromeBrush"]); this._image.ImageOpened -= (new EventHandler <RoutedEventArgs>(this.OnImageOpened)); this._image.ImageOpened += (new EventHandler <RoutedEventArgs>(this.OnImageOpened)); } VeryLowProfileImageLoader.SetUriSource(this._image, this._imageUri); }
public override void ReleaseResources() { VeryLowProfileImageLoader.SetUriSource(this.imageMap, null); }
public override void LoadFullyNonVirtualizableItems() { VeryLowProfileImageLoader.SetUriSource(this.imageMap, this._mapUri); }
public override void LoadFullyNonVirtualizableItems() { VeryLowProfileImageLoader.SetUriSource(this.imageUser1, this._userImageUri1); VeryLowProfileImageLoader.SetUriSource(this.imageUser2, this._userImageUri2); VeryLowProfileImageLoader.SetUriSource(this.imageUser3, this._userImageUri3); }
public override void LoadFullyNonVirtualizableItems() { VeryLowProfileImageLoader.SetUriSource(this.imageGroupPhoto, this._groupPhotoUri); }