private void GraphOrderChangeRequested(object sender, OrderChangeEventArgs e) { SingleGraph gr = graphs_[e.Source]; graphs_.RemoveAt(e.Source); graphs_.Insert(e.Destination, gr); DoLayout(); }
private void GraphWindowActivated(object sender, EventArgs e) { SingleGraph gr = sender as SingleGraph; if (gr != null) { selected_ = graphs_.IndexOf(gr); HighlightSelected(); } }
public void DeleteSelected() { if (selected_ != -1) { SingleGraph gr = graphs_[selected_]; RemoveGraph(gr); selected_ = -1; HighlightSelected(); } }
private void RemoveGraph(SingleGraph gr) { gr.Activated -= GraphWindowActivated; gr.OrderChangeRequest -= GraphOrderChangeRequested; graphs_.Remove(gr); gr.Cleanup(); Controls.Remove(gr); gr.Parent = null; gr.Dispose(); DoLayout(); }
public void DeleteGraph(SingleGraph g) { RemoveGraph(g); selected_ = -1; HighlightSelected(); }