Beispiel #1
0
        private void GraphOrderChangeRequested(object sender, OrderChangeEventArgs e)
        {
            SingleGraph gr = graphs_[e.Source];

            graphs_.RemoveAt(e.Source);
            graphs_.Insert(e.Destination, gr);
            DoLayout();
        }
Beispiel #2
0
        private void GraphWindowActivated(object sender, EventArgs e)
        {
            SingleGraph gr = sender as SingleGraph;

            if (gr != null)
            {
                selected_ = graphs_.IndexOf(gr);
                HighlightSelected();
            }
        }
Beispiel #3
0
 public void DeleteSelected()
 {
     if (selected_ != -1)
     {
         SingleGraph gr = graphs_[selected_];
         RemoveGraph(gr);
         selected_ = -1;
         HighlightSelected();
     }
 }
Beispiel #4
0
 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();
 }
Beispiel #5
0
 public void DeleteGraph(SingleGraph g)
 {
     RemoveGraph(g);
     selected_ = -1;
     HighlightSelected();
 }