示例#1
0
        private void albumDetailListView_ItemPlayButton_Tapped(object sender, RoutedEventArgs e)
        {
            FrameworkElement senderElement;

            if ((senderElement = sender as FrameworkElement) != null &&
                senderElement.Tag is IndexedTrack)
            {
                Track target = ((IndexedTrack)senderElement.Tag).Track;

                if (AudioController.Default.UserMutatedQueue)
                {
                    // Prompt before replacement!
                    FlyoutDialog dialog = new FlyoutDialog();
                    dialog.Text = String.Format(LocalizationManager.GetString("Library/QueueWarning/Text_F"), target.Title);
                    dialog.Commands.Add(new Windows.UI.Popups.UICommand(
                                            LocalizationManager.GetString("Library/QueueWarning/Confirm"),
                                            (command) => AudioController.Default.ReplaceAll(target, CurrentSelection, true)
                                            ));
                    dialog.Show(sender as UIElement, PlacementMode.Top, ApplicationView.Value == ApplicationViewState.Snapped ? (double?)mainGrid.ActualWidth : null);
                }
                else
                {
                    AudioController.Default.ReplaceAll(target, CurrentSelection, true);
                }
            }
        }
示例#2
0
 private void shuffleAllButton_Tapped(object sender, RoutedEventArgs e)
 {
     if (AudioController.Default.UserMutatedQueue)
     {
         // Prompt before replacement!
         FlyoutDialog dialog = new FlyoutDialog();
         dialog.Text = String.Format(LocalizationManager.GetString("Library/QueueWarning/Text_F"), CurrentSelection.Title);
         dialog.Commands.Add(new Windows.UI.Popups.UICommand(
                                 LocalizationManager.GetString("Library/QueueWarning/Confirm"),
                                 (command) => AudioController.Default.ReplaceAll(CurrentSelection, true, true)
                                 ));
         dialog.Show(sender as UIElement, PlacementMode.Top, ApplicationView.Value == ApplicationViewState.Snapped ? (double?)mainGrid.ActualWidth : null);
     }
     else
     {
         AudioController.Default.ReplaceAll(CurrentSelection, true, true);
     }
 }
示例#3
0
		private void shuffleAllButton_Tapped(object sender, RoutedEventArgs e)
		{
			if (AudioController.Default.UserMutatedQueue)
			{
				// Prompt before replacement!
				FlyoutDialog dialog = new FlyoutDialog();
				dialog.Text = String.Format(LocalizationManager.GetString("Library/QueueWarning/Text_F"), CurrentSelection.Title);
				dialog.Commands.Add(new Windows.UI.Popups.UICommand(
						LocalizationManager.GetString("Library/QueueWarning/Confirm"),
						(command) => AudioController.Default.ReplaceAll(CurrentSelection, true, true)
					));
				dialog.Show(sender as UIElement, PlacementMode.Top, ApplicationView.Value == ApplicationViewState.Snapped ? (double?)mainGrid.ActualWidth : null);
			}
			else
			{
				AudioController.Default.ReplaceAll(CurrentSelection, true, true);
			}
		}
示例#4
0
		private void albumDetailListView_ItemPlayButton_Tapped(object sender, RoutedEventArgs e)
		{
			FrameworkElement senderElement;
			if ((senderElement = sender as FrameworkElement) != null
				&& senderElement.Tag is IndexedTrack)
			{
				Track target = ((IndexedTrack)senderElement.Tag).Track;

				if (AudioController.Default.UserMutatedQueue)
				{
					// Prompt before replacement!
					FlyoutDialog dialog = new FlyoutDialog();
					dialog.Text = String.Format(LocalizationManager.GetString("Library/QueueWarning/Text_F"), target.Title);
					dialog.Commands.Add(new Windows.UI.Popups.UICommand(
							LocalizationManager.GetString("Library/QueueWarning/Confirm"),
							(command) => AudioController.Default.ReplaceAll(target, CurrentSelection, true)
						));
					dialog.Show(sender as UIElement, PlacementMode.Top, ApplicationView.Value == ApplicationViewState.Snapped ? (double?)mainGrid.ActualWidth : null);
				}
				else
				{
					AudioController.Default.ReplaceAll(target, CurrentSelection, true);
				}
			}
		}