示例#1
0
        /// <summary>
        /// Live plotting of residuals during simulation. The LivePlotting tool runs in a new Thread.
        /// </summary>
        /// <param name="millisecondsPolling"></param>
        public void PlotLive(int millisecondsPolling = 500)
        {
            //Create a Plotter and run it in a new Thread.
            try {
                ReadResiduals();
            }catch (Exception e) {
                Console.WriteLine(e);
                return;
            }

            Func <Form> LivePlotter       = () => new ResidualFormLive(this, millisecondsPolling);
            Thread      threadLivePlotter = new Thread(() => AutonomuousPlotter.DisplayWindow(LivePlotter));

            threadLivePlotter.Start();
        }
示例#2
0
        /// <summary>
        /// Plots the residuals into a graphic window. The Plot runs in a new Thread.
        /// </summary>
        public void Plot()
        {
            //Create a Plotter and start it in a new Thread.

            //try {
            //    ReadResiduals();
            //} catch (Exception e) {
            //    Console.WriteLine(e);
            //    return;
            //}

            Func <Form> Plotter       = () => new ResidualForm(this);
            Thread      threadPlotter = new Thread(() => AutonomuousPlotter.DisplayWindow(Plotter));

            threadPlotter.Start();
        }