void MainView_FlightNoiseExample(FlightNoiseExampleEventArgs e) { XmlDocument xmlDoc = new XmlDocument(); if (e.FrequencyBand == FrequencyBand.Normal) { xmlDoc.LoadXml(InputDataExampleResource.FlightNoise); } else if (e.FrequencyBand == FrequencyBand.Infra) { xmlDoc.LoadXml(InputDataExampleResource.FlightNoiseInfra); } else { xmlDoc.LoadXml(InputDataExampleResource.FlightNoiseUltra); } Model.OpenFlightNoiseInputData( xmlDoc, out FlightSoundCalculationInputData id, out Dictionary <double, Color> soundLevels, out RadiusInterval radiusInterval, out FrequencyBand frequencyBand); e.InputData = new FlightNoiseInputData() { RocketBallistics = id.RocketBallistics, VehicleBallistics = id.VehicleBallistics, RocketFlowParameters = id.RocketFlowParameters, VehicleFlowParameters = id.VehicleFlowParameters, WeatherParameters = id.WeatherParameters, SoundLevels = soundLevels, RadiusInterval = radiusInterval, FrequencyBand = frequencyBand, }; }
private void FlightNoiseMenu_Click(object sender, EventArgs e) { FrequencyBand FrequencyBand; if (sender == FlightNoiseNormalMenu) { FrequencyBand = FrequencyBand.Normal; } else if (sender == FlightNoiseUltraMenu) { FrequencyBand = FrequencyBand.Ultra; } else { FrequencyBand = FrequencyBand.Infra; } var InputDataEventArgs = new FlightNoiseExampleEventArgs(FrequencyBand); FlightNoiseExample(InputDataEventArgs); SetFlightNoiseInputData(InputDataEventArgs.InputData); TabControl.SelectedIndex = 0; CalculateFlightNoiseMenuItem_Click(); }