Exemplo n.º 1
0
        private void Done_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (CurrentApp.LicenseInformation.ProductLicenses["allstuff1"].IsActive)
                {
                    string temp = (myFlip.SelectedItem as LocalFVItem).Tag;

                    ApplicationData.Current.LocalSettings.Values["AppTheme"] =
                        String.Format("ms-appx:///themes/{0}.xaml", temp);
                    Application.Current.Resources.Source =
                       new Uri("ms-appx:///themes/" + temp + ".xaml");

                    this.Frame.Navigate(typeof(MainPage));
                }
                else
                {
                    Services.PurchasingService es = new Services.PurchasingService();
                    eServices.OfferPurchase("Unlicensed", "UnlicensedTitle");
                    Frame.Navigate(typeof(SettingsPage));
                }
            }
            catch (Exception ex)
            {
                eServices.MyMessage(ex.Message);
            }
        }
Exemplo n.º 2
0
        public StylesPage()
        {
            this.InitializeComponent();

            eServices = new PurchasingService();
            SampleDataSource sds = new SampleDataSource();
            myFlip.ItemsSource = sds.Items;
        }             
Exemplo n.º 3
0
        public StylesPage()
        {
            this.InitializeComponent();
            this.NavigationCacheMode = NavigationCacheMode.Disabled;

            HardwareButtons.BackPressed += HardwareButtons_BackPressed;
            eServices = new Services.PurchasingService();
        }
        public BaseSettingsFlyout()
        {
            this.InitializeComponent();

            ssServices = new SharedSettingsServices();
            pService = new PurchasingService();

            //enable task toggles
            foreach (var task in BackgroundTaskRegistration.AllTasks)
            {
                if (task.Value.Name == "TileBackgroundTask")
                {
                    ssServices.IsTileSet = true;
                    tileToggle.IsOn = true;
                }
                if (task.Value.Name == "ToastBackgroundTask")
                {
                    toastToggle.IsOn = true;
                    comboPeriod.IsEnabled = false;
                    comboToast.IsEnabled = false;
                }
                if (task.Value.Name == "SmartTileBackgroundTask")
                {
                    ssServices.IsSmartTileSet = true;
                    smartTileToggle.IsOn = true;
                    comboAmount.IsEnabled = false;
                }
            }

            //shopping toggles
            if (pService.License.ProductLicenses[PurchasingService.ALL_STUFF].IsActive)
            {
                allBuy.IsOn = true;
                allBuy.IsEnabled = false;
                bgBuy.IsEnabled = false;
            }
            else if (pService.License.ProductLicenses[PurchasingService.BACKGROUND_SERVICES].IsActive)
            {
                bgBuy.IsOn = true;
                bgBuy.IsEnabled = false;
            }

            //services
            if (LocalDataManager.Services != null && LocalDataManager.Services.Contains("google"))
            {
                ssServices.IsGoogleService = true;
                googleToggle.IsOn = true;
                googleToggle.IsEnabled = true;
                comboGooglePeriod.IsEnabled = false;
            }
        }
Exemplo n.º 5
0
        public SettingsPage()
        {
            this.InitializeComponent();
            this.NavigationCacheMode = NavigationCacheMode.Disabled;
            HardwareButtons.BackPressed += HardwareButtons_BackPressed;

            ssServices = new SharedSettingsServices();
            pService = new PurchasingService();
            
            //enable toggles
            foreach (var task in BackgroundTaskRegistration.AllTasks)
            {
                if (task.Value.Name == "TileBackgroundTask")
                {
                    ssServices.IsTileSet = true;
                    tileToggle.IsOn = true;
                }
                if (task.Value.Name == "ToastBackgroundTask")
                {
                    toastToggle.IsOn = true;
                    comboPeriod.IsEnabled = false;
                    comboToast.IsEnabled = false;
                }
                if (task.Value.Name == "SmartTileBackgroundTask")
                {
                    ssServices.IsSmartTileSet = true;
                    smartTileToggle.IsOn = true;
                    comboAmount.IsEnabled = false;
                }
            }

            //shopping toggles
            if (pService.License.ProductLicenses[PurchasingService.ALL_STUFF].IsActive)
            {
                allBuy.IsOn = true;
                allBuy.IsEnabled = false;
                bgBuy.IsEnabled = false;
            }
            else if (pService.License.ProductLicenses[PurchasingService.BACKGROUND_SERVICES].IsActive)
            {
                bgBuy.IsOn = true;
                bgBuy.IsEnabled = false;
            }
        }