/// <summary>
        /// Constructors
        /// </summary>
        /// <param name="manager">DataManager object.</param>
        /// <param name="sim">Simulator</param>
        public SimulationConfigurationPage(DataManager manager, Simulation sim)
        {
            InitializeComponent();
            m_manager = manager;
            m_stepCount = m_manager.StepCount;
            m_waitTime = m_manager.WaitTime;

            stepCountTextBox.Text = m_stepCount.ToString();
            waitTimeTextBox.Text = m_waitTime.ToString();
            saveCheckBox.Checked = manager.IsSaveStep;
            //if (manager.Environment.PluginManager.Status == ProjectStatus.Loaded ||
            //    manager.Environment.PluginManager.Status == ProjectStatus.Uninitialized)
            //    saveCheckBox.Enabled = true;
            //else
            //    saveCheckBox.Enabled = false;
            m_owner = sim;
        }
        /// <summary>
        /// Constructor for SimulationSetup.
        /// </summary>
        public SimulationConfigurationDialog(Simulation owner, IEnumerable<SimulationParameterSet> simParamSets)
        {
            m_owner = owner;
            InitializeComponent();
            perModelSimulationParameterBindingSource.CurrentChanged += new EventHandler(perModelSimulationParameterBindingSource_CurrentChanged);
            perModelSimulationParameterBindingSource.MoveFirst();
            m_simParamSets.SuspendBinding();

            string currentParam = m_owner.DataManager.CurrentProject.Info.SimulationParam;
            SimulationParameterSet current = null;
            foreach (SimulationParameterSet i in simParamSets)
            {
                m_simParamSets.Add(i);
                if (i.Name.Equals(currentParam))
                    current = i;
            }
            m_simParamSets.ResumeBinding();
            if (current != null)
                ChangeParameterID(current);
        }