Update of /cvsroot/jvcl/dev/JVCL3/examples/JvID3v2 In directory sc8-pr-cvs1:/tmp/cvs-serv4702/JVCL3/examples/JvID3v2 Added Files: JvID3v2Demo.dof JvID3v2Demo.dpr JvID3v2Demo.res JvID3v2EditFormU.dfm JvID3v2EditFormU.pas JvID3v2MainFormU.dfm JvID3v2MainFormU.pas Log Message: - Copied jvcl/devtools and jvcl/examples dev/JVCL3 - Copied JVCLConvert *.dat files to dev/JVCL3/converter --- NEW FILE: JvID3v2Demo.dof --- [Directories] OutputDir=..\..\Bin UnitOutputDir=..\..\Dcu SearchPath=..\..\Source;..\..\Common --- NEW FILE: JvID3v2Demo.dpr --- program JvID3v2Demo; uses Forms, JvID3v2MainFormU in 'JvID3v2MainFormU.pas' {JvID3v2MainForm}, JvID3v2EditFormU in 'JvID3v2EditFormU.pas' {JvID3v2EditForm}; {$R *.res} begin Application.Initialize; Application.CreateForm(TJvID3v2MainForm, JvID3v2MainForm); Application.Run; end. --- NEW FILE: JvID3v2Demo.res --- (This appears to be a binary file; contents omitted.) --- NEW FILE: JvID3v2EditFormU.dfm --- object JvID3v2EditForm: TJvID3v2EditForm Left = 345 Top = 248 BorderStyle = bsDialog Caption = 'JvID3v2EditForm' ClientHeight = 348 ClientWidth = 488 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] OldCreateOrder = False Position = poMainFormCenter OnCreate = FormCreate PixelsPerInch = 96 TextHeight = 13 object PageControl1: TPageControl Left = 121 Top = 40 Width = 367 Height = 308 ActivePage = tshPictures Align = alClient TabOrder = 0 TabStop = False object tshWinampTags: TTabSheet Caption = 'tshWinampTags' TabVisible = False object lblTitle: TLabel Left = 8 Top = 8 Width = 23 Height = 13 Caption = '&Title:' FocusControl = edtTitle end object lblArtist: TLabel Left = 8 Top = 32 Width = 26 Height = 13 Caption = '&Artist:' FocusControl = edtArtist end object lblAlbum: TLabel Left = 8 Top = 56 Width = 32 Height = 13 Caption = 'Al&bum:' FocusControl = edtAlbum end object lblYear: TLabel Left = 8 Top = 80 Width = 25 Height = 13 Caption = '&Year:' FocusControl = edtYear end object lblComposer: TLabel Left = 8 Top = 176 Width = 50 Height = 13 Caption = 'Co&mposer:' FocusControl = edtComposer end object lblOrigArtist: TLabel Left = 8 Top = 200 Width = 51 Height = 13 Caption = '&Orig. Artist:' FocusControl = edtOrigArtist end object lblCopyright: TLabel Left = 8 Top = 224 Width = 47 Height = 13 Caption = 'Co&pyright:' FocusControl = edtCopyright end object lblURL: TLabel Left = 8 Top = 248 Width = 25 Height = 13 Caption = '&URL:' FocusControl = edtURL end object lblEncodedBy: TLabel Left = 8 Top = 272 Width = 60 Height = 13 Caption = '&Encoded by:' FocusControl = edtEncodedBy end object lblGenre: TLabel Left = 136 Top = 80 Width = 32 Height = 13 Caption = '&Genre:' FocusControl = cmbGenre end object lblComment: TLabel Left = 8 Top = 104 Width = 47 Height = 13 Caption = '&Comment:' FocusControl = memComment end object edtTitle: TEdit Left = 80 Top = 8 Width = 271 Height = 21 TabOrder = 0 end object edtArtist: TEdit Left = 80 Top = 32 Width = 271 Height = 21 TabOrder = 1 end object edtAlbum: TEdit Left = 80 Top = 56 Width = 271 Height = 21 TabOrder = 2 end object edtYear: TEdit Left = 80 Top = 80 Width = 49 Height = 21 TabOrder = 3 end object edtComposer: TEdit Left = 80 Top = 176 Width = 271 Height = 21 TabOrder = 6 end object edtOrigArtist: TEdit Left = 80 Top = 200 Width = 271 Height = 21 TabOrder = 7 end object edtCopyright: TEdit Left = 80 Top = 224 Width = 271 Height = 21 TabOrder = 8 end object edtURL: TEdit Left = 80 Top = 248 Width = 271 Height = 21 TabOrder = 9 end object edtEncodedBy: TEdit Left = 80 Top = 272 Width = 271 Height = 21 TabOrder = 10 end object cmbGenre: TComboBox Left = 192 Top = 80 Width = 161 Height = 21 ItemHeight = 13 TabOrder = 4 end object memComment: TMemo Left = 80 Top = 104 Width = 271 Height = 69 Lines.Strings = ( '') TabOrder = 5 end end object tshLyrics: TTabSheet Caption = 'tshLyrics' ImageIndex = 1 TabVisible = False object lblLanguage: TLabel Left = 8 Top = 8 Width = 51 Height = 13 Caption = 'Language:' end object lblDescription: TLabel Left = 8 Top = 248 Width = 56 Height = 13 Caption = 'Description:' end object lblWriter: TLabel Left = 8 Top = 272 Width = 31 Height = 13 Caption = 'Writer:' end object cmbLanguage: TComboBox Left = 64 Top = 8 Width = 145 Height = 21 ItemHeight = 13 Sorted = True TabOrder = 0 end object memLyrics: TMemo Left = 8 Top = 40 Width = 345 Height = 201 TabOrder = 1 end object edtDescription: TEdit Left = 64 Top = 248 Width = 289 Height = 21 TabOrder = 2 end object edtWriter: TEdit Left = 64 Top = 272 Width = 289 Height = 21 TabOrder = 3 end end object tshPictures: TTabSheet Caption = 'tshPictures' ImageIndex = 2 TabVisible = False object imgPicture: TImage Left = 8 Top = 176 Width = 105 Height = 105 Stretch = True end object lblPictureName: TLabel Left = 120 Top = 248 Width = 31 Height = 13 Caption = 'Name:' end object lblPictureType: TLabel Left = 120 Top = 272 Width = 27 Height = 13 Caption = 'Type:' end object lsvPictures: TListView Left = 8 Top = 8 Width = 345 Height = 158 Columns = < item Caption = 'Name' Width = 150 end item Caption = 'Type' Width = 70 end item Caption = 'Format' Width = 70 end item Caption = 'Size' end> HideSelection = False ReadOnly = True RowSelect = True TabOrder = 0 ViewStyle = vsReport OnClick = lsvPicturesClick end object edtPictureName: TEdit Left = 168 Top = 248 Width = 185 Height = 21 TabOrder = 5 end object cmbPictureType: TComboBox Left = 168 Top = 272 Width = 185 Height = 21 ItemHeight = 13 Sorted = True TabOrder = 6 end object btnChange: TButton Left = 120 Top = 208 Width = 75 Height = 25 Action = actChangePicture TabOrder = 4 end object Button1: TButton Left = 120 Top = 176 Width = 75 Height = 25 Action = actAddPicture TabOrder = 1 end object Button2: TButton Left = 200 Top = 176 Width = 75 Height = 25 Action = actDeletePicture TabOrder = 2 end object Button3: TButton Left = 280 Top = 176 Width = 75 Height = 25 Action = actSavePicture TabOrder = 3 end end object tshAllFrames: TTabSheet Caption = 'tshAllFrames' ImageIndex = 3 TabVisible = False object lsvAllFrames: TListView Left = 8 Top = 8 Width = 345 Height = 281 Anchors = [akLeft, akTop, akRight, akBottom] Columns = < item Caption = 'Name' end item Caption = 'Supported' Width = 65 end item Caption = 'Description' Width = 226 end> ReadOnly = True RowSelect = True TabOrder = 0 ViewStyle = vsReport end end end object lsbNavigator: TListBox Left = 0 Top = 40 Width = 121 Height = 308 Align = alLeft Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] ItemHeight = 13 Items.Strings = ( 'Winamp tags' 'Lyrics' 'Pictures' 'All Frames') ParentFont = False TabOrder = 1 OnClick = lsbNavigatorClick end object ToolBar1: TToolBar Left = 0 Top = 0 Width = 488 Height = 40 ButtonHeight = 36 ButtonWidth = 72 Caption = 'ToolBar1' Images = iml16 ShowCaptions = True TabOrder = 2 object ToolButton1: TToolButton Left = 0 Top = 2 Action = actOK end object ToolButton2: TToolButton Left = 72 Top = 2 Action = actCancel end object ToolButton3: TToolButton Left = 144 Top = 2 Action = actRemove end object ToolButton5: TToolButton Left = 216 Top = 2 Action = actCopyFromv1 end object ToolButton4: TToolButton Left = 288 Top = 2 Action = actCopyTov1 end end object acl16: TActionList Images = iml16 Left = 40 Top = 96 object actOK: TAction Caption = 'OK' ImageIndex = 1 OnExecute = actOKExecute end object actCancel: TAction Caption = 'Cancel' ImageIndex = 0 OnExecute = actCancelExecute end object actRemove: TAction Caption = 'Remove' ImageIndex = 2 OnExecute = actRemoveExecute end object actAddPicture: TAction Caption = 'Add' OnExecute = actAddPictureExecute end object actDeletePicture: TAction Caption = 'Delete' OnExecute = actDeletePictureExecute OnUpdate = ItemSelected end object actSavePicture: TAction Caption = 'Save' OnExecute = actSavePictureExecute OnUpdate = ItemSelected end object actChangePicture: TAction Caption = 'Change' OnExecute = actChangePictureExecute OnUpdate = ItemSelected end object actCopyTov1: TAction Caption = 'Copy to v1' ImageIndex = 4 OnExecute = actCopyTov1Execute end object actCopyFromv1: TAction Caption = 'Copy From v1' ImageIndex = 3 OnExecute = actCopyFromv1Execute end end object iml16: TImageList Left = 40 Top = 136 Bitmap = { 494C010105000900040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600 0000000000003600000028000000400000003000000001002000000000000030 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000003C696E00447F83005191 92004A8687004373770000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00009C8C6F000000000000000000000000004773830066BFCF007AE4EC0084F2 F7007CEBED006BCAD3003C696E00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000009C8C6F009C8C6F000000000058D2 E800000000009C8C6F00000000004D7D990050ACD60074E3FC0091EBFF000000 000080EEEC007AF0F90066CCED00437377000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000FF FF0058D2E800000000009C8C6F00407FAC004AB7F00065D7FF0087DAFF000000 000078E0EA0068E2F70056C7F900437377000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000FFFF0000FFFF0000FFFF0000FF FF0000FFFF0058D2E800000000003477B1003BA9ED0055C3FF0075C6FF000000 000064CCE60055CDF40042B4F500437377000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000D6FFFF00D6FFFF00D6FFFF0000FF FF0000FFFF0000FFFF00000000002860A200318EDC003C9EEA00579FEA000000 000049B1DD003AB1E9002D98E700000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000FF FF0000FFFF000000000000000000335493003775C7003985D000000000000000 0000489BC5003C9BD3003281D000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000FF FF000000000000000000000000003C696E003F5EA6006DA0DE0082A0D9000000 00007AAFD1006EA8D8004F7ABD00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000003C696E008591BB00C5CDEB00D9DF F600C6D5EF00929FC70000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00009C8C6F009C8C6F009C8C6F009C8C6F009C8C6F009C8C6F009C8C6F009C8C 6F009C8C6F009C8C6F0000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000009C8C 6F009C8C6F009C8C6F00000000000000000000000000000000009C8C6F009C8C 6F00000000000000000000000000000000000000000000000000000000000000 00009C8C6F009C8C6F009C8C6F00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000009C8C6F009C8C6F00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000009C8C6F000000 0000000000009C8C6F009C8C6F0000000000000000009C8C6F00000000000000 00009C8C6F000000000000000000000000000000000000000000000000009C8C 6F0000000000000000009C8C6F009C8C6F000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000BFBFBF00FFFFFF00BFBFBF00BFBFBF00C0928F00C0928F00666666006666 6600000000009C8C6F009C8C6F00000000000000000000000000336666004E7E A600669999004E7EA60033666600000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000009999 FF0000009900000000009C8C6F009C8C6F009C8C6F0000000000000099000000 9900000000009C8C6F0000000000000000000000000000000000000000000000 00000C4D24000C4D2400000000009C8C6F009C8C6F0000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000BFBFBF00FFFFFF00F9EED900BFBFBF00BFBFBF00C0928F00C0928F006666 6600000000009C8C6F009C8C6F0000000000000000004E7EA6006BD2B80058D2 E8009EF0FF009EF0FF006BD2B800336666000000000000000000000000000000 0000000000009C8C6F0000000000000000000000000000000000000000009999 FF000000FF0000009900000000009C8C6F00000000002600C4000000FF000000 9900000000009C8C6F00000000000000000000000000000000009C8C6F000000 000019A64D0019A64D000C4D2400000000009C8C6F009C8C6F00000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000BFBFBF00FFFFFF00BFBFBF00F9EED900C0928F00BFBFBF0066666600D1A7 8F00000000009C8C6F009C8C6F00000000004E7EA6006D9FC70058D2E8009EF0 FF00000000009EF0FF009EF0FF0058D2E800336666009C8C6F009C8C6F000000 000058D2E800000000009C8C6F00000000000000000000000000000000000000 00009999FF000000FF0000009900000000002600C4000000FF002600C4000000 00009C8C6F0000000000000000000000000000000000000000000000000019A6 4D0019A64D0000C0920019A64D000C4D2400000000009C8C6F009C8C6F000000 0000000000000000000000000000000000000000000000000000000000000000 0000BFBFBF00FFFFFF00BFBFBF00F9EED900C0928F00BFBFBF0066666600D1A7 8F00000000009C8C6F009C8C6F00000000004E7EA60057B3F70058D2E80099CC FF000000000058D2E80058D2E80057B3F7003366660000000000000000000000 000000FFFF0058D2E800000000009C8C6F000000000000000000000000000000 0000000000009999FF000000FF002600C4000000FF002600C400000000009C8C 6F0000000000000000000000000000000000000000009C8C6F000000000019A6 4D0000C092000000000000C0920019A64D000C4D2400000000009C8C6F009C8C 6F00000000000000000000000000000000000000000000000000000000000000 0000BFBFBF00FFFFFF00BFBFBF00F9EED900C0928F00BFBFBF0066666600D1A7 8F00000000009C8C6F009C8C6F00000000004E7EA60057B3F70057B3F70057B3 F7000000000058D2E80058D2E80057B3F7003366660000FFFF0000FFFF0000FF FF0000FFFF0000FFFF0058D2E800000000000000000000000000000000000000 000000000000000000000000FF000000FF000000FF00000000009C8C6F009C8C 6F0000000000000000000000000000000000000000000000000019A64D0000C0 920000000000000000000000000000C0920019A64D000C4D2400000000009C8C 6F009C8C6F000000000000000000000000000000000000000000000000000000 0000BFBFBF00FFFFFF00BFBFBF00F9EED900C0928F00BFBFBF0066666600D1A7 8F00000000009C8C6F009C8C6F00000000004E7EA60057B3F70057B3F70057B3 F7000000000057B3F70057B3F7000099FF0000000000D6FFFF00D6FFFF00D6FF FF0000FFFF0000FFFF0000FFFF00000000000000000000000000000000000000 0000000000002600C4000000FF009999FF000000FF0000009900000000009C8C 6F009C8C6F00000000000000000000000000000000000000000019A64D0019A6 4D000000000000000000000000000000000000C0920019A64D000C4D24000000 00009C8C6F009C8C6F0000000000000000000000000000000000000000000000 0000BFBFBF00FFFFFF00BFBFBF00F9EED900C0928F00BFBFBF0066666600D1A7 8F00000000009C8C6F009C8C6F0000000000204A6E004E7EA6004E7EA6000000 0000000000006D9FC70057B3F7004E7EA6000000000000000000000000000000 000000FFFF0000FFFF0000000000000000000000000000000000000000000000 00002600C4000000FF002600C400000000009999FF000000FF00000099000000 00009C8C6F009C8C6F0000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000C0920019A64D000C4D 2400000000009C8C6F009C8C6F00000000000000000000000000000000000000 0000BFBFBF00FFFFFF00C0928F00F9EED9009C8C6F00C0928F00404040009C8C 6F00000000009C8C6F009C8C6F0000000000336666004E7EA6006D9FC7006D9F C700000000006D9FC7006D9FC7004E7EA6000000000000000000000000000000 000000FFFF000000000000000000000000000000000000000000000000009999 FF000000FF002600C4000000000000000000000000009999FF000000FF000000 9900000000009C8C6F0000000000000000000000000000000000000000000000 000000000000000000000000000000000000000000000000000000C0920019A6 4D000C4D2400000000009C8C6F00000000000000000000000000000000000000 00009C8C6F009C8C6F009C8C6F009C8C6F009C8C6F009C8C6F009C8C6F009C8C 6F00000000009C8C6F009C8C6F000000000000000000336666006D9FC700CCCC FF00E6E6E600CCCCFF00A6A6A600000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000009999 FF009999FF0000000000000000000000000000000000000000009999FF009999 FF00000000009C8C6F0000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000C0 920019A64D000C4D240000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000009C8C6F00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00009C8C6F000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000C0920019A64D000000000000000000000000000000000000000000BFBF BF00FFFFFF00FFFFFF00BFBFBF00BFBFBF00C0928F00C0928F009C8C6F009C8C 6F009C8C6F00000000009C8C6F00000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000BFBFBF00FFFFFF00BFBFBF00BFBFBF00000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 000000000000000000000000000000000000424D3E000000000000003E000000 2800000040000000300000000100010000000000800100000000000000000000 000000000000000000000000FFFFFF0000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000FFFF000000000000FFFF000000000000 FFFF000000000000FF83000000000000C7010000000000000200000000000000 0000000000000000000000000000000000000000000000000200000000000000 C600000000000000CF01000000000000FF83000000000000FFFF000000000000 FFFF000000000000FFFF000000000000FFFFFFFFFFFFFFFFFFFFFFFFF003FFFF E3CFF1FFE001FFFFC187E0FFE001C1FFC003E07FE00180E3C003C03FE0010001 E007C01FE0010000F00F800FE0010000F80F8007E0010000F0078603E0010001 E003CF01E0010063C103FF81E00180E7C383FFC1C001C1FFE7C7FFE1C001FFFF FFFFFFF3C003FFFFFFFFFFFFF81FFFFF00000000000000000000000000000000 000000000000} end object JvID3v21: TJvID3v2 Active = False Left = 40 Top = 176 end end --- NEW FILE: JvID3v2EditFormU.pas --- unit JvID3v2EditFormU; {$I JVCL.INC} interface uses Windows, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, ComCtrls, ActnList, StdCtrls, JvID3v2Base, JvId3v2, ExtCtrls, JvComponent, ImgList, ToolWin; type TJvID3v2EditForm = class(TForm) PageControl1: TPageControl; lsbNavigator: TListBox; ToolBar1: TToolBar; tshWinampTags: TTabSheet; tshLyrics: TTabSheet; tshPictures: TTabSheet; lblTitle: TLabel; lblArtist: TLabel; lblAlbum: TLabel; lblYear: TLabel; lblComposer: TLabel; lblOrigArtist: TLabel; lblCopyright: TLabel; lblURL: TLabel; lblEncodedBy: TLabel; edtTitle: TEdit; edtArtist: TEdit; edtAlbum: TEdit; edtYear: TEdit; edtComposer: TEdit; edtOrigArtist: TEdit; edtCopyright: TEdit; edtURL: TEdit; edtEncodedBy: TEdit; cmbGenre: TComboBox; lblGenre: TLabel; memComment: TMemo; lblComment: TLabel; acl16: TActionList; iml16: TImageList; actOK: TAction; actCancel: TAction; actRemove: TAction; ToolButton1: TToolButton; ToolButton2: TToolButton; ToolButton3: TToolButton; JvID3v21: TJvID3v2; lblLanguage: TLabel; cmbLanguage: TComboBox; memLyrics: TMemo; lblDescription: TLabel; lblWriter: TLabel; edtDescription: TEdit; edtWriter: TEdit; lsvPictures: TListView; imgPicture: TImage; actAddPicture: TAction; actDeletePicture: TAction; actSavePicture: TAction; lblPictureName: TLabel; lblPictureType: TLabel; edtPictureName: TEdit; cmbPictureType: TComboBox; tshAllFrames: TTabSheet; lsvAllFrames: TListView; btnChange: TButton; actChangePicture: TAction; Button1: TButton; Button2: TButton; Button3: TButton; ToolButton4: TToolButton; ToolButton5: TToolButton; actCopyTov1: TAction; actCopyFromv1: TAction; procedure actOKExecute(Sender: TObject); procedure actCancelExecute(Sender: TObject); procedure actRemoveExecute(Sender: TObject); procedure actAddPictureExecute(Sender: TObject); procedure actDeletePictureExecute(Sender: TObject); procedure actSavePictureExecute(Sender: TObject); procedure lsvPicturesClick(Sender: TObject); procedure lsbNavigatorClick(Sender: TObject); procedure actChangePictureExecute(Sender: TObject); procedure ItemSelected(Sender: TObject); procedure actCopyTov1Execute(Sender: TObject); procedure actCopyFromv1Execute(Sender: TObject); procedure FormCreate(Sender: TObject); private FTagDeleted: Boolean; protected procedure Init; procedure Final; procedure InitAllFramesTab; procedure TagToCtrls; procedure CtrlsToTag; procedure FillPictureTypes(Strings: TStrings); class function Instance: TJvID3v2EditForm; public class function Execute(const AFileName: string): Boolean; end; implementation uses ExtDlgs, JvID3v2Types; {$R *.dfm} var CFrameDescriptions: array[TJvID3FrameID] of string = ( 'Error', {fiErrorFrame} 'Padding', {fiPaddingFrame} 'No known frame', {fiNoFrame} 'Audio encryption', {fiAudioCrypto} 'Attached picture', {fiPicture} 'Audio seek point index', {fiAudioSeekPoint} 'Comments', {fiComment} 'Commercial frame', {fiCommercial} 'Encryption method registration', {fiCryptoReg} 'Equalisation (2)', {fiEqualization2} 'Equalization', {fiEqualization} 'Event timing codes', {fiEventTiming} 'General encapsulated object', {fiGeneralObject} 'Group identification registration', {fiGroupingReg} 'Involved people list', {fiInvolvedPeople} 'Linked information', {fiLinkedInfo} 'Music CD identifier', {fiCDID} 'MPEG location lookup table', {fiMPEGLookup} 'Ownership frame', {fiOwnership} 'Private frame', {fiPrivate} 'Play counter', {fiPlayCounter} 'Popularimeter', {fiPopularimeter} 'Position synchronisation frame', {fiPositionsync} 'Recommended buffer size', {fiBufferSize} 'Relative volume adjustment (2)', {fiVolumeAdj2} 'Relative volume adjustment', {fiVolumeAdj} 'Reverb', {fiReverb} 'Seek frame', {fiSeekFrame} 'Signature frame', {fiSignature} 'Synchronized lyric/text', {fiSyncedLyrics} 'Synchronized tempo codes', {fiSyncedTempo} 'Album/Movie/Show title', {fiAlbum} 'BPM (beats per minute)', {fiBPM} 'Composer', {fiComposer} 'Content type', {fiContentType} 'Copyright message', {fiCopyright} 'Date', {fiDate} 'Encoding time', {fiEncodingTime} 'Playlist delay', {fiPlaylistDelay} 'Original release time', {fiOrigReleaseTime} 'Recording time', {fiRecordingTime} 'Release time', {fiReleaseTime} 'Tagging time', {fiTaggingTime} 'Involved people list', {fiInvolvedPeople2} 'Encoded by', {fiEncodedBy} 'Lyricist/Text writer', {fiLyricist} 'File type', {fiFileType} 'Time', {fiTime} 'Content group description', {fiContentGroup} 'Title/songname/content description', {fiTitle} 'Subtitle/Description refinement', {fiSubTitle} 'Initial key', {fiInitialKey} 'Language(s)', {fiLanguage} 'Length', {fiSongLen} 'Musician credits list', {fiMusicianCreditList} 'Media type', {fiMediaType} 'Mood', {fiMood} 'Original album/movie/show title', {fiOrigAlbum} 'Original filename', {fiOrigFileName} 'Original lyricist(s)/text writer(s)', {fiOrigLyricist} 'Original artist(s)/performer(s)', {fiOrigArtist} 'Original release year', {fiOrigYear} 'File owner/licensee', {fiFileOwner} 'Lead performer(s)/Soloist(s)', {fiLeadArtist} 'Band/orchestra/accompaniment', {fiBand} 'Conductor/performer refinement', {fiConductor} 'Interpreted, remixed, or otherwise modified by', {fiMixArtist} 'Part of a set', {fiPartInSet} 'Produced notice', {fiProducedNotice} 'Publisher', {fiPublisher} 'Track number/Position in set', {fiTrackNum} 'Recording dates', {fiRecordingDates} 'Internet radio station name', {fiNetRadioStation} 'Internet radio station owner', {fiNetRadioOwner} 'Size', {fiSize} 'Album sort order', {fiAlbumSortOrder} 'Performer sort order', {fiPerformerSortOrder} 'Title sort order', {fiTitleSortOrder} 'ISRC (international standard recording code)', {fiISRC} 'Software/Hardware and settings used for encoding', {fiEncoderSettings} 'Set subtitle', {fiSetSubTitle} 'User defined text information', {fiUserText} 'Year', {fiYear} 'Unique file identifier', {fiUniqueFileID} 'Terms of use', {fiTermsOfUse} 'Unsynchronized lyric/text transcription', {fiUnsyncedLyrics} 'Commercial information', {fiWWWCommercialInfo} 'Copyright/Legal information', {fiWWWCopyright} 'Official audio file webpage', {fiWWWAudioFile} 'Official artist/performer webpage', {fiWWWArtist} 'Official audio source webpage', {fiWWWAudioSource} 'Official internet radio station homepage', {fiWWWRadioPage} 'Payment', {fiWWWPayment} 'Official publisher webpage', {fiWWWPublisher} 'User defined URL link', {fiWWWUser} 'Encrypted meta frame', {fiMetaCrypto} 'Compressed meta frame' {fiMetaCompression} ); CPictureTypeStr: array[TJvID3PictureType] of string = ( 'Other', '32x32 pixels ''file icon'' (PNG only)', 'Other file icon', 'Cover (front)', 'Cover (back)', 'Leaflet page', 'Media (e.g. lable side of CD)', 'Lead artist/lead performer/soloist', 'Artist/performer', 'Conductor', 'Band/Orchestra', 'Composer', 'Lyricist/text writer', 'Recording Location', 'During recording', 'During performance', 'Movie/video screen capture', 'A bright coloured fish', 'Illustration', 'Band/artist logotype', 'Publisher/Studio logotype' ); procedure SetPictureListItemTo(ListItem: TListItem; Frame: TJvID3PictureFrame); begin with ListItem, Frame do begin Caption := Description; while SubItems.Count < 3 do SubItems.Add(''); SubItems[0] := CPictureTypeStr[PictureType]; //Type SubItems[1] := MIMEType; //Format SubItems[2] := IntToStr(DataSize); //Size Data := Frame; end; end; procedure TJvID3v2EditForm.FormCreate(Sender: TObject); begin FillPictureTypes(cmbPictureType.Items); ISO_639_2Names(cmbLanguage.Items); ID3_Genres(cmbGenre.Items); end; procedure TJvID3v2EditForm.actOKExecute(Sender: TObject); var HasTag: Boolean; Version: TJvID3Version; Cursor: TCursor; begin Cursor := Screen.Cursor; Screen.Cursor := crHourGlass; try CtrlsToTag; JvID3v21.Frames.RemoveEmptyFrames; HasTag := True; if JvID3v21.FrameCount = 0 then GetID3v2Version(JvID3v21.FileName, HasTag, Version); if HasTag then JvID3v21.Commit; ModalResult := mrOk; finally Screen.Cursor := Cursor; end; end; procedure TJvID3v2EditForm.actCancelExecute(Sender: TObject); begin ModalResult := mrCancel; end; procedure TJvID3v2EditForm.actRemoveExecute(Sender: TObject); var Cursor: TCursor; begin if MessageDlg('Remove tag?', mtConfirmation, mbOKCancel, 0) <> mrOk then Exit; Cursor := Screen.Cursor; Screen.Cursor := crHourGlass; try JvID3v21.Erase; FTagDeleted := True; TagToCtrls; finally Screen.Cursor := Cursor; end; end; class function TJvID3v2EditForm.Execute(const AFileName: string): Boolean; begin with TJvID3v2EditForm.Instance do try JvID3v21.FileName := AFileName; Init; try Result := (ShowModal = mrOk) or FTagDeleted; finally Final; end; finally Hide; end; end; procedure TJvID3v2EditForm.Init; begin Caption := Format('Edit ''%s''', [ExtractFileName(JvID3v21.FileName)]); JvID3v21.Open; TagToCtrls; imgPicture.Picture.Assign(nil); lsbNavigator.ItemIndex := 0; PageControl1.ActivePage := tshWinampTags; end; procedure TJvID3v2EditForm.CtrlsToTag; function SetFirstOfList(Strings: TStrings; const S: string): string; begin if Strings.Count > 0 then Strings[0] := S else Strings.Add(S); end; begin { WinAmp tags } { WinAmp threats some tags as single line tags; mimic this behaviour by using function SetFirstOfList } JvID3v21.Texts.Title := edtTitle.Text; SetFirstOfList(JvID3v21.Texts.LeadArtist, edtArtist.Text); JvID3v21.Texts.Album := edtAlbum.Text; JvID3v21.Texts.Year := StrToIntDef(edtYear.Text, 0); JvID3v21.Texts.ContentType := NiceGenreToGenre(cmbGenre.Text); { Note that WinAmp doesn't care about other properties than Text of TJvID3ContentFrame } TJvID3ContentFrame.FindOrCreate(JvID3v21, fiComment).Text := memComment.Lines.Text; SetFirstOfList(JvID3v21.Texts.Composer, edtComposer.Text); SetFirstOfList(JvID3v21.Texts.OrigArtist, edtOrigArtist.Text); JvID3v21.Texts.Copyright := edtCopyright.Text; { Note that WinAmp doesn't care about other properties than URL of TJvID3URLUserFrame } TJvID3URLUserFrame.FindOrCreate(JvID3v21, 0).URL := edtURL.Text; JvID3v21.Texts.EncodedBy := edtEncodedBy.Text; { Lyrics } with TJvID3ContentFrame.FindOrCreate(JvID3v21, fiUnsyncedLyrics) do begin Language := ISO_639_2NameToCode(cmbLanguage.Text); Text := memLyrics.Lines.Text; Description := edtDescription.Text; end; SetFirstOfList(JvID3v21.Texts.Lyricist, edtWriter.Text); end; procedure TJvID3v2EditForm.TagToCtrls; function GetFirstOfList(Strings: TStrings): string; begin if Strings.Count > 0 then Result := Strings[0] else Result := ''; end; var Frame: TJvID3Frame; begin { Determine which frames are in the tag before calls to JvID3v21.Texts.xxx and FindOrCreate because those functions might create frames. } InitAllFramesTab; { WinAmp tags } { WinAmp threats some tags as single line tags; mimic this behaviour by using function GetFirstOfList } edtTitle.Text := JvID3v21.Texts.Title; edtArtist.Text := GetFirstOfList(JvID3v21.Texts.LeadArtist); edtAlbum.Text := JvID3v21.Texts.Album; edtYear.Text := IntToStr(JvID3v21.Texts.Year); cmbGenre.Text := GenreToNiceGenre(JvID3v21.Texts.ContentType); { Note that WinAmp doesn't care about other properties than Text of TJvID3ContentFrame } memComment.Lines.Text := TJvID3ContentFrame.FindOrCreate(JvID3v21, fiComment).Text; edtComposer.Text := GetFirstOfList(JvID3v21.Texts.Composer); edtOrigArtist.Text := GetFirstOfList(JvID3v21.Texts.OrigArtist); edtCopyright.Text := JvID3v21.Texts.Copyright; { Note that WinAmp doesn't care about other properties than URL of TJvID3URLUserFrame } edtURL.Text := TJvID3URLUserFrame.FindOrCreate(JvID3v21, 0).URL; edtEncodedBy.Text := JvID3v21.Texts.EncodedBy; { Lyrics } with TJvID3ContentFrame.FindOrCreate(JvID3v21, fiUnsyncedLyrics) do begin cmbLanguage.ItemIndex := cmbLanguage.Items.IndexOf(ISO_639_2CodeToName(Language)); memLyrics.Lines.Text := Text; edtDescription.Text := Description; end; edtWriter.Text := GetFirstOfList(JvID3v21.Texts.Lyricist); { Pictures } lsvPictures.Items.BeginUpdate; try lsvPictures.Items.Clear; if JvID3v21.FindFirstFrame(fiPicture, Frame) then repeat if Frame is TJvID3PictureFrame then SetPictureListItemTo(lsvPictures.Items.Add, TJvID3PictureFrame(Frame)); until not JvID3v21.FindNextFrame(fiPicture, Frame); finally lsvPictures.Items.EndUpdate; end; end; procedure TJvID3v2EditForm.actAddPictureExecute(Sender: TObject); var Frame: TJvID3PictureFrame; begin if cmbPictureType.ItemIndex < 0 then begin MessageDlg('Select a picture type', mtError, [mbOK], 0); FocusControl(cmbPictureType); Exit; end; with TOpenPictureDialog.Create(Application) do try if not Execute then Exit; Frame := TJvID3PictureFrame(JvID3v21.AddFrame(fiPicture)); with Frame do begin with cmbPictureType do PictureType := TJvID3PictureType(Items.Objects[ItemIndex]); Description := edtPictureName.Text; MIMEType := ExtToMIMEType(ExtractFileExt(FileName)); LoadFromFile(FileName); lsvPictures.Items.BeginUpdate; try SetPictureListItemTo(lsvPictures.Items.Add, Frame); finally lsvPictures.Items.EndUpdate; end; end; finally Free; end; end; procedure TJvID3v2EditForm.actDeletePictureExecute(Sender: TObject); begin if not Assigned(lsvPictures.Selected) then Exit; JvID3v21.Frames.Remove(TJvID3Frame(lsvPictures.Selected.Data)); lsvPictures.Items.Delete(lsvPictures.Selected.Index); imgPicture.Picture.Assign(nil); end; procedure TJvID3v2EditForm.actSavePictureExecute(Sender: TObject); var Frame: TJvID3PictureFrame; begin if not Assigned(lsvPictures.Selected) then Exit; Frame := TJvID3PictureFrame(lsvPictures.Selected.Data); if Assigned(Frame) and (Frame.DataSize > 0) and (Frame.MIMEType <> '-->') then with TSavePictureDialog.Create(Application) do try if Execute then Frame.SaveToFile(FileName); finally Free; end; end; procedure TJvID3v2EditForm.lsvPicturesClick(Sender: TObject); var Frame: TJvID3PictureFrame; begin if Assigned(lsvPictures.Selected) then Frame := TJvID3PictureFrame(lsvPictures.Selected.Data) else Frame := nil; if Assigned(Frame) then begin edtPictureName.Text := Frame.Description; with cmbPictureType do ItemIndex := Items.IndexOfObject(TObject(Frame.PictureType)); end; imgPicture.Picture.Assign(Frame); end; procedure TJvID3v2EditForm.lsbNavigatorClick(Sender: TObject); begin case lsbNavigator.ItemIndex of 0: PageControl1.ActivePage := tshWinampTags; 1: PageControl1.ActivePage := tshLyrics; 2: PageControl1.ActivePage := tshPictures; 3: PageControl1.ActivePage := tshAllFrames; end; end; procedure TJvID3v2EditForm.FillPictureTypes(Strings: TStrings); var PictureType: TJvID3PictureType; begin Strings.BeginUpdate; try Strings.Clear; for PictureType := Low(TJvID3PictureType) to High(TJvID3PictureType) do Strings.AddObject(CPictureTypeStr[PictureType], TObject(PictureType)); finally Strings.EndUpdate; end; end; procedure TJvID3v2EditForm.InitAllFramesTab; var I: Integer; ListItem: TListItem; begin lsvAllFrames.Items.BeginUpdate; try lsvAllFrames.Items.Clear; for I := 0 to JvID3v21.FrameCount - 1 do with JvID3v21.Frames[I] do begin ListItem := lsvAllFrames.Items.Add; ListItem.Caption := FrameName; if ClassType <> TJvID3SkipFrame then ListItem.SubItems.Add('Yes') else ListItem.SubItems.Add('No'); ListItem.SubItems.Add(CFrameDescriptions[FrameID]); end; finally lsvAllFrames.Items.EndUpdate; end; end; procedure TJvID3v2EditForm.actChangePictureExecute(Sender: TObject); var Frame: TJvID3PictureFrame; begin if not Assigned(lsvPictures.Selected) then Exit; if cmbPictureType.ItemIndex < 0 then begin MessageDlg('Select a picture type', mtError, [mbOK], 0); FocusControl(cmbPictureType); Exit; end; Frame := TJvID3PictureFrame(lsvPictures.Selected.Data); with Frame do begin with cmbPictureType do PictureType := TJvID3PictureType(Items.Objects[ItemIndex]); Description := edtPictureName.Text; lsvPictures.Items.BeginUpdate; try SetPictureListItemTo(lsvPictures.Items.Add, Frame); finally lsvPictures.Items.EndUpdate; end; end; end; procedure TJvID3v2EditForm.ItemSelected(Sender: TObject); begin if Sender is TAction then TAction(Sender).Enabled := Assigned(lsvPictures.Selected); end; procedure TJvID3v2EditForm.actCopyTov1Execute(Sender: TObject); begin if not JvID3v21.CopyToID3v1 then ShowMessage('Error'); end; procedure TJvID3v2EditForm.actCopyFromv1Execute(Sender: TObject); begin if JvID3v21.CopyFromID3v1 then TagToCtrls else ShowMessage('Error'); end; var GInstance: TJvID3v2EditForm = nil; class function TJvID3v2EditForm.Instance: TJvID3v2EditForm; begin if not Assigned(GInstance) then GInstance := TJvID3v2EditForm.Create(Application); Result := GInstance; end; procedure TJvID3v2EditForm.Final; begin JvID3v21.Close; end; end. --- NEW FILE: JvID3v2MainFormU.dfm --- object JvID3v2MainForm: TJvID3v2MainForm Left = 442 Top = 277 Width = 542 Height = 431 Caption = 'JvID3v2MainForm' Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] Icon.Data = { 0000010001001010100001001000280100001600000028000000100000002000 00000100040000000000C0000000000000000000000000000000000000000000 0000000080000080000000808000800000008000800080800000C0C0C0008080 80000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF000000 00000000000000000BBBB0000000000BB000BB000000000BB0000B000000000B BB000BB00000000BBB000BB00000000000000BB00000000000000BB000000000 00000BB00000000000000BB00000000000000BB00000000000000BB000000000 00000BB0000000000000BBBB00000000000BBBBBB0000000000000000000FFFF 0000F87F0000E73F0000E7BF0000E39F0000E39F0000FF9F0000FF9F0000FF9F 0000FF9F0000FF9F0000FF9F0000FF9F0000FF0F0000FE070000FFFF0000} OldCreateOrder = False Position = poDefault PixelsPerInch = 96 TextHeight = 13 object Splitter1: TSplitter Left = 185 Top = 0 Height = 397 end object ListView1: TListView Left = 188 Top = 0 Width = 346 Height = 397 Align = alClient Columns = < item Caption = 'Type' end item Caption = 'Filename' Width = 300 end> RowSelect = True TabOrder = 0 ViewStyle = vsReport OnDblClick = ListView1DblClick end object Panel1: TPanel Left = 0 Top = 0 Width = 185 Height = 397 Align = alLeft TabOrder = 1 object JvDriveCombo1: TJvDriveCombo Left = 1 Top = 1 Width = 183 Height = 22 Align = alTop DriveTypes = [dtFixed, dtRemote, dtCDROM] Offset = 4 ImageSize = isSmall ItemHeight = 16 TabOrder = 0 end object JvDirectoryListBox1: TJvDirectoryListBox Left = 1 Top = 23 Width = 183 Height = 373 Align = alClient Directory = 'C:\Program Files\Borland\Delphi7\Projects' DriveCombo = JvDriveCombo1 ItemHeight = 17 ScrollBars = ssBoth TabOrder = 1 OnChange = JvDirectoryListBox1Change end ... [truncated message content] |