public bool?ShowForm() { var form = new EnterData(); if (form.DialogResult == DialogResult.OK) { var patient = new Pacient(); var result = Program.Controller.DataNetwork.Predict().Output; return(result == 1.0); } return(null); }
private void enterToolStripMenuItem_Click(object sender, EventArgs e) { EnterData enterData = new EnterData(); var dialogResult = enterData.ShowDialog(); Patient patient = Patient.GetInstance(); if (dialogResult == DialogResult.OK) { var inputs = patient.GetInputs(); var chance = _controller.DataNetwork.Predict(inputs); messageLabel.Text = "Шанс наличия сердечно-сосудистого заболевания составляет: " + chance.ToString("0.0%"); } }
public bool?ShowForm() { var form = new EnterData(); if (form.ShowDialog() == DialogResult.OK) { var patient = new Patient(); foreach (var textBox in form.Inputs) { patient.GetType().InvokeMember(textBox.Tag.ToString(), BindingFlags.Instance | BindingFlags.Public | BindingFlags.SetProperty, Type.DefaultBinder, patient, new object[] { textBox.Text }); } // var result =Program.Controller.DataNetwork.Predict().Output; return(false); } return(null); }
private void enterToolStripMenuItem_Click(object sender, EventArgs e) { var enterDataForm = new EnterData(); enterDataForm.Show(); }