Beispiel #1
0
 private void Open_Executed(object sender, ExecutedRoutedEventArgs e)
 {
     if (dialogService.OpenFileDialog("XML-файлы (*.xml)|*.xml|Все файлы (*.*)|*.*"))
     {
         DataContext = SongListFabric.LoadFromRss(dialogService.FileName);
     }
 }
Beispiel #2
0
        public MainWindow()
        {
            DataContext = SongListFabric.LoadFromRss(AppleRssUri);

            dialogService = new DefaultDialogService();

            InitializeComponent();

            audioPlayerController = new DefaultAudioPlayerController(myMediaElement);

            audioPlayerController.MediaFailed += MediaPlayer_MediaFailed;
            audioPlayerController.MediaOpened += MediaPlayer_Updated;
            audioPlayerController.MediaEnded  += MediaPlayer_Updated;

            PlayerControlPanel.DataContext = audioPlayerController;
        }