private void btnShowMeshCap_Click(object sender, EventArgs e) { this.SetupMeshParameters(); if ((this.s3r < this.s2r) && this.chkGenerateCompleteModel.Checked) { MessageBox.Show("Incorrect distances values", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error); return; } this.mesh_generator.GeneratePlainMesh(); if (this.chkGeneratePlainElectrodes.Enabled && this.chkGeneratePlainElectrodes.Checked) { this.mesh_generator.GeneratePlainElectrodesDistribution(); } if (this.cap_visualiser == null) { this.cap_visualiser = new CapMeshVisualiser(this.mesh_generator, this); this.cap_visualiser.chkAutoUpdate.Checked = this.auto_update; } if (sender != null) { if (!this.cap_visualiser.Visible) { this.cap_visualiser.Show(); } } this.cap_visualiser.UpdateVisualisation(); }
public MainWindow() { this.InitializeComponent(); this.OnChangeSensorParameters(null, null); this.mesh_generator = null; this.cap_visualiser = null; this.RestoreValues(); UpdateGUIEvent(null, null); }