public BotDeploymentViewModel(IArenaClient arenaClient, IBotClient botClient, IDeploymentClient deploymentClient, IScriptClient scriptClient, IEventAggregator eventAggregator, IFileExplorerService fileExplorerService, IFileService fileService, ITimerService timerService, ICacheService cacheService)
        {
            _arenaClient         = arenaClient;
            _botClient           = botClient;
            _deploymentClient    = deploymentClient;
            _scriptClient        = scriptClient;
            _eventAggregator     = eventAggregator;
            _fileExplorerService = fileExplorerService;
            _fileService         = fileService;
            _cacheService        = cacheService;

            timerService.Start(TimeSpan.FromSeconds(5), RefreshArenas);

            SubscribeEvents(eventAggregator);

            SaveScriptCommand        = new RelayCommand(OnSaveScript);
            LoadScriptCommand        = new RelayCommand(OnLoadScript);
            ValidateBotScriptCommand = new RelayCommand(OnValidateBotScript);
            DeployBotCommand         = new RelayCommand(OnDeployBot,
                                                        () => SelectedArena != null && ScriptValid && (TimeUntilNextAllowedDeployment <= TimeSpan.Zero && (BotPhysicalHealth + BotStamina <= SelectedArena.MaximumPoints) /*|| CurrentTeam.Predator*/));
        }
Exemplo n.º 2
0
 public GameClient(IScriptClient scriptObject) : base(scriptObject)
 {
 }