コード例 #1
0
        protected override void OnApplyTemplate()
        {
            _partImage            = GetTemplateChild("PART_Photo") as Image;
            _partName             = GetTemplateChild("PART_Name") as TextBlock;
            _partBio              = GetTemplateChild("PART_Bio") as TextBlock;
            _partTwitterLink      = GetTemplateChild("PART_TwitterLink") as HyperlinkButton;
            _partBlogLink         = GetTemplateChild("PART_BlogLink") as HyperlinkButton;
            _partRateReviewButton = GetTemplateChild("PART_RateReviewButton") as HyperlinkButton;
            _partFeedback         = GetTemplateChild("PART_Feedback") as HyperlinkButton;
            _partRateReminder     = GetTemplateChild("PART_RateReminder") as RateReminder;

            if (_partBio != null)
            {
                _partBio.Text = _bio;
            }

            if (_partRateReviewButton != null && _partRateReminder != null)
            {
                _partRateReviewButton.Click += (s, a) =>
                {
                    _partRateReminder.ShowPopup();
                };
            }


            base.OnApplyTemplate();
        }
コード例 #2
0
 private void RateReminder_TryReminderCompleted(object sender, AppPromo.RateReminderResult e)
 {
     if (e.Runs == RateReminder.RunsBeforeReminder && !e.RatingShown)
     {
         RateReminder.RunsBeforeReminder *= 2;
         RateReminder.ResetCounters();
     }
 }
コード例 #3
0
ファイル: MainPage.xaml.cs プロジェクト: ueman/AppPromo
 private void ResetCountersButton_Click(object sender, RoutedEventArgs e)
 {
     RateReminder.ResetCounters();
     DaysLabel.Text     = "0";
     RunsLabel.Text     = "0";
     ReminderLabel.Text = NotShownText;
     RatingLabel.Text   = NotShownText;
     ResetBlock.Text    = "Counters Reset";
 }
コード例 #4
0
 private void RateReminder_TryReminderCompleted(object sender, AppPromo.RateReminderResult e)
 {
     if (e.Runs == RateReminder.RunsBeforeReminder)
     {
         IsTryReminderCompleted = true;
         adsMob = new PhotoPuzzle.Advertising.AdsMob();
         if (!e.RatingShown)
         {
             RateReminder.RunsBeforeReminder *= 2;
             RateReminder.ResetCounters();
         }
     }
 }
コード例 #5
0
        // Constructor
        public ItemsShowcaseView()
        {
            InitializeComponent();

            DataContext = new ItemsShowcaseViewModel();
            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
            SearchBox.TextChanged += SearchBox_TextChanged;
            Loaded += ItemsShowcaseView_Loaded;

            if (AppSettings.EnablePhoneBackground8X == true)
            {
                LayoutRoot.Background         = Application.Current.Resources["WallPaperBrush"] as ImageBrush;
                LayoutRoot.Background.Opacity = .5;
            }

            if (AppSettings.EnableAppPromoRatingReminder)
            {
                RateReminder rateReminder = new RateReminder();
                rateReminder.RunsBeforeReminder = AppSettings.NumberOfRunsBeforeRateReminder;
                LayoutRoot.Children.Add(rateReminder);
            }

            if (AppSettings.EnablePubcenterAdsPhone8)
            {
                if (AppSettings.HideAdsIfPurchasedPhone8)
                {
                    if (!licenseInfo.IsTrial())
                    {
                        return;
                    }
                }

                var advertisingControlPlaceholder = new RowDefinition();
                advertisingControlPlaceholder.Height = new GridLength(80);
                LayoutRoot.RowDefinitions.Add(advertisingControlPlaceholder);
                var appbarSpacer = new RowDefinition();
                appbarSpacer.Height = new GridLength(30);
                LayoutRoot.RowDefinitions.Add(appbarSpacer);
                AdControl adControl = new AdControl(AppSettings.PubcenterApplicationIdPhone8, AppSettings.PubcenterAdUnitIdPhone8, true);
                adControl.Width  = 480;
                adControl.Height = 80;
                Grid.SetRow(adControl, 2);
                LayoutRoot.Children.Add(adControl);
            }
        }
コード例 #6
0
        public ItemsShowcaseView()
        {
            this.NavigationCacheMode = Windows.UI.Xaml.Navigation.NavigationCacheMode.Enabled;
            this.InitializeComponent();
            SettingsPane.GetForCurrentView().CommandsRequested += ShowPrivacyPolicy;
            Loaded += ItemsShowcaseView_Loaded;

            if (AppSettings.EnableBackgroundWin8X == true)
            {
                ShowcaseGrid.Background = Application.Current.Resources["WallPaperBrush"] as ImageBrush;
            }

            if (AppSettings.EnableAppPromoRatingReminder)
            {
                RateReminder rateReminder = new RateReminder();
                rateReminder.RunsBeforeReminder = AppSettings.NumberOfRunsBeforeRateReminder;
                ShowcaseGrid.Children.Add(rateReminder);
            }
        }
コード例 #7
0
        //Todo
        //AdControl adControl = new AdControl();

        public ItemsShowcaseView()
        {
            this.NavigationCacheMode = Windows.UI.Xaml.Navigation.NavigationCacheMode.Enabled;
            Loaded += ItemsShowcaseView_Loaded;
            this.InitializeComponent();
#if WINDOWS_APP
            if (AppSettings.EnableBackgroundWin8X == true)
            {
                ShowcaseGrid.Background = Application.Current.Resources["WallPaperHorizontalBrush"] as ImageBrush;
            }
#endif
#if WINDOWS_PHONE_APP
            if (AppSettings.EnablePhoneBackground8X == true)
            {
                if (AppSettings.EnableSingleVerticalLayoutPhone81)
                {
                    ShowcaseGrid.Background = Application.Current.Resources["WallPaperVerticalBrush"] as ImageBrush;
                }
                else
                {
                    ShowcaseGrid.Background = Application.Current.Resources["WallPaperVerticalBrush"] as ImageBrush;
                    HubControl.Background   = Application.Current.Resources["WallPaperHorizontalBrush"] as ImageBrush;
                }

                ShowcaseGrid.Background.Opacity = .5;
            }

            if (!AppSettings.EnableSingleVerticalLayoutPhone81)
            {
                titlePanel.Margin                 = new Thickness(0, 30, 0, 0);
                ZoomedOutGroupGridView.Margin     = new Thickness(12);
                ZoomedOutGroupGridView.Background = (SolidColorBrush)Application.Current.Resources["ApplicationPageBackgroundThemeBrush"];
            }
#endif

            if (AppSettings.EnableAppPromoRatingReminder)
            {
                RateReminder rateReminder = new RateReminder();
                rateReminder.RunsBeforeReminder = AppSettings.NumberOfRunsBeforeRateReminder;
                ShowcaseGrid.Children.Add(rateReminder);
            }
        }