Exemple #1
0
        public MainWindowViewModel(LevelSettingsViewModel levelSettings, AiListViewModel aiList, SimulationListViewModel simulationList, WorkManager workManager, IScheduler scheduler)
        {
            LevelSettings  = levelSettings ?? throw new ArgumentNullException(nameof(levelSettings));
            AiList         = aiList ?? throw new ArgumentNullException(nameof(aiList));
            SimulationList = simulationList ?? throw new ArgumentNullException(nameof(simulationList));

            _workManager = workManager ?? throw new ArgumentNullException(nameof(workManager));
            Simulate     = ReactiveCommand.CreateFromObservable(() => _workManager.Simulate(AiList.SelectedAis.ToList(), LevelSettings.SelectedGenerator.Value, RunCount), AiList.IsAnyAiSelected, scheduler);
        }
 public MainWindowViewModel(AiListViewModel aiList, SimulatorSettingsViewModel simulatorSettings, SimulationListViewModel simulationList)
 {
     AiList            = aiList ?? throw new ArgumentNullException(nameof(aiList));
     SimulatorSettings = simulatorSettings ?? throw new ArgumentNullException(nameof(simulatorSettings));
     SimulationList    = simulationList ?? throw new ArgumentNullException(nameof(simulationList));
 }