Beispiel #1
0
        public void OpenFile()
        {
            var ofn = new Microsoft.Win32.OpenFileDialog();

            ofn.Filter = CodecFactory.Instance.GenerateFilter();
            if (ofn.ShowDialog().Value)
            {
                if (AudioPlayer.OpenFile(ofn.FileName, (s) => VisualizationViewModel.InitializeVisualization(s)))
                {
                    TagViewModel.ResetTags();
                    TagViewModel.LoadTags(ofn.FileName);
                }
                else
                {
                    System.Windows.MessageBox.Show("Format not supported.");
                }
            }
        }