Beispiel #1
0
        private void UpdateLinearNavigation()
        {
            String      strRoute     = toolStripComboBoxFacility.Text;
            String      strDirection = toolStripComboBoxDirection.Text;
            String      strStation   = toolStripTextBoxStation.Text;
            double      dStation     = double.Parse(strStation);
            String      strYear      = toolStripComboBoxYear.Text;
            ImageObject io           = m_NavigationObject.UpdateNavigation(strRoute, strDirection, dStation, strYear);

            toolStripTextBoxFrameDelay.Visible = false;
            toolStripLabelSecond.Text          = toolStripTextBoxFrameDelay.Text + " seconds";

            double dTime = 0.25;

            try
            {
                dTime = double.Parse(toolStripTextBoxFrameDelay.Text);
            }
            catch (Exception except)
            {
                OutputWindow.WriteOutput("Error: Parsing Frame Delay.  A number greater than zero must be entered." + except.Message);
            }
            if (dTime <= 0)
            {
                dTime = 0.1;
                toolStripTextBoxFrameDelay.Text = "0.1";
            }



            toolStripTextBoxFrameDelay.Visible = false;
            toolStripLabelSecond.Text          = toolStripTextBoxFrameDelay.Text + " seconds";

            timerNavigation.Interval = (int)(dTime * 1000);
        }