Ejemplo n.º 1
0
        public StrategyTab()
        {
            InitializeComponent();

            _holder = new StrategyInfoHolder();
            _holder.StrategyInfosUpdated += () => GuiDispatcher.GlobalDispatcher.AddAction(() =>
            {
                var registry = ConfigManager.TryGetService <IStudioEntityRegistry>();
                OpenStrategyInfoBtn.IsEnabled = registry != null && registry.Strategies.Any(s => s.IsStrategy());
            });
            _holder.StrategiesUpdated += () => GuiDispatcher.GlobalDispatcher.AddAction(() =>
            {
                OpenStrategyBtn.IsEnabled = SelectedStrategyInfo.IsStrategy() && SelectedStrategyInfo.Strategies.Any();
            });

            Loaded += OnLoaded;
        }
Ejemplo n.º 2
0
 private void CanExecuteAddOptimization(object sender, CanExecuteRoutedEventArgs e)
 {
     e.CanExecute = SelectedStrategyInfo.IsStrategy();
 }
Ejemplo n.º 3
0
 private void CanExecuteAddEmulation(object sender, CanExecuteRoutedEventArgs e)
 {
     e.CanExecute = SelectedStrategyInfo.IsStrategy() && !SelectedStrategyInfo.GetIsNoEmulation();
 }
Ejemplo n.º 4
0
 private void CanExecuteRemoveStrategyInfo(object sender, CanExecuteRoutedEventArgs e)
 {
     e.CanExecute = SelectedStrategyInfo.IsStrategy();
 }