private void CanExecuteStopStrategyCommand(object sender, CanExecuteRoutedEventArgs e) { if (!SelectedStrategy.IsStrategy()) { e.CanExecute = false; return; } e.CanExecute = SelectedStrategy.SessionType != SessionType.Optimization ? SelectedStrategy.ProcessState == ProcessStates.Started : new StopStrategyCommand(SelectedStrategy).CanProcess(SelectedStrategy); }
private void CanExecuteRemoveEmulation(object sender, CanExecuteRoutedEventArgs e) { e.CanExecute = SelectedStrategy.IsStrategy() && SelectedStrategy.SessionType != SessionType.Battle; }
private void CanExecuteRemoveStrategy(object sender, CanExecuteRoutedEventArgs e) { e.CanExecute = SelectedStrategy.IsStrategy() && SelectedStrategy.SessionType == SessionType.Battle && SelectedStrategy.ProcessState == ProcessStates.Stopped; }
private bool CheckStrategyType() { return(SelectedStrategy != null && ((IsTerminal && SelectedStrategy.IsTerminal()) || (IsStrategy && SelectedStrategy.IsStrategy()))); }