예제 #1
0
 // TODO: DON'T FORGET TO CALL EVENT ON VRAM UPDATES
 public void UpdateViews()
 {
     OnRegistersUpdated?.Invoke(_memoryManager.GetRegisters());
     OnStateChanged?.Invoke(_currentState, _currentState);
     OnStatusFlagUpdated?.Invoke(_memoryManager.GetStatusFlags());
     OnVRAMUpdated?.Invoke(_memoryManager.GetVRAM().ToArray());
 }
예제 #2
0
 private void RaiseHandlerState(HandlerState state)
 {
     StateChangedEventHandler?.Invoke(this, new AssociationStateChangedEventArgs(state));
 }
예제 #3
0
        /// <summary>
        /// Raises the state change event.
        /// </summary>
        /// <param name="newState">New state the machine has switched to.</param>
        /// <param name="previousState">Previous state the machine has switched from.</param>
        private void RaiseOnStateChangedEvent(State newState, State previousState)
        {
            StateChangedEventHandler handler = OnStateChanged;

            handler?.Invoke(this, new StateChangeEventArgs(newState, previousState));
        }