private void btSimVFR_Click(object sender, EventArgs e) { lblLink.Text = "..."; btSimVFR.BackColor = btDropLink.BackColor; // this is the native button color... OFD.Filter = "Script Files|*.vsc|All Files|*.*"; OFD.Title = "Load VFR Model File"; if (OFD.ShowDialog(this) == DialogResult.OK) { lblLink.Text = $"Simulation of: {OFD.FileName}\n"; var sim = new VFRSimulation(m_dataLocation, 2, cbxLogging.Enabled); if (sim.Valid) { btSimVFR.BackColor = Color.ForestGreen; if (!sim.RunSimulation(OFD.FileName, txRwy.Text)) { lblLink.Text += sim.Error; btSimVFR.BackColor = Color.IndianRed; } else { lblLink.Text += "KML File created in script folder"; } } else { // error lblLink.Text += sim.Error; btSimVFR.BackColor = Color.IndianRed; } lblLink.Text += $"DONE"; } }
private void btDumpIFR_Click(object sender, EventArgs e) { lblLink.Text = "..."; var sim = new VFRSimulation(m_dataLocation, 2, cbxLogging.Enabled); sim.DumpIFR( ); }
private void btSimIFR_Click(object sender, EventArgs e) { lblLink.Text = "..."; var sim = new VFRSimulation(m_dataLocation, 2, cbxLogging.Enabled); if (!sim.RunIFRSim( )) { lblLink.Text = sim.Error; btSimVFR.BackColor = Color.IndianRed; } else { lblLink.Text = "KML File created in appDir"; } }