GanttView for WinForms
タスクの追跡
GanttView の使用 > タスク要素 > タスクの追跡

GanttView allows you to track changes in the tasks when you drag a task at runtime. It provides the DragNotificationBase class which contains methods, such as UpdatesDates, UpdatePercent, StartDrag, and EndDrag, which can be used to track the change in duration, start, finish and other parameters of a task being dragged from one location to the other. In addition, the DragNotificationBase class provides the AllowLinkMode property which can be used to enable or disable the link created during a task is being dragged.

GanttView also provides you a way to change the tooltip of a task while a user drags it, using the DragNotificationControl property. This property can be used to reflect the task dragging information in the tooltip view as shown in the GIF below.

 Displays Task Tracking in GanttView.

C#
コードのコピー
public partial class Form1 : Form
{
        public Form1()
        {
                InitializeComponent();
                c1GanttView1.DragNotificationControl = new DragNotificationCtrl(c1GanttView1);
        }
}
internal class DragNotificationCtrl : DragNotificationBase
{
    C1GanttView _owner;
    BaseTask _task;
    public DragNotificationCtrl(C1GanttView owner) : base()
    {
        _owner = owner;
    }
}