Changeset 353 for CoolAudio/Demo/UFormPlaylist.pas
- Timestamp:
- Apr 23, 2012, 2:57:12 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CoolAudio/Demo/UFormPlaylist.pas
r352 r353 76 76 procedure TFormPlaylist.AClearAllExecute(Sender: TObject); 77 77 begin 78 FormMain.Play list.Items.Clear;78 FormMain.PlayList.Items.Clear; 79 79 ReloadList; 80 80 end; … … 84 84 I: Integer; 85 85 begin 86 with FormMain.Play list, Items do begin86 with FormMain.PlayList, Items do begin 87 87 for I := Count - 1 downto 0 do 88 88 if ListView1.Items[I].Selected then Delete(I); … … 94 94 procedure TFormPlaylist.AItemPlayExecute(Sender: TObject); 95 95 begin 96 FormMain.Play list.CurrentIndex := ListView1.Selected.Index;97 FormMain.Play list.Play;96 FormMain.PlayList.CurrentIndex := ListView1.Selected.Index; 97 FormMain.PlayList.Play; 98 98 end; 99 99 … … 112 112 NewItem := TPlaylistItem.Create; 113 113 NewItem.FileName := Dir + DirectorySeparator + sr.Name; 114 FormMain.Play list.Items.Add(NewItem);114 FormMain.PlayList.Items.Add(NewItem); 115 115 end; 116 116 until FindNext(sr) <> 0; … … 124 124 begin 125 125 if OpenDialog1.Execute then begin 126 FormMain.Play list.AddFile(OpenDialog1.FileName);126 FormMain.PlayList.AddFile(OpenDialog1.FileName); 127 127 ReloadList; 128 128 end; … … 145 145 procedure TFormPlaylist.ListView1Data(Sender: TObject; Item: TListItem); 146 146 begin 147 if (Item.Index >= 0) and (Item.Index < FormMain.Play list.Items.Count) then148 with TPlaylistItem(FormMain.Play list.Items[Item.Index]) do begin147 if (Item.Index >= 0) and (Item.Index < FormMain.PlayList.Items.Count) then 148 with TPlaylistItem(FormMain.PlayList.Items[Item.Index]) do begin 149 149 Item.Caption := FileName; 150 Item.Data := FormMain.Play list.Items[Item.Index];150 Item.Data := FormMain.PlayList.Items[Item.Index]; 151 151 end; 152 152 end; … … 164 164 procedure TFormPlaylist.ReloadList; 165 165 begin 166 ListView1.Items.Count := FormMain.Play list.Items.Count;166 ListView1.Items.Count := FormMain.PlayList.Items.Count; 167 167 ListView1.Refresh; 168 168 ListView1.Selected := nil; 169 if (FormMain.Play list.CurrentIndex >= 0) and170 (FormMain.Play list.CurrentIndex < ListView1.Items.Count) then171 ListView1.Items[FormMain.Play list.CurrentIndex].Selected := True;169 if (FormMain.PlayList.CurrentIndex >= 0) and 170 (FormMain.PlayList.CurrentIndex < ListView1.Items.Count) then 171 ListView1.Items[FormMain.PlayList.CurrentIndex].Selected := True; 172 172 UpdateInterface; 173 173 end; … … 178 178 AItemPlay.Enabled := Assigned(ListView1.Selected); 179 179 AClearAll.Enabled := ListView1.Items.Count > 0; 180 CheckBoxRandom.Checked := FormMain.Play list.RandomOrder;181 CheckBoxRepeat.Checked := FormMain.Play list.RepeatInfinitely;180 CheckBoxRandom.Checked := FormMain.PlayList.RandomOrder; 181 CheckBoxRepeat.Checked := FormMain.PlayList.RepeatInfinitely; 182 182 end; 183 183
Note:
See TracChangeset
for help on using the changeset viewer.