Exemple #1
0
        public void LoadFile(string path)
        {
            _id3v1 = new ID3v1Tag(path);

            txtFilename.Text       = Path.GetFileName(path);
            txtArtist.Text         = _id3v1.Artist;
            txtTitle.Text          = _id3v1.Title;
            txtAlbum.Text          = _id3v1.Album;
            cmbGenre.SelectedIndex = cmbGenre.Items.IndexOf(GenreHelper.GenreByIndex[_id3v1.GenreIndex]);
            txtYear.Text           = _id3v1.Year;
            txtComment.Text        = _id3v1.Comment;
            if (_id3v1.TrackNumber > 0)
            {
                txtTrackNumber.Text = _id3v1.TrackNumber.ToString();
            }
            else
            {
                txtTrackNumber.Text = string.Empty;
            }

            switch (_id3v1.TagVersion)
            {
            case ID3v1TagVersion.ID3v10:
                cmbID3v1.SelectedIndex = cmbID3v1.Items.IndexOf("ID3v1.0");
                break;

            case ID3v1TagVersion.ID3v11:
                cmbID3v1.SelectedIndex = cmbID3v1.Items.IndexOf("ID3v1.1");
                break;
            }
        }
        public void LoadFile(string path)
        {
            _id3v1 = new ID3v1Tag(path);

            txtFilename.Text = Path.GetFileName(path);
            txtArtist.Text = _id3v1.Artist;
            txtTitle.Text = _id3v1.Title;
            txtAlbum.Text = _id3v1.Album;
            cmbGenre.SelectedIndex = cmbGenre.Items.IndexOf(GenreHelper.GenreByIndex[_id3v1.GenreIndex]);
            txtYear.Text = _id3v1.Year;
            txtComment.Text = _id3v1.Comment;
            if (_id3v1.TrackNumber > 0)
                txtTrackNumber.Text = _id3v1.TrackNumber.ToString();
            else
                txtTrackNumber.Text = string.Empty;

            switch (_id3v1.TagVersion)
            {
                case ID3v1TagVersion.ID3v10:
                    cmbID3v1.SelectedIndex = cmbID3v1.Items.IndexOf("ID3v1.0");
                    break;
                case ID3v1TagVersion.ID3v11:
                    cmbID3v1.SelectedIndex = cmbID3v1.Items.IndexOf("ID3v1.1");
                    break;
            }
        }
Exemple #3
0
        private void OnLoadFile(string fileName)
        {
            _id3v1 = new ID3v1Tag(fileName);

            _fullFileName = fileName;
            FileName      = Path.GetFileName(fileName);
            SendPropertyChanged("Artist");
            SendPropertyChanged("Title");
            SendPropertyChanged("Album");
            SendPropertyChanged("Genre");
            SendPropertyChanged("Year");
            SendPropertyChanged("Track");
            SendPropertyChanged("Comment");
            SendPropertyChanged("ID3v1Version");

            CanSave = true;
        }
        private void OnLoadFile(string fileName)
        {
            _id3v1 = new ID3v1Tag(fileName);

            _fullFileName = fileName;
            FileName = Path.GetFileName(fileName);
            SendPropertyChanged("Artist");
            SendPropertyChanged("Title");
            SendPropertyChanged("Album");
            SendPropertyChanged("Genre");
            SendPropertyChanged("Year");
            SendPropertyChanged("Track");
            SendPropertyChanged("Comment");
            SendPropertyChanged("ID3v1Version");

            CanSave = true;
        }