//Updates the labels. private void UpdateLabels(GUIGAEvent e) { try { if (this.cha_line_ga.InvokeRequired) { UpdateLabelsCallback lo_cb = new UpdateLabelsCallback(UpdateLabels); this.Invoke(lo_cb, new Object[] { e }); } else { lb_bestfit.Text = e.bestfitness.ToString(); lb_gen.Text = e.ii_generations.ToString(); lb_pavfit.Text = e.avgfitness.ToString(); lb_bestc.Text = e.bestchrom; } } catch (Exception ex) { } }
public void UpdateLabels() { if (this.startButton.InvokeRequired) { UpdateLabelsCallback d = new UpdateLabelsCallback(UpdateLabels); this.Invoke(d); } else { this.learningRateTextBox.Text = learningRate.ToString(); this.momentumTextBox.Text = momentum.ToString(); this.inputNumberTextBox.Text = inputValues.ToString(); this.outputNumberTextBox.Text = outputValues.ToString(); this.cycleCountTextBox.Text = numberOfCycles.ToString(); //this.startButton.Enabled = parametersLoaded && teachingsLoaded && testsLoaded; if (this.currentNetworkType == NeuroticProgramType.NeuroticProgramTypeKohonen) { this.kohonenRadioButton.Checked = true; } else if (this.currentNetworkType == NeuroticProgramType.NeuroticProgramTypeFeedForward) { this.feedForwardRadioButton.Checked = true; } if (this.hiddenLayer != null) this.layersNumberTextBox.Text = hiddenLayer.Length.ToString(); this.startButton.Enabled = this.teachingDone && parametersLoaded && testsLoaded; this.teachButton.Enabled = parametersLoaded && teachingsLoaded; } }