private void slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e)
        {
            slider.Value = Math.Round(slider.Value, 1);
            if ((slider.Value * 10 % 2) != 0)
            {
                slider.Value -= 0.1;
            }
            chart.Series[ChartSerieName].Points.Clear();
            try
            {
                chart.Series[ChartSerieName].Points.DataBindXY(lst_x, diffur.GetListY(slider.Value));
                List <double> x_ar = new List <double>();
                for (int i = 0; i < 100; i++)
                {
                    x_ar.Add(i * 0.1);
                }
                //chart.Series["Original"].Points.DataBindXY(lst_x, diffur.GetOriginValues(slider.Value));
                chart.Series["Original"].Points.DataBindXY(x_ar, diffur.GetOriginValues(x_ar, slider.Value));
            }
            catch (Exception) {
                Debug.WriteLine("SLIDER EXCEPTION");

                Debug.WriteLine(slider.Value);
            }

            txtBlock.Text = slider.Value.ToString();
        }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            lst_x = new List <double>();
            //lst_t = new List<double>();

            for (int i = 0; i < 10; i++)
            {
                lst_x.Add(i);
            }

            c_del c_func = new c_del((x, t) => 1);
            c_del f_func =
                new c_del((x, t) => - 2 * t + 2 * x);
            y_0_del yX0 = new y_0_del((x) => x * x);
            y_0_del y0T = new y_0_del((t) => - t * t);

            diffur = new DifferentialEquation(lst_x, lst_t, c_func, f_func, yX0, y0T);

            chart.ChartAreas.Add(new ChartArea(ChartAreaName));

            // Добавим линию, и назначим ее в ранее созданную область "Default"
            chart.Series.Add(new Series(ChartSerieName));
            chart.Series[ChartSerieName].ChartArea = ChartAreaName;
            chart.Series[ChartSerieName].ChartType = SeriesChartType.Point;
            chart.Series[ChartSerieName].Color     = Color.Blue;


            chart.Series.Add(new Series("Original"));
            chart.Series["Original"].ChartArea = ChartAreaName;
            chart.Series["Original"].ChartType = SeriesChartType.Point;
            chart.Series["Original"].Color     = Color.OrangeRed;



            // добавим данные линии
            chart.Series[ChartSerieName].Points.DataBindXY(lst_x, diffur.GetListY(0));
            x_org = new List <double>();
            for (int i = 0; i < 60; i++)
            {
                x_org.Add(i * 0.1);
            }
            chart.Series["Original"].Points.DataBindXY(x_org, diffur.GetOriginValues(x_org, 0));
        }