public DefiningCompositeComponentSetupViewModel(ExperimentViewModel experiment, ObservableCollection<SettingsPathViewModel> componentsPaths, 
                                                        Action<TraceLab.Core.Components.CompositeComponentMetadataDefinition> howToAddToComponentsLibrary)
        {
            m_wrappedSetup = new DefiningCompositeComponentSetup((Experiment)experiment.TopLevel, howToAddToComponentsLibrary);
            CompositeComponentGraph = new ExperimentViewModel(m_wrappedSetup.CompositeComponentGraph);

            //propagate notify on wrapped properties changes
            m_wrappedSetup.PropertyChanged += WrappedPropertyChanged;

            ComponentPaths = componentsPaths;
            SelectedComponentsDirectory = ComponentPaths.First<SettingsPathViewModel>();

            AdvanceState = new DelegateCommand(DoAdvanceState, CanAdvanceState);
            BacktrackState = new DelegateCommand(DoBacktrackState, CanBacktrackState);
            DefineComponent = new DelegateCommand(ExecuteDefineComponent, CanExecuteDefineComponent);
        }
 private void DoProcess(object param)
 {
     try
     {
         BenchmarkExperimentCompleted = false;
         IProgress progress = param as IProgress;
         CurrentState = BenchmarkWizardState.Process;
         m_benchmarkWizard.PrepareBenchmarkExperiment(SelectedBenchmark);
         ExperimentViewModel model = new ExperimentViewModel(SelectedBenchmark.BenchmarkExperiment);
         BenchmarkExperiment = model;
         var baseline = SelectedBenchmark.LoadBaseline();
         SelectedBenchmark.BenchmarkExperiment.ExperimentCompleted += OnExperimentCompleted;
         SelectedBenchmark.BenchmarkExperiment.RunExperiment(progress, m_workspace, m_library, baseline);
     }
     catch (TraceLab.Core.Exceptions.ExperimentLoadException ex)
     {
         NLog.LogManager.GetCurrentClassLogger().ErrorException("Unable to load the benchmark file.", ex);
         MessageBox.Show("Unable to load the benchmark file. Error: " + ex.Message);
     }
 }
 private void SetExperimentViewModel(Experiment experiment)
 {
     var experimentViewModel = new ExperimentViewModel(experiment);
     ExperimentDocumentWrapper = new object[] { experimentViewModel };
 }