Ejemplo n.º 1
0
        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 TimespanSeriesGridFrom()
        {
            InitializeComponent();

            //timeSeriesGroup = new TimeSeriesGroup();
            //timeSeriesGroup.TimeSeriesList.Add(new TimeSeries());
            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)), 4.5));
            timespanSeries.AppendValue(3.3);
            timespanSeries.AppendValue(6.6);
            //timespanSeriesGrid = new TimespanSeriesGrid(timeSeriesGroup.TimeSeriesList[0]);
            timespanSeriesGrid = new TimespanSeriesGrid(timespanSeries);
            timespanSeriesGrid.Visible = true;

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