/// <summary> /// Handles removing the clue window so the rest of the screen is displayed /// </summary> /// <param name="clue"></param> private void ClueClick(ClickClue clue) { // Find the clue window in the hierarchy var clueWindow = FindChild <ClueWindowBase>(Parent, clue.ClueName); // Remove the overlay window GameCanvas.Children.Remove(clueWindow); clueWindow.Dispose(); kb.SuspendNotifications(true); }
/// <summary> /// Constructor /// </summary> public PlayMainControl() { InitializeComponent(); eventAggregator = ServiceLocator.Current.GetInstance <IEventAggregator>(); kb = ServiceLocator.Current.GetInstance <IKeyboardCapture>() as LockoutKeyboardCapture; kb.SuspendNotifications(true); cardClickToken = eventAggregator.GetEvent <PubSubEvent <ClickCard> >().Subscribe((card) => CardClick(card)); clueClickToken = eventAggregator.GetEvent <PubSubEvent <ClickClue> >().Subscribe((clue) => ClueClick(clue)); }