Esempio n. 1
0
        /// <summary>
        /// Set grapher!
        /// </summary>
        /// <param name="grapher"></param>
        public void setGrapher(AbstractGrapher grapher)
        {
            if (grapher is MultiGrapher)
            {
                AbstractGrapher[] list = (grapher as MultiGrapher).getGrapherList();

                curveColors = new Color[list.Length];

                for (int i = 0; i < list.Length; i++)
                {
                    comboBoxGraphers.Items.Add(list[i].Name);
                    curveColors[i] = Color.FromName(((Rainbow)(i % 8)).ToString());
                }

                comboBoxGraphers.SelectedIndex = 0;
            }
            else
            {
                curveColors = new Color[1] { Color.Blue };

                comboBoxGraphers.Items.Add(grapher.Name);
                comboBoxGraphers.Enabled = false;
                comboBoxGraphers.SelectedIndex = 0;
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Set grapher!
        /// </summary>
        /// <param name="grapher"></param>
        public void setGrapher(AbstractGrapher grapher)
        {
            if (grapher is MultiGrapher)
            {
                AbstractGrapher[] list = (grapher as MultiGrapher).getGrapherList();

                curveColors = new Color[list.Length];

                for (int i = 0; i < list.Length; i++)
                {
                    comboBoxGraphers.Items.Add(list[i].Name);
                    curveColors[i] = Color.FromName(((Rainbow)(i % 8)).ToString());
                }

                comboBoxGraphers.SelectedIndex = 0;
            }
            else
            {
                curveColors = new Color[1] {
                    Color.Blue
                };

                comboBoxGraphers.Items.Add(grapher.Name);
                comboBoxGraphers.Enabled       = false;
                comboBoxGraphers.SelectedIndex = 0;
            }
        }