Ejemplo n.º 1
0
        private void buttonAdd_Click(object sender, EventArgs e)
        {
            using (var form = new ManageDataSeriesForm()) {
                form.onOK += delegate {
                    Chart c = form.GetChartData();

                    if (c != null)
                    {
                        Charts.Add(c);
                        listBoxCharts.SelectedIndex = Charts.Count - 1;
                    }
                };

                form.ShowDialog();
                splitContainer.Panel2.Invalidate(true);
            }
        }
Ejemplo n.º 2
0
        private void listBoxCharts_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            int index = listBoxCharts.IndexFromPoint(e.Location);

            using (var form = new ManageDataSeriesForm(Charts[index])) {
                form.onOK += delegate {
                    Chart c = form.GetChartData();

                    if (c != null)
                    {
                        Charts[index] = c;
                    }
                };

                form.ShowDialog();
                splitContainer.Panel2.Invalidate(true);
            }
        }