コード例 #1
0
        private void plot_xysum_vs_time(MouseLog mlog, double delay, GraphComponents main_comp, GraphComponents sec_comp)
        {
            double y = 0;

            for (int i = last_start; i <= last_end; i++)
            {
                if (events[i].hDevice != mlog.hDevice)
                {
                    continue;
                }

                double x = events[i].ts + delay;
                y += events[i].lastx;
                update_minmax(x, y);
                main_comp.Add(x, y);
            }

            y = 0;

            for (int i = last_start; i <= last_end; i++)
            {
                if (events[i].hDevice != mlog.hDevice)
                {
                    continue;
                }

                double x = events[i].ts + delay;
                y += events[i].lasty;
                update_minmax(x, y);
                sec_comp.Add(x, y);
            }
        }
コード例 #2
0
        private void plot_yvelocity_vs_time(MouseLog mlog, double delay, GraphComponents main_comp, GraphComponents sec_comp)
        {
            if (mlog.Cpi > 0)
            {
                for (int i = last_start; i <= last_end; i++)
                {
                    if (events[i].hDevice != mlog.hDevice)
                    {
                        continue;
                    }

                    double x = events[i].ts + delay;
                    double y;
                    if (i == 0)
                    {
                        y = 0.0;
                    }
                    else
                    {
                        y = (events[i].lasty) / (events[i].ts - events[i].lastts) / mlog.Cpi * 25.4;
                    }

                    update_minmax(x, y);
                    main_comp.Add(x, y);
                }
            }
            else
            {
                MessageBox.Show("CPI value is invalid, please run Measure");
            }
        }
コード例 #3
0
 private void ResetPlotComponents()
 {
     BlueComponent = new GraphComponents(OxyColors.Blue);
     RedComponent  = new GraphComponents(OxyColors.Red);
     if (dual)
     {
         GreenComponent  = new GraphComponents(OxyColors.Green);
         YellowComponent = new GraphComponents(OxyColors.Orange);
     }
 }
コード例 #4
0
        private void plot_x_vs_y(MouseLog mlog, double delay, GraphComponents main_comp, GraphComponents sec_comp)
        {
            double x = 0.0;
            double y = 0.0;

            for (int i = last_start; i <= last_end; i++)
            {
                if (events[i].hDevice != mlog.hDevice)
                {
                    continue;
                }

                x += events[i].lastx;
                y += events[i].lasty;
                update_minmax(x, x);
                update_minmax(y, y);
                main_comp.Add(x, y, false);
            }
        }
コード例 #5
0
        private void plot_frequency_vs_time(MouseLog mlog, double delay, GraphComponents main_comp, GraphComponents sec_comp)
        {
            for (int i = last_start; i <= last_end; i++)
            {
                if (events[i].hDevice != mlog.hDevice)
                {
                    continue;
                }

                double x = events[i].ts;
                double y;
                if (i == 0)
                {
                    y = 0.0;
                }
                else
                {
                    y = 1000.0 / (events[i].ts - events[i].lastts);
                }

                update_minmax(x, y);
                main_comp.Add(x, y);
            }
        }
コード例 #6
0
ファイル: MousePlot.cs プロジェクト: dobragab/MouseTester
 private void ResetPlotComponents()
 {
     BlueComponent = new GraphComponents(OxyColors.Blue);
     RedComponent = new GraphComponents(OxyColors.Red);
     if (dual)
     {
         GreenComponent = new GraphComponents(OxyColors.Green);
         YellowComponent = new GraphComponents(OxyColors.Orange);
     }
 }
コード例 #7
0
ファイル: MousePlot.cs プロジェクト: dobragab/MouseTester
        private void plot_yvelocity_vs_time(MouseLog mlog, double delay, GraphComponents main_comp, GraphComponents sec_comp)
        {
            if (mlog.Cpi > 0)
            {
                for (int i = last_start; i <= last_end; i++)
                {
                    if (events[i].hDevice != mlog.hDevice)
                        continue;

                    double x = events[i].ts + delay;
                    double y;
                    if (i == 0)
                        y = 0.0;
                    else
                        y = (events[i].lasty) / (events[i].ts - events[i].lastts) / mlog.Cpi * 25.4;

                    update_minmax(x, y);
                    main_comp.Add(x, y);
                }
            }
            else
                MessageBox.Show("CPI value is invalid, please run Measure");
        }
コード例 #8
0
ファイル: MousePlot.cs プロジェクト: dobragab/MouseTester
        private void plot_ysum_vs_time(MouseLog mlog, double delay, GraphComponents main_comp, GraphComponents sec_comp)
        {
            double y = 0;

            for (int i = last_start; i <= last_end; i++)
            {
                if (events[i].hDevice != mlog.hDevice)
                    continue;

                double x = events[i].ts + delay;
                y += events[i].lasty;
                update_minmax(x, y);
                main_comp.Add(x, y);
            }
        }
コード例 #9
0
ファイル: MousePlot.cs プロジェクト: dobragab/MouseTester
        private void plot_x_vs_y(MouseLog mlog, double delay, GraphComponents main_comp, GraphComponents sec_comp)
        {
            double x = 0.0;
            double y = 0.0;
            for (int i = last_start; i <= last_end; i++)
            {
                if (events[i].hDevice != mlog.hDevice)
                    continue;

                x += events[i].lastx;
                y += events[i].lasty;
                update_minmax(x, x);
                update_minmax(y, y);
                main_comp.Add(x, y, false);
            }
        }
コード例 #10
0
ファイル: MousePlot.cs プロジェクト: dobragab/MouseTester
        private void plot_interval_vs_time(MouseLog mlog, double delay, GraphComponents main_comp, GraphComponents sec_comp)
        {
            for (int i = last_start; i <= last_end; i++)
            {
                if (events[i].hDevice != mlog.hDevice)
                    continue;

                double x = events[i].ts;
                double y;
                if (i == 0)
                    y = 0.0;
                else
                    y = events[i].ts - events[i].lastts;

                update_minmax(x, y);
                main_comp.Add(x, y);
            }
        }