private void btnClear_Click(object sender, EventArgs e) { separatorLine = new SeparatorLine(); dataPoints.Clear(); chartSepLine.Points.Clear(); chartSepLine.Points.AddXY(separatorLine.P1.XValue, separatorLine.P1.YValues[0]); chartSepLine.Points.AddXY(separatorLine.P2.XValue, separatorLine.P2.YValues[0]); redPoints.Points.Clear(); bluePoints.Points.Clear(); StoreTrainingSet(); }
public Training(MainMenu mainMenu) { InitializeComponent(); mainMenuWindow = mainMenu; separatorLine = new SeparatorLine(); dataPoints = new List<DataPoint>(); chrtHypSeparator.Series.Clear(); chrtHypSeparator.ChartAreas[0].AxisX.MajorGrid.Enabled = false; chrtHypSeparator.ChartAreas[0].AxisY.MajorGrid.Enabled = false; chrtHypSeparator.ChartAreas[0].AxisX.Crossing = 0; chrtHypSeparator.ChartAreas[0].AxisY.Crossing = 0; chrtHypSeparator.ChartAreas[0].AxisX.Minimum = 0; chrtHypSeparator.ChartAreas[0].AxisX.Maximum = 10; chrtHypSeparator.ChartAreas[0].AxisY.Minimum = 0; chrtHypSeparator.ChartAreas[0].AxisY.Maximum = 10; chrtHypSeparator.ChartAreas[0].AxisX.Interval = 1; chrtHypSeparator.ChartAreas[0].AxisY.Interval = 1; chartSepLine = chrtHypSeparator.Series.Add("H. Separador"); chartSepLine.ChartType = SeriesChartType.Line; chartSepLine.Color = Color.Black; chartSepLine.Points.Clear(); chartSepLine.Points.AddXY(separatorLine.P1.XValue, separatorLine.P1.YValues[0]); chartSepLine.Points.AddXY(separatorLine.P2.XValue, separatorLine.P2.YValues[0]); redPoints = chrtHypSeparator.Series.Add("Clase Rojo"); redPoints.ChartType = SeriesChartType.Point; redPoints.MarkerColor = Color.Red; bluePoints = chrtHypSeparator.Series.Add("Clase Azul"); bluePoints.ChartType = SeriesChartType.Point; bluePoints.MarkerColor = Color.Blue; dragging = false; }