public OptionGroupViewModel(IBusyService busyService, IUnityContainer container, IMessageBoxService messageBoxService, IDesktopKeyEventHandler keyEventHandler, EventAggregator eventAggregator, OptionGroup <T> optionGroup, Character owner) : base(busyService, container) { this.eventAggregator = eventAggregator; this.messageBoxService = messageBoxService; this.desktopKeyEventHandler = keyEventHandler; this.Owner = owner; this.Owner.PropertyChanged += Owner_PropertyChanged; this.OptionGroup = optionGroup; this.eventAggregator.GetEvent <AttackInitiatedEvent>().Subscribe(this.AttackInitiated); this.eventAggregator.GetEvent <AttackExecutionsFinishedEvent>().Subscribe(this.OnAttackExecutionFinished); this.eventAggregator.GetEvent <CombatMovementChangedEvent>().Subscribe((CharacterMovement cm) => { OnPropertyChanged("IsNonCombatMovementSelected"); OnPropertyChanged("IsCombatMovementSelected"); }); if (!this.IsStandardOptionGroup) { this.eventAggregator.GetEvent <RemoveOptionEvent>().Subscribe(this.RemoveOption); } clickTimer_AbilityPlay.AutoReset = false; clickTimer_AbilityPlay.Interval = 2000; clickTimer_AbilityPlay.Elapsed += new ElapsedEventHandler(clickTimer_AbilityPlay_Elapsed); InitializeCommands(); SetTooltips(); this.InitializeDesktopKeyEventHandlers(); }
public AttackConfigurationViewModel(IBusyService busyService, IUnityContainer container, IDesktopKeyEventHandler keyEventHandler, EventAggregator eventAggregator) : base(busyService, container) { this.eventAggregator = eventAggregator; this.desktopKeyEventHandler = keyEventHandler; this.eventAggregator.GetEvent <ConfigureAttacksEvent>().Subscribe(this.ConfigureAttacks); this.eventAggregator.GetEvent <ConfirmAttacksEvent>().Subscribe(this.ConfirmAttacks); InitializeCommands(); InitializeDesktopKeyEventHandlers(); }
public CharacterEditorViewModel(IBusyService busyService, IUnityContainer container, IDesktopKeyEventHandler keyEventHandler, EventAggregator eventAggregator) : base(busyService, container) { this.eventAggregator = eventAggregator; this.desktopKeyEventHandler = keyEventHandler; InitializeCommands(); this.eventAggregator.GetEvent <EditCharacterEvent>().Subscribe(this.LoadCharacter); this.eventAggregator.GetEvent <DeleteCrowdMemberEvent>().Subscribe(this.UnLoadCharacter); this.eventAggregator.GetEvent <AttackInitiatedEvent>().Subscribe(this.AttackInitiated); this.eventAggregator.GetEvent <AttackExecutionsFinishedEvent>().Subscribe(this.AttackEnded); }
public ActiveAttackViewModel(IBusyService busyService, IUnityContainer container, IMessageBoxService messageBoxService, IDesktopKeyEventHandler keyEventHandler, EventAggregator eventAggregator) : base(busyService, container) { this.eventAggregator = eventAggregator; this.messageBoxService = messageBoxService; this.desktopKeyEventHandler = keyEventHandler; InitializeCommands(); //this.eventAggregator.GetEvent<ConfigureActiveAttackEvent>().Subscribe(this.ConfigureActiveAttack); //this.eventAggregator.GetEvent<ConfirmAttackEvent>().Subscribe(this.SetActiveAttack); InitializeDesktopKeyEventHandlers(); }
public CrowdFromModelsViewModel(IBusyService busyService, IUnityContainer container, IMessageBoxService messageBoxService, IDesktopKeyEventHandler keyEventHandler, EventAggregator eventAggregator) : base(busyService, container) { this.eventAggregator = eventAggregator; this.messageBoxService = messageBoxService; this.desktopKeyEventHandler = keyEventHandler; InitializeCommands(); CreateModelsViewSource(); charExpVM = this.Container.Resolve <CharacterExplorerViewModel>(); this.eventAggregator.GetEvent <CreateCrowdFromModelsEvent>().Subscribe(this.LoadCrowd); tmpCrowd = new CrowdModel(); InitializeDesktopKeyEventHandlers(); }
public MovementEditorViewModel(IBusyService busyService, IUnityContainer container, IMessageBoxService messageBoxService, IDesktopKeyEventHandler keyEventHandler, EventAggregator eventAggregator) : base(busyService, container) { this.eventAggregator = eventAggregator; this.messageBoxService = messageBoxService; this.desktopKeyEventHandler = keyEventHandler; InitializeCommands(); this.eventAggregator.GetEvent <EditMovementEvent>().Subscribe(this.LoadMovement); this.eventAggregator.GetEvent <FinishedAbilityCollectionRetrievalEvent>().Subscribe(this.LoadReferenceResource); this.eventAggregator.GetEvent <AttackInitiatedEvent>().Subscribe(this.AttackInitiated); this.eventAggregator.GetEvent <AttackExecutionsFinishedEvent>().Subscribe(this.AttackEnded); this.eventAggregator.GetEvent <PlayMovementConfirmedEvent>().Subscribe(this.PlayMovement); this.eventAggregator.GetEvent <StopMovementEvent>().Subscribe(this.StopMovement); // Unselect everything at the beginning this.InitializeMovementSelections(); this.InitializeDesktopKeyEventHandlers(); }