private void ShowThrend(object sender)
        {
            FormsPlot chartControl = chartControl1;

            try
            {
                List <double> xs = new List <double>();
                List <double> ys = new List <double>();
                // Процедура поиска текущего контрола для отрисовки трендов
                if (extruderTabPage.Visible)
                {
                    chartControl = chartTrends;
                }
                if (calenderRollTabPage.Visible)
                {
                    chartControl = chartCalenderRoll;
                }
                if (takeoffRollTabPage.Visible)
                {
                    chartControl = chartTakeOffRoll;
                }
                if (temperingRollTabPage.Visible)
                {
                    chartControl = chartTemperingRoll;
                }
                if (winderTabPage.Visible)
                {
                    chartControl = chartWinder;
                }
                if (qualityTabPage.Visible) // Ситуация когда мы находимся на вкладке показателей качества является нетривиальной
                {
                    chartControl = chartControl1;
                    if (sender is TextBox)
                    {
                        //Поиск текстбокса и указание ограничений по времени
                        TextBox  edit       = sender as TextBox;
                        DateTime timeBefore = TrainData.Train.OrderBy(o => o.Date).First().Date;
                        DateTime timeAfter  = TrainData.Train.OrderByDescending(o => o.Date).First().Date;
                        chartControl.plt.Clear();
                        if (edit.Name.Contains("Shrinkage")) //если выбрана усадка
                        {
                            TimeSpan ts = new TimeSpan(ProductionTime.TakeOffTime);
                            foreach (OneRow row in TrainData.Train)
                            {
                                DataSet AuthorsDataSet = new DataSet();
                                AuthorsDataSet.ReadXml(XMLWork.PathShrinkage);
                                string shrinkageValues = XMLWork.FindShrinkageWithTimestamp(row.Date);
                                if ((row.Date >= timeBefore) && (row.Date <= timeAfter))
                                {
                                    xs.Add((row.Date - ts).ToOADate());
                                    ys.Add(Convert.ToDouble(shrinkageValues.Replace(".", ",")));
                                }
                            }
                            chartControl.plt.PlotScatter(xs.ToArray(), ys.ToArray(), lineWidth: 2, markerShape: MarkerShape.none, label: "Shrinkage value");
                        }
                        else
                        {
                            //Отрисовка
                            int parameterID = XMLWork.FindID(edit.Name.Replace("_", "."));
                            foreach (OneRow row in TrainData.Train)
                            {
                                if ((row.Date >= timeBefore) && (row.Date <= timeAfter))
                                {
                                    xs.Add(row.Date.ToOADate());
                                    ys.Add(Convert.ToDouble(row.Output[parameterID]));
                                }
                            }
                            chartControl.plt.PlotScatter(xs.ToArray(), ys.ToArray(), lineWidth: 2, markerShape: MarkerShape.none, label: XMLWork.FindNameWithID(parameterID, Properties.Settings.Default.Languages));
                        }
                    }
                    chartControl.plt.Ticks(dateTimeX: true);
                    chartControl.plt.Legend(location: legendLocation.upperRight, shadowDirection: shadowDirection.none);
                    chartControl.plt.AxisAuto();
                    double xDelta = Math.Abs(xs.Max() - xs.Min());
                    double yDelta = Math.Abs(ys.Max() - ys.Min());
                    chartControl.plt.Axis(xs.Min() - xDelta * 0.05, xs.Max() + xDelta * 0.05, ys.Min() - yDelta * 0.05, ys.Max() + yDelta * 0.05); chartControl.Render();
                    return;
                }
                if (sender is TextBox)
                {
                    //Поиск текстбокса и указание ограничений по времени
                    TextBox  edit       = sender as TextBox;
                    DateTime timeBefore = TrainData.Train.OrderBy(o => o.Date).First().Date;
                    DateTime timeAfter  = TrainData.Train.OrderByDescending(o => o.Date).First().Date;
                    chartControl.plt.Clear();
                    //Отрисовка
                    int parameterID = XMLWork.FindID(edit.Name);
                    foreach (OneRow row in TrainData.Train)
                    {
                        if ((row.Date >= timeBefore) && (row.Date <= timeAfter) && (!qualityTabPage.Visible))
                        {
                            xs.Add(row.Date.ToOADate());
                            ys.Add(Convert.ToDouble(row.Input[parameterID]));
                        }
                    }
                    chartControl.plt.PlotScatter(xs.ToArray(), ys.ToArray(), lineWidth: 2, markerShape: MarkerShape.none, label: XMLWork.FindNameWithID(parameterID, Properties.Settings.Default.Languages));
                    chartControl.plt.Ticks(dateTimeX: true);
                    chartControl.plt.Legend(location: legendLocation.upperRight, shadowDirection: shadowDirection.none);
                    chartControl.plt.AxisAuto();
                    double xDelta = Math.Abs(xs.Max() - xs.Min());
                    double yDelta = Math.Abs(ys.Max() - ys.Min());
                    chartControl.plt.Axis(xs.Min() - xDelta * 0.05, xs.Max() + xDelta * 0.05, ys.Min() - yDelta * 0.05, ys.Max() + yDelta * 0.05);
                    chartControl.Render();
                }
            }
            catch (Exception exception)
            {
                MessageBox.Show(Localization.MyStrings.SomethingWrong + exception.ToString());
            }
        }