/// <summary>
        /// start the execution of the scenario
        /// </summary>
        /// <param name="scenarioId">the scenario ID</param>
        public void StartSession(Guid scenarioId)
        {
            using (SessionConfigurationWizard wizard = new SessionConfigurationWizard(scenarioId))
            {
                if (wizard.ShowDialog(this) == DialogResult.OK)
                {
                    SessionTicket ticket = wizard.Ticket;
                    SessionId = ticket.SessionId;

                    // Set the display details from the ticket
                    sessionId_Label.Text    = ticket.SessionId;
                    sessionName_Label.Text  = ticket.SessionName;
                    sessionOwner_Label.Text = ticket.SessionOwner.UserName;

                    // Start the session
                    start_ToolStripButton.Enabled = false;
                    SessionClient.Instance.PowerUp(SessionId);
                }
                else
                {
                    if (_transition != SessionStartupTransition.ReadyToStart && _transition != SessionStartupTransition.None)
                    {
                        ShutdownOptions options = new ShutdownOptions();
                        options.ShutdownDeviceSimulators = false;
                        SessionClient.Instance.Shutdown(wizard.Ticket.SessionId, options);
                    }
                }
            }
        }
Beispiel #2
0
 private void StartSession(List <Guid> scenarioIds)
 {
     try
     {
         SessionConfigurationWizard wizard = new SessionConfigurationWizard(scenarioIds);
         _sessionManager.StartSession(wizard, wizard.Ticket);
     }
     catch (Exception ex)
     {
         ApplicationExceptionHandler.UnhandledException(ex);
     }
 }