internal void ClearGraph()
{
if (this.currentGraphBuilder != null)
{
//this.currentModeIsMosaic = false;
this.currentGraphBuilder.GraphStarted -= new EventHandler(newGraph_GraphStarted);
this.currentGraphBuilder.GraphEnded -= new EventHandler(newGraph_GraphEnded);
this.currentGraphBuilder.PossibleChanged -= new EventHandler<GraphBuilderBase.PossibleEventArgs>(newGraph_PossibleChanged);
this.currentGraphBuilder.Dispose();
OnGraphStop();
this.currentGraphBuilder = null;
}
}