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

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

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