Beispiel #1
0
        public LimitsPopup(IProtoService protoService, PremiumState state, IList <PremiumLimit> limits)
        {
            InitializeComponent();

            Title = Strings.Resources.DoubledLimits;

            ScrollingHost.ItemsSource = limits;

            PurchaseCommand.Content = protoService.IsPremium
                ? Strings.Resources.OK
                : string.Format(Strings.Resources.SubscribeToPremium, Locale.FormatCurrency(state.MonthlyAmount, state.Currency));
        }
        public FeaturesPopup(IProtoService protoService, PremiumState state, IList <PremiumFeature> features, IDictionary <Type, Animation> animations, Stickers stickers, PremiumFeature selectedFeature)
        {
            InitializeComponent();

            _protoService = protoService;
            _animations   = animations;
            _stickers     = stickers;

            var items = features.Where(x => x is not PremiumFeatureIncreasedLimits).ToArray();

            Pager.NumberOfPages = items.Length;

            ScrollingHost.ItemsSource  = items;
            ScrollingHost.SelectedItem = selectedFeature;

            PurchaseCommand.Content = protoService.IsPremium
                ? Strings.Resources.OK
                : string.Format(Strings.Resources.SubscribeToPremium, Locale.FormatCurrency(state.MonthlyAmount, state.Currency));
        }