public SimulationSettingsWindow(SimulationSettings settings, FMTesterConfiguration configuration, ExecutionInstance instance, ExecutionEnvironment environment)
        {
            InitializeComponent();
            this.EnableDWMDropShadow = true;
            this.ShowMinButton = false;
            this.ShowMaxRestoreButton = false;

            simulationControl = new SimulationSettingsControl(this, settings, configuration, instance, environment);
            this.Container.Children.Add(simulationControl);
        }
        internal NewProjectViewModel(ICollection<ExecutionEnvironment> availableExecutionEngines, ref ExecutionInstance executionInstance, FMTesterConfiguration configuration, StackPanel controlContainer)
        {
            executionEnvironments = new CollectionView(availableExecutionEngines);
            executionInstance = new ExecutionInstance();

            this.simulationSettingsControl = null;
            this.executionInstance = executionInstance;
            this.appConfiguration = configuration;
            SelectedEnvironment = availableExecutionEngines.First();

            this.controlContainer = controlContainer;
            this.currentView = new NewProjectControl();
            this.currentView.DataContext = this;
            controlContainer.Children.Add(currentView);

            IsDone = false;
        }
        internal void ShowNext(object sender, NewProjectWindow window)
        {
            bool success = (currentView as IExecutionInstanceWorker).Process(executionInstance);

            if (!success) return;

            if (currentView.GetType() == typeof(NewProjectControl))
            {
                // TODO not working if view is in another assembly, to be added
                controlContainer.Children.Remove(currentView);
                currentView = (UserControl)Activator.CreateInstance(Type.GetType("FM4CC.WPFGUI.ExecutionEngine." + executionInstance.Environment + "ConfigurationControl", true, true));
                controlContainer.Children.Add(currentView);
                currentView.DataContext = this;
                (sender as Button).Content = "Next";
            }
            else
            {
                (sender as Button).Visibility = System.Windows.Visibility.Collapsed;
                window.controlContainer.SetBinding(Grid.RowSpanProperty, "2");
                IsDone = true;

                controlContainer.Children.Remove(currentView);
                simulationSettingsControl = new SimulationSettingsControl(window, null, appConfiguration, executionInstance, SelectedEnvironment);
                controlContainer.Children.Add(simulationSettingsControl);
            }
        }