void CreateSeries()
        {
            if (series != null)
            {
                return;
            }
            if (selection == null)
            {
                return;
            }
            IMeasurements m = selection;

            if (m.Count < 2)
            {
                return;
            }
            double[][] d = new double[][] { (double[])m[0].Parameter(), (double[])m[1].Parameter() };
            series = new DataPerformer.Series();
            ser    = new Chart.Drawing.Series.SimpleSeries();
            int n = d[0].Length;

            for (int i = 0; i < n; i++)
            {
                double x = d[0][i];
                double y = d[1][i];
                series.AddXY(x, y);
                ser.AddXY(x, y);
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Consrutor
 /// </summary>
 /// <param name="l">Object label</param>
 /// <param name="array">Drawing array</param>
 public FormSeries(IObjectLabel l, object[] array)
     : this()
 {
     this.l     = l;
     this.array = array;
     UpdateFormUI();
     DataPerformer.Series s = l.Object as DataPerformer.Series;
     userControlSeriesTab.Series = s;
     userControlSeriesTab.Array  = array;
 }
Exemplo n.º 3
0
 internal void Save()
 {
     try
     {
         DataPerformer.Series s = nc as DataPerformer.Series;
         StaticExtensionDataPerformerUI.Save(s, this);
     }
     catch (Exception e)
     {
         e.ShowError(10);
         WindowsExtensions.ControlExtensions.ShowMessageBoxModal(e.Message);
     }
 }
Exemplo n.º 4
0
        void ShowChart()
        {
            Chart.ChartPerformer performer = userControlChart.Performer;
            performer.RemoveAll();
            ISeriesPainter sp = painterInreface.Painter;

            if (sp != null)
            {
                DataPerformer.Series series = nc as DataPerformer.Series;
                SeriesGraph          ser    = new SeriesGraph(series);
                performer.AddSeries(ser, sp);
            }
            performer.RefreshAll();
        }
Exemplo n.º 5
0
        void ShowTable()
        {
            bool b = checkBoxShow.Checked;

            ct.ShowTable = b;
            if (!b)
            {
                dataGridView.Rows.Clear();
                return;
            }
            DataPerformer.Series s = ct.Series;
            for (int i = 0; i < s.Count; i++)
            {
                object[] o = new object[] { s[i, 0], s[i, 1] };
                dataGridView.Rows.Add(o);
            }
        }
Exemplo n.º 6
0
            DataPerformer.Series CreateSeries(BitmapGraphSelection selection)
            {
                IMeasurements m = selection;

                if (m.Count < 2)
                {
                    return(null);
                }
                double[][]           d                = new double[][] { (double[])m[0].Parameter(), (double[])m[1].Parameter() };
                DataPerformer.Series series           = new DataPerformer.Series();
                Chart.Drawing.Series.SimpleSeries ser = new Chart.Drawing.Series.SimpleSeries();
                int n = d[0].Length;

                for (int i = 0; i < n; i++)
                {
                    double x = d[0][i];
                    double y = d[1][i];
                    series.AddXY(x, y);
                    ser.AddXY(x, y);
                }
                return(series);
            }
Exemplo n.º 7
0
 internal ChartTable(BitmapGraphSelection chart)
 {
     series = CreateSeries(chart);
 }