Example #1
0
        private void OnSelectionChanged(bool isMulti = false)
        {
            if (isMulti)
            {
                App.SupressBackEvent += HardwareButtonsOnBackPressed;
                UiBlockerUtility.BlockNavigation(false);
                SongList.IsItemClickEnabled = false;
                OptionButton.Visibility     = Visibility.Visible;
                SongViewer._showFlyout      = false;
                SelectCancelTextBlock.Text  = "Cancel";
                //SongList.SelectionMode = ListViewSelectionMode.Multiple;
            }

            else
            {
                App.SupressBackEvent -= HardwareButtonsOnBackPressed;
                UiBlockerUtility.Unblock();
                SongList.IsItemClickEnabled = true;
                OptionButton.Visibility     = Visibility.Collapsed;
                SongViewer._showFlyout      = true;
                SelectCancelTextBlock.Text  = "Select";
                //SongList.SelectionMode = ListViewSelectionMode.None;
            }
        }
Example #2
0
        private async void ButtonClick(object sender, RoutedEventArgs e)
        {
            var card = new AudioticaStripeCard
            {
                Name   = this.CardNameBox.Text,
                Number = this.CardNumBox.Text,
                Cvc    = this.CardSecurityCode.Text
            };

            var nameEmpty   = string.IsNullOrEmpty(card.Name);
            var numberEmpty = string.IsNullOrEmpty(card.Number);
            var cvcEmpty    = string.IsNullOrEmpty(card.Cvc);
            var expEmpty    = this.ExpMonthBox.SelectedIndex == -1 || this.ExpYearBox.SelectedIndex == -1;

            if (nameEmpty && numberEmpty && cvcEmpty && expEmpty)
            {
                CurtainPrompt.ShowError("You forgot to enter all your card information.");
            }
            else if (nameEmpty)
            {
                CurtainPrompt.ShowError("You forgot to enter the name on the card.");
            }
            else if (numberEmpty)
            {
                CurtainPrompt.ShowError("You forgot to enter the card's number.");
            }
            else if (cvcEmpty)
            {
                CurtainPrompt.ShowError("You forgot to enter the card's security code.");
            }
            else if (expEmpty)
            {
                CurtainPrompt.ShowError("You forgot to enter the card's expiration date.");
            }
            else
            {
                card.ExpMonth = int.Parse(this.ExpMonthBox.SelectedItem as string);
                card.ExpYear  = int.Parse(this.ExpYearBox.SelectedItem as string);

                var term = SubcriptionTimeFrame.Month;

                switch (this.PlanBox.SelectedIndex)
                {
                case 1:
                    term = SubcriptionTimeFrame.Biyear;
                    break;

                case 2:
                    term = SubcriptionTimeFrame.Year;
                    break;
                }

                UiBlockerUtility.Block("Subscribing...");
                var result =
                    await
                    App.Locator.AudioticaService.SubscribeAsync(
                        SubscriptionType.Silver,
                        term,
                        card,
                        this.CouponCode.Text.Trim());

                UiBlockerUtility.Unblock();

                if (result.Success)
                {
                    CurtainPrompt.Show("Welcome to the Cloud Club!");
                    App.Navigator.GoBack();
                }
                else
                {
                    CurtainPrompt.ShowError(result.Message);
                }
            }
        }
Example #3
0
 private static void HardwareButtons_BackPressed(object sender, BackRequestedEventArgs e)
 {
     UiBlockerUtility.Unblock();
     App.SupressBackEvent -= HardwareButtons_BackPressed;
     SheetUtility.CloseAddToPlaylistPage();
 }
Example #4
0
 private static void HardwareButtonsOnBackPressedForSearchCollection(object sender, BackRequestedEventArgs e)
 {
     UiBlockerUtility.Unblock();
     App.SupressBackEvent -= HardwareButtonsOnBackPressedForSearchCollection;
     CloseSearchCollectionPage();
 }
Example #5
0
 private static void HardwareButtonsOnBackPressedForColorViewPage(object sender, BackRequestedEventArgs e)
 {
     UiBlockerUtility.Unblock();
     App.SupressBackEvent -= HardwareButtonsOnBackPressedForColorViewPage;
     CloseColorViewPage();
 }
Example #6
0
 private static void HardwareButtonsOnBackPressed(object sender, BackRequestedEventArgs e)
 {
     UiBlockerUtility.Unblock();
     App.SupressBackEvent -= HardwareButtonsOnBackPressed;
     CloseNowPlaying();
 }
Example #7
0
 private static void HardwareButtonsOnBackPressedForAddAPlaylist(object sender, BackRequestedEventArgs e)
 {
     UiBlockerUtility.Unblock();
     App.SupressBackEvent -= HardwareButtonsOnBackPressedForAddAPlaylist;
     CloseAddAPlaylistPage();
 }