private static void ShowWithLoader(string referrer, Action <Action <BackendResult <StockItem, ResultCode> >, CancellationToken> loadAction, long userOrChatId = 0, bool isChat = false) { CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(); FullscreenLoader fullscreenLoader = new FullscreenLoader(); fullscreenLoader.HideOnBackKeyPress = true; Action <FullscreenLoaderHiddenEventArgs> action = (Action <FullscreenLoaderHiddenEventArgs>)(args => cancellationTokenSource.Cancel()); fullscreenLoader.HiddenCallback = action; FullscreenLoader loader = fullscreenLoader; loader.Show(null, true); loadAction((Action <BackendResult <StockItem, ResultCode> >)(result => { loader.Hide(false); if (result.ResultCode == ResultCode.Succeeded) { Execute.ExecuteOnUIThread((Action)(() => StickersPackView.Show(result.ResultData, referrer, userOrChatId, isChat))); } else { GenericInfoUC.ShowBasedOnResult((int)result.ResultCode, "", (VKRequestsDispatcher.Error)null); } }), cancellationTokenSource.Token); }
private void OnTap(object sender, System.Windows.Input.GestureEventArgs e) { StockItemHeader dataContext = base.DataContext as StockItemHeader; if (dataContext == null) { return; } CurrentStickersPurchaseFunnelSource.Source = StickersPurchaseFunnelSource.keyboard; StickersPackView.Show(dataContext, "store"); }
private void OnTap(object sender, GestureEventArgs e) { StockItemHeader stockItemHeader = this.DataContext as StockItemHeader; if (stockItemHeader == null) { return; } CurrentStickersPurchaseFunnelSource.Source = StickersPurchaseFunnelSource.keyboard; StickersPackView.Show(stockItemHeader, "store"); }
private void StoreBanner_OnTap(object sender, System.Windows.Input.GestureEventArgs e) { StoreBannerHeader dataContext = ((FrameworkElement)sender).DataContext as StoreBannerHeader; if (dataContext == null) { return; } CurrentStickersPurchaseFunnelSource.Source = StickersPurchaseFunnelSource.banner; StickersPackView.Show(new StockItemHeader(dataContext.StockItem, false, 0, false), "store"); }
private void StoreBanner_OnTap(object sender, GestureEventArgs e) { StoreBannerHeader storeBannerHeader = ((FrameworkElement)sender).DataContext as StoreBannerHeader; if (storeBannerHeader == null) { return; } CurrentStickersPurchaseFunnelSource.Source = StickersPurchaseFunnelSource.banner; StickersPackView.Show(storeBannerHeader.StockItem, "store"); }
public static void Show(StockItem stockItem, string referrer, long userOrChatId = 0, bool isChat = false) { StickersPackView.Show(new StockItemHeader(stockItem, false, userOrChatId, isChat), referrer); }
public static void Show(StockItem stockItem, string referrer) { StickersPackView.Show(new StockItemHeader(stockItem, false), referrer); }