Example #1
0
        public WavePointsListAtTime DrawSingleWavePointsList(double t, double z0, double k, double a)
        {
            double tmp_k = _k;
            double tmp_a = _a;

            _k = k;
            _a = a;
            WavePointsListAtTime l = new WavePointsListAtTime(t, z0, X, Z, Vx, Vz, P);

            _k = tmp_k;
            _a = tmp_a;
            return(l);
        }
Example #2
0
        private void ico_MouseDown(object sender, MouseButtonEventArgs e)
        {
            WavePointsListAtTime l = c.DrawSingleWavePointsList(t, z0, k, a);

            w.viewModel.DrawCurve(l);
            if (IsCanal)
            {
                w.viewModel.DeleteCanale();
                w.viewModel.DrawCanal();
            }
            w.PlotRefresh();
            Close();
        }
Example #3
0
 public void DrawCurve(WavePointsListAtTime l)
 {
     lock (locker)
     {
         PlotModel.Series.Clear();
         try
         {
             PlotModel.Series.Add(l.WaveLineSeries);
         }
         catch
         {
             PlotModel.Series.Remove(l.WaveLineSeries);
             PlotModel.Series.Add(l.WaveLineSeries);
         }
     }
 }
Example #4
0
        public void DrawWaveAtTime(double time, PlotWindowModel g)
        {
            WaveInTimeWasBuilt = false;
            WavePointsListAtTime l = WavePointsListTimeline.FirstOrDefault((list) => { if (Math.Abs(list.Time - time) <= Settings.Eps)
                                                                                       {
                                                                                           return(true);
                                                                                       }
                                                                                       else
                                                                                       {
                                                                                           return(false);
                                                                                       } });

            if (l != null)
            {
                try
                {
                    g.DrawCurve(l);
                }
                catch
                {
                    return;
                }
            }
            if (this is WaveGroupController)
            {
                WaveGroupController ctmp  = this as WaveGroupController;
                LineSeries          lSpec = new LineSeries()
                {
                    LineStyle = LineStyle.Dash, Color = OxyColors.Red, StrokeThickness = 2
                };
                for (double x = Settings.InitX0From; x <= Settings.InitX0To; x += Settings.X0_h)
                {
                    lSpec.Points.Add(new DataPoint(x, ctmp.A(x, time)));
                }
                g.DrawCurve(lSpec);
            }
            WaveInTimeWasBuilt = true;
        }