Exemplo n.º 1
0
        /// <summary>
        /// 自MP3文件导入曲目信息
        /// </summary>
        private void ImportMusicFromMP3File(ImportMusicType.ImportType importType)
        {
            OpenFileDialog dialog = new OpenFileDialog();
            dialog.Filter = "MP3文件|*.mp3";
            dialog.Title = "选择MP3文件";
            dialog.Multiselect = true;

            if (dialog.ShowDialog() == DialogResult.OK)
            {
                List<TrackSeries> Tracks = new List<TrackSeries>();
                string[] trackPaths = dialog.FileNames;

                ImportMusic import = new ImportMusic(importType, trackPaths);
                import.Show();
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 导入音乐
        /// </summary>
        /// <param name="type">导入方式</param>
        /// <param name="musicPath">音乐路径数组</param>
        public ImportMusic(ImportMusicType.ImportType type, string[] musicPath)
        {
            InitializeComponent();
            importType = type;

            if (importType == ImportMusicType.ImportType.ByOldMP3)
            {
                MusicDataGridView.Columns[OLDTRACKNOCLN].Visible = true;
            }

            ShowMusicInfo(musicPath);
        }