private void OnXYDataSeriesMenu(object sender, EventArgs e)
        {
            Series S           = Chart.Chart.Series[Tree.SelectedNode.Index];
            int    SeriesIndex = Chart.Chart.Series.IndexOf(S);

            PlotsForm F = new PlotsForm(Chart);

            F.SetSeries(S);
            if (F.ShowDialog() == DialogResult.OK)
            {
                List <Series> Series = F.GetSeries();
                if (Series.Count == 1)
                {
                    Chart.Chart.Series.Remove(S);
                    S = Chart.Chart.Series.Add(Series[0]);
                    Chart.Chart.Series.MoveTo(S, SeriesIndex);
                    bool SavedDirtyFlag = Chart.UserHasChangedProperties;
                    Chart.UserHasChangedProperties = true;
                    Chart.OnSave();
                    Chart.OnRefresh();
                    RefreshAll();
                    Chart.UserHasChangedProperties = SavedDirtyFlag;
                }
            }
        }
        private void OnAddSeriesMenu(object sender, EventArgs e)
        {
            PlotsForm F = new PlotsForm(Chart);

            if (F.ShowDialog() == DialogResult.OK)
            {
                foreach (Series S in F.GetSeries())
                {
                    S.CheckDataSource();
                    Chart.Chart.Series.Add(S);
                }
                Chart.OnSave();
                Chart.OnRefresh();
                RefreshAll();
            }
        }