Question
I’m working with GTP.NET in visual studio 2005, C#.
In OnCollisionDetect I set the layout of the TimeItems to a layout with a red background.
Is there a way to catch the undo of a CollisionDetect?
So I can change back the settings at the moment a collision is being aborted?
thanks in advance,
Answer
You should use the new functions that extend collisionDetect called ConflictAreas. These give you better control on when they occur and when they are solved.
private void gantt1_OnConflictArea_Update(PlexityHide.GTP.Gantt aGantt, PlexityHide.GTP.ConflictArea_UpdateArgs e)
{
string aEventDesc=“TimeItem “+e.ConflictArea.OwningTimeItem.Index.ToString();
if (e.ConflictAreaUpdateKind==ConflictAreaUpdateKind.add)
aEventDesc+=” has new conflict with “+e.ConflictArea.ConflictingTimeItem.Index.ToString();
if (e.ConflictAreaUpdateKind==ConflictAreaUpdateKind.update)
aEventDesc+=” still in conflict with “+e.ConflictArea.ConflictingTimeItem.Index.ToString();
if (e.ConflictAreaUpdateKind==ConflictAreaUpdateKind.remove)
aEventDesc+=” has resolved conflict with “+e.ConflictArea.ConflictingTimeItem.Index.ToString();
textBox1.Text+=“\r\n “+aEventDesc;
}