示例#1
0
        public void AddGraphs(DataManager mgr, List <GraphConfig> configs)
        {
            foreach (GraphConfig c in configs)
            {
                SingleGraph graph = new WinChartGraph(graphs_.Count, mgr, c);
                graph.Activated          += GraphWindowActivated;
                graph.OrderChangeRequest += GraphOrderChangeRequested;
                graph.Parent              = this;
                Controls.Add(graph);
                graph.Visible = true;
                graph.Enabled = true;
                graphs_.Add(graph);
            }

            DoLayout();
        }
示例#2
0
        public void AddGraph(DataManager mgr, string xvar)
        {
            if (graphs_.Count == 9)
            {
                MessageBox.Show("Nine is the maximum number of graphs allowed", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            SingleGraph graph = new WinChartGraph(graphs_.Count, mgr, xvar);

            graph.Activated          += GraphWindowActivated;
            graph.OrderChangeRequest += GraphOrderChangeRequested;
            graph.Parent              = this;
            Controls.Add(graph);
            graph.Visible = true;
            graph.Enabled = true;

            graphs_.Add(graph);

            DoLayout();

            selected_ = graphs_.Count - 1;
            HighlightSelected();
        }