public MainViewModel() { InputViewModel = new InputViewModel(); CriterionPickerViewModel = new CriterionPickerViewModel(InputViewModel); InputViewModel.InitializeCallbacks(CriterionPickerViewModel.AddStateParameters, CriterionPickerViewModel.RemoveStateParameters); RunCommand = new CommandHandler <Action>(Run, () => true); OpenFileCommand = new CommandHandler <Func <string> >(OpenFile, () => true); }
public CriterionPickerViewModel(InputViewModel inputViewModel) { _inputViewModel = inputViewModel; Criteria = new Dictionary <string, ICriterion> { ["Bayes"] = new Bayes(), ["Hurwicz"] = new Hurwicz(), ["Pessimistic MinMax"] = new PessimisticMinMax(), ["Optimistic MinMax"] = new OptimisticMinMax(), ["Savage"] = new Savage() }; CurrentCriterion = Criteria.Values.First(); }