private void SetupCommands() { ProgressToStep3Command = new RelayCommand(new Action <object>(ProgressToStep3), _canProgressToStep3); BuildAlgorithmCommand = new RelayCommand(new Action <object>(BuildAlgorithm), _canBuildAlgorithm); GoBackCommand = new RelayCommand(new Action <object>(_goBack)); LoadFromFile = new LoadPipelineCommand(this); LoadFromFile.Container = GlobalContainer.Instance.Container; TechniqueAlgorithms.CollectionChanged += (s, e) => ProgressToStep3Command.ExecutableStateChanged(); }
/// <summary> /// Initializes a new instance of the /// <see cref="AlgorithmBuilderViewModel"/> class. /// </summary> public AlgorithmBuilderViewModel() { AvailableAlgorithms = new ObservableCollection <AlgorithmViewModel>(); SelectedProcesses = new ObservableCollection <AlgorithmViewModel>(); SavePipeline = new PersistPipelineCommand(this); LoadPipeline = new LoadPipelineCommand(this); SavePipelineDatabase = new PersistPipelineDatabaseCommand(this); MoveDirectToStep3 = new RelayCommand(new Action <object>(_progressToStep3)); FinishButtonCommand = new RelayCommand(new Action <object>(ProgressToMainOrStep2)); _clearSelectedAlgorithms = new RelayCommand(new Action <object>(ClearSelectedCommand), _canClearSelectedAlgorithms); SelectedProcesses.CollectionChanged += _chosenProcessesCollectionChanged; ListofTechniques = new ObservableCollection <Technique>(); ImageProcessingRepository imgProRep = new ImageProcessingRepository(); ListofTechniques = imgProRep.getAllTechnique(); TechniqueAlgorithms = new ObservableCollection <AlgorithmViewModel>(); }