Exemplo n.º 1
0
        protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
        {
            if (_BurnAdControl == null)
            {
                var highlight = new BurnAdViewModel
                    {
                        Logo = new Uri("/ApplicationIcon.png", UriKind.RelativeOrAbsolute),
                        Text1Line1 = "New Other App",
                        Text1Line2 = "you should download it",
                        Text2Line1 = "Best App Ever",
                        Text2Line2 = "really, help me",
                        DefaultCommand = new BuyAppCommand("the app id of the app you are highlighting")
                    };

                _BurnAdControl = new BurnAdControl(this, AdPanel, new BurnAdStartupParams {AppHighlight = highlight, DelayStartSeconds = 5d});
                _BurnAdControl.AdKeyWords = "my,keywords,for,the,ad,server";
                _BurnAdControl.AdServerRefreshSeconds = 40d;

                _BurnAdControl.AddInternalAd(new BurnAdViewModel
                    {
                        Text1Line1 = "Company Name",
                        Text1Line2 = "how are we doing?",
                        Text2Line1 = "how can we improve?",
                        Text2Line2 = "send us feedback",
                        DisplayRateThisApp = true,
                        DefaultCommand = new SendFeedbackCommand()
                    });
                _BurnAdControl.AddInternalAd(new BurnAdViewModel
                    {
                        Text1Line1 = "My Other App",
                        Text1Line2 = "small details",
                        Text2Line1 = "Cheeky Catchphrase",
                        Text2Line2 = "the punchline to hook them in",
                        DefaultCommand = new BuyAppCommand("My Other App Id")
                    });
            }
            base.OnNavigatedFrom(e);
        }
Exemplo n.º 2
0
 private void StartAppHighlight(BurnAdViewModel appHighlight)
 {
     _InternalAds.Add(appHighlight);
     RunInternalAds();
     _ErrorTimer.Start();
 }
Exemplo n.º 3
0
 public void RemoveInternalAd(BurnAdViewModel burnAd)
 {
     _InternalAds.Remove(burnAd);
 }
Exemplo n.º 4
0
 private BurnAdViewModel GetNextAdToDisplay()
 {
     var nextAd = _InternalAds.FirstOrDefault();
     if (nextAd != null)
     {
         _InternalAds.Remove(nextAd);
         _InternalAds.Add(nextAd);
         if (_LastViewModel == nextAd)
         {
             nextAd = _InternalAds.FirstOrDefault();
         }
         _LastViewModel = nextAd;
     }
     return nextAd;
 }
Exemplo n.º 5
0
 public void AddInternalAd(BurnAdViewModel burnAd)
 {
     _InternalAds.Add(burnAd);
 }