예제 #1
0
파일: ResidualLog.cs 프로젝트: xyuan/BoSSS
        /// <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
파일: ResidualLog.cs 프로젝트: xyuan/BoSSS
        /// <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();
        }