Changeset 353 for CoolAudio/UPlaylist.pas
- Timestamp:
- Apr 23, 2012, 2:57:12 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CoolAudio/UPlaylist.pas
r352 r353 13 13 end; 14 14 15 { TPlay list }15 { TPlayList } 16 16 17 TPlaylist = class(TComponent) 17 TPlayList = class(TComponent) 18 private 19 FRandomOrder: Boolean; 20 FRepeatInfinitely: Boolean; 18 21 public 19 Player: TPlayer;20 Items: TObjectList; // TObjectList<TPlaylistItem>21 RandomOrder: Boolean;22 RepeatInfinitely: Boolean;23 22 CurrentIndex: Integer; 24 23 procedure AddFile(FileName: string); … … 29 28 constructor Create(AOwner: TComponent); 30 29 destructor Destroy; override; 30 published 31 Player: TMediaPlayer; 32 Items: TObjectList; // TObjectList<TPlaylistItem> 33 property RandomOrder: Boolean read FRandomOrder write FRandomOrder; 34 property RepeatInfinitely: Boolean read FRepeatInfinitely 35 write FRepeatInfinitely; 31 36 end; 32 37 … … 34 39 implementation 35 40 36 { TPlay list }41 { TPlayList } 37 42 38 procedure TPlay list.AddFile(FileName: string);43 procedure TPlayList.AddFile(FileName: string); 39 44 var 40 45 NewItem: TPlaylistItem; … … 45 50 end; 46 51 47 procedure TPlay list.Shuffle;52 procedure TPlayList.Shuffle; 48 53 begin 49 54 50 55 end; 51 56 52 procedure TPlay list.Play;57 procedure TPlayList.Play; 53 58 begin 54 59 Player.FileName := TPlaylistItem(Items[CurrentIndex]).FileName; … … 56 61 end; 57 62 58 procedure TPlay list.PlayNext;63 procedure TPlayList.PlayNext; 59 64 begin 60 65 Inc(CurrentIndex); … … 67 72 end; 68 73 69 procedure TPlay list.PlayPrevious;74 procedure TPlayList.PlayPrevious; 70 75 begin 71 76 Dec(CurrentIndex); … … 76 81 end; 77 82 78 constructor TPlay list.Create(AOwner: TComponent);83 constructor TPlayList.Create(AOwner: TComponent); 79 84 begin 80 85 inherited; … … 82 87 end; 83 88 84 destructor TPlay list.Destroy;89 destructor TPlayList.Destroy; 85 90 begin 86 91 Items.Free;
Note:
See TracChangeset
for help on using the changeset viewer.