public TimeSeriesEditor()
        {
            InitializeComponent();
            timeSeriesGroup = new TimeSeriesGroup();
            timestampSeriesGrid = new TimestampSeriesGrid();
            timestampSeriesGrid.Visible = false;

            timespanSeriesGrid = new TimespanSeriesGrid();
            timespanSeriesGrid.Visible = false;

            tsPlot = new TimeSeriesPlot(timeSeriesGroup);
            //tsPlot.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right)));
            tsPlot.Height = this.mainSplitContainer.Panel1.Height;
            tsPlot.Width = this.mainSplitContainer.Panel1.Width;
            this.mainSplitContainer.Panel1.Controls.Add(tsPlot);
            tsPlot.Anchor = (AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);

            timestampSeriesGrid.Anchor = (AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
            timespanSeriesGrid.Anchor = (AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
            this.mainSplitContainer.Panel2.Controls.Add(timestampSeriesGrid);
            this.mainSplitContainer.Panel2.Controls.Add(timespanSeriesGrid);
            this.tsPlot.Visible = false;
            this.Update();
            
        }
        public TimsspanSeriesPlotForm()
        {
            
            InitializeComponent();

            timeSeriesGroup = new TimeSeriesGroup();

            //TimestampSeries timestampSeries = new TimestampSeries();
            //timestampSeries.AddTimeValueRecord(new TimeValue(new DateTime(2010, 1, 1, 0, 0, 0), 5.0));
            //timestampSeries.AddTimeValueRecord(new TimeValue(new DateTime(2010, 1, 2, 0, 0, 0), 5.0));
            //timestampSeries.AddTimeValueRecord(new TimeValue(new DateTime(2010, 1, 3, 0, 0, 0), 5.0));

            //TimestampSeries timestampSeries1 = new TimestampSeries();
            //timestampSeries1.AddTimeValueRecord(new TimeValue(new DateTime(2010, 1, 1, 0, 0, 0), 2.0));
            //timestampSeries1.AddTimeValueRecord(new TimeValue(new DateTime(2010, 1, 2, 0, 0, 0), 2.0));
            //timestampSeries1.AddTimeValueRecord(new TimeValue(new DateTime(2010, 1, 3, 0, 0, 0), 2.0));
            
            TimespanSeries timespanSeries = new TimespanSeries();
            timespanSeries.Items.Add(new TimespanValue(new Timespan(new DateTime(2010, 1, 1, 0, 0, 0), new DateTime(2010, 1, 2, 0, 0, 0)), 2));
            timespanSeries.Items.Add(new TimespanValue(new Timespan(new DateTime(2010, 1, 2, 0, 0, 0), new DateTime(2010, 1, 3, 0, 0, 0)), 3));
            timespanSeries.Items.Add(new TimespanValue(new Timespan(new DateTime(2010, 1, 3, 0, 0, 0), new DateTime(2010, 1, 4, 0, 0, 0)), 6));
            
            //timeSeriesGroup.TimeSeriesList.Add(timestampSeries);
            //timeSeriesGroup.TimeSeriesList.Add(timestampSeries1);
            timeSeriesGroup.Items.Add(timespanSeries);
            timeSeriesPlot = new TimeSeriesPlot(timeSeriesGroup);
            timeSeriesPlot.Visible = true;


            timeSeriesPlot.Anchor = (AnchorStyles.Bottom | AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right);
            this.Controls.Add(timeSeriesPlot);
            this.Update();
            

           
           
        }