CTCOfficeGUI.SimulatorWindow.OnSetSimulationSpeedClicked C# (CSharp) Метод

OnSetSimulationSpeedClicked() приватный Метод

User pressed the SetSimulationSpeed button
private OnSetSimulationSpeedClicked ( object sender, EventArgs e ) : void
sender object Sender of the event
e System.EventArgs Event arguments
Результат void
        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();
            }
        }