Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 private void CanExecuteRemoveEmulation(object sender, CanExecuteRoutedEventArgs e)
 {
     e.CanExecute = SelectedStrategy.IsStrategy() && SelectedStrategy.SessionType != SessionType.Battle;
 }
Esempio n. 3
0
 private void CanExecuteRemoveStrategy(object sender, CanExecuteRoutedEventArgs e)
 {
     e.CanExecute = SelectedStrategy.IsStrategy() && SelectedStrategy.SessionType == SessionType.Battle && SelectedStrategy.ProcessState == ProcessStates.Stopped;
 }
Esempio n. 4
0
 private bool CheckStrategyType()
 {
     return(SelectedStrategy != null && ((IsTerminal && SelectedStrategy.IsTerminal()) || (IsStrategy && SelectedStrategy.IsStrategy())));
 }