Exemple #1
0
        public static CurveData CreateSample()
        {
            CurveData data = new CurveData();

            for (int i = 0; i < 10000; i++)
            {
                double x = i / 100.0;
                data.AddCoordinate(new Coordinate(x, 70 * Math.Sin(x * Math.PI / 5.0)));
            }
            return(data);
        }
Exemple #2
0
        private void ThreadOnProgressChanged(IPAddress address, ResponsePackage p)
        {
            NotifyEventArgs args = new NotifyEventArgs();

            args.Options = new object[2] {
                p.Response, address
            };
            args.Points = p.Points;
            args.Id     = p.Id;
            args.Tag    = p.Tag;
            int       count = p.Points == null ? 0 : p.Points.Length;
            CurveData data  = GetCurveData(args.Id);

            if (data != null)
            {
                data.AddCoordinates(args.Points);
            }
            worker.ReportProgress(0, args);
        }