protected virtual void OnTick(object o,TickArgs args)
{
long currentTime = args.CurrentTime;
float currentposition = args.CurrentPosition;
long streamLength = args.StreamLength;
//Console.WriteLine ("Current Time:{0}\n Length:{1}\n",currentTime, streamLength);
if (length != streamLength){
length = streamLength;
slength = TimeString.MSecondsToSecondsString(length);
}
if (InSegment()){
currentTime -= segmentStartTime;
currentposition = (float)currentTime/(float)(segmentStopTime-segmentStartTime);
slength = TimeString.MSecondsToSecondsString(segmentStopTime-segmentStartTime);
}
timelabel.Text = TimeString.MSecondsToSecondsString(currentTime) + "/" + slength;
timescale.Value = currentposition;
if (Tick != null)
Tick(o,args);
}