Reputation: 293
I need a timeline control for one of my projects (Winforms/C#)and Im really not sure how i should create one from scratch. I have some visual idea of what i want. Something similar to the link below
http://www.codeproject.com/KB/wtl/wtltimeline.aspx
I just want to know is it possible to use the WTL in a Winforms project directly? or If not, is it easy to migrate from a WTL code to a C# code to use in Winforms. I cant move away from Winforms coz most of my project is complete in Winforms.
My other question regarding the same is in this link: C# Timeline control
Has a slightly better description of the project and requirements of the timeline control.
Please Help. Thanks! :)
Upvotes: 2
Views: 4494
Reputation: 3354
Having a timeline in your project is like having an array of events with execution time. something like this:
public class TimedEvent<T>
{
public int ExecutionTime { get; set; }
public EventKinds EventKind { get; set; }
public EventStatusKinds Status { get; set; }
public T Data { get; set; }
}
Now you need to create an array of TimedEvent
and adding events to the array.
Next, you should just define a variable for current time and increase it every second (as you wish) and just execute the event as its defined.
It's not so hard, no need to use any tool...
By the way i wrote a simulation program which is using the same idea. If you want give me you email address to send it to you.
Good luck
Upvotes: 2
Reputation: 7429
if it is made there then obviously it can be done.
Look at Building A TimeLine Control in C#
Upvotes: 1