Ejemplo n.º 1
0
        /// <summary>
        /// Add a sample to a graphic serie, if the serie doesn't exist a new serie will be created
        /// </summary>
        /// <param name="SerieName">Name of the serie in which the sample will be added</param>
        /// <param name="Time">Time value of the sample</param>
        /// <param name="Value">Value of the sample</param>
        public void AddGraphicSerieSample(string SerieName, double Time, double Value)
        {
            SingleGraphicSerie oSerie = null;

            if (!(GraphSerieExists(SerieName)))
            {
                oSerie      = new SingleGraphicSerie();
                oSerie.Name = SerieName;
                Series.Add(oSerie);
            }
            else
            {
                oSerie = GetGraphSerie(SerieName);
            }

            if (!(oSerie == null))
            {
                oSerie.Times.Add(Time);
                oSerie.Data.Add(Value);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Create the graphic series of the record
        /// </summary>
        public void CreateRecordGrahphicSeries()
        {
            if (!(Channels == null))
            {
                GraphSeries = new GraphicSeries();

                foreach (RecordDataChannel oChan in Channels)
                {
                    SingleGraphicSerie oSerie = new SingleGraphicSerie();

                    oSerie.Name = oChan.Name;

                    foreach (RecordDataSample oSample in oChan.Samples)
                    {
                        oSerie.Times.Add(oSample.TimeStamp);
                        oSerie.Data.Add(oSample.SampleValue);
                    }

                    GraphSeries.Series.Add(oSerie);
                }

                GraphSeries.ProcessGraphicSeries();
            }
        }