private void OnSetSimulationSpeedClicked(object sender, EventArgs e)
{
double speed;
bool valid = false;
if (Double.TryParse(txtSpeed.Text, out speed))
{
if (m_simulator.SetSimulationSpeed(speed)) //Set the simulation speed
{
valid = true;
}
}
if (!valid)
{
//Show invalid popup
m_okPopup = new MessageDialog("Time is invalid", "OK", OnPopupAcknowledged);
m_okPopup.TitleBarText = "Error";
m_okPopup.Show();
}
}