Layout_LayOutGraphCompleted
(
Object oSender,
AsyncCompletedEventArgs oAsyncCompletedEventArgs
)
{
AssertValid();
#if TRACE_LAYOUT_AND_DRAW
Debug.WriteLine("NodeXLControl: Layout_LayOutGraphCompleted()");
#endif
if (oAsyncCompletedEventArgs.Error == null)
{
m_eLayoutState = LayoutState.LayoutCompleted;
// The asynchronous layout has completed and now the graph needs to
// be drawn.
UpdateCollapsedGroupLocations(m_oGraph.Vertices);
BundleAllEdgesIfAppropriate();
LayOutOrDrawGraph();
}
else
{
m_eLayoutState = LayoutState.Stable;
}
FireGraphLaidOut(oAsyncCompletedEventArgs);
}