// GUI.Buttons.Learn protected void ButtonLearn(object sender, EventArgs e) { if (!HasPerceptron) { return; } if (isLearning) { VisualMode = ViewMode.ErrorSurface; ann.BreakLearn(); } else { VisualMode = ViewMode.Learning; ann.BeginLearn(DataEngine.GetData()); } // toggle isLearning = !isLearning; UpdateView(); }