public WaveformDisplayViewModel(IEventAggregator events, IGetWaveform getWaveform) { _events = events ?? throw new ArgumentNullException(nameof(events)); _getWaveform = getWaveform ?? throw new ArgumentNullException(nameof(getWaveform)); WaveformImage = BitmapFactory.New(800, 200); _events.Subscribe(this); }
public WaveformViewModel(IEventAggregator events, IGetWaveform getWaveform, WaveformSettings waveformSettings = null) : base(events, getWaveform) { var settings = waveformSettings ?? new WaveformSettings(); _ticksEach = settings.TicksEach; BackgroundBrush = new SolidColorBrush(settings.BackgroundColor); LeftBrush = new SolidColorBrush(settings.LeftColor); RightBrush = new SolidColorBrush(settings.RightColor); _positionBrush = new SolidColorBrush(settings.PositionColor); _selectionBrush = new SolidColorBrush(settings.SelectionColor); _userBrush = new SolidColorBrush(settings.UserColor); _separationLeftBrush = new SolidColorBrush(settings.SeparationLeftColor); _separationRightBrush = new SolidColorBrush(settings.SeparationRightColor); _userTextBrush = new SolidColorBrush(settings.UserTextColor); LastWriteBrush = new SolidColorBrush(settings.LastWriteColor); LiveDelta = settings.LiveDelta; }