// 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()); }
private void RaiseHandlerState(HandlerState state) { StateChangedEventHandler?.Invoke(this, new AssociationStateChangedEventArgs(state)); }
/// <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)); }