blob: e3539a47afed31cb55250b22855266f6460ba69e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
using System;
using Banshee.Collection;
using System.Collections.Generic;
namespace Banshee.CueSheets
{
public class CS_TrackListModel : BansheeListModel<CueSheetEntry> {
private CueSheet _sheet;
private List<CueSheetEntry> store;
public CS_TrackListModel () {
Selection=new Hyena.Collections.Selection();
store=new List<CueSheetEntry>();
}
public override void Clear () {
// does nothing
}
public void SetSheet(CueSheet s) {
_sheet=s;
}
public override void Reload () {
store.Clear ();
int i=0;
for(i=0;i<_sheet.nEntries ();i++) {
CueSheetEntry e=_sheet.entry (i);
store.Add (e);
/*double l=e.length ();
int t=(int) (l*100.0);
int m=t/(60*100);
int secs=(t/100)%60;
string ln=String.Format ("{0:00}:{0:00}",m,secs);
store.AppendValues (i+1,e.title (),e.getPiece (),e.performer (),e.getComposer(),ln);*/
}
base.RaiseReloaded ();
}
public override int Count {
get {
return store.Count;
}
}
public override CueSheetEntry this[int index] {
get {
return store[index];
}
}
/*
public CS_TrackListModel () : base(typeof(int),
typeof(string),
typeof(string),
typeof(string),
typeof(string),
typeof(string))
{
}*/
}
}
|