// Constructors public IntervalViewModel(IIntervalViewModel intervalViewModel, ISeriesViewModel seriesViewModel, IChartState chartState) { this.intervalViewModel = intervalViewModel; this.intervalViewModel.PropertyChanged += this.OnViewModelPropertyChanged; this.seriesViewModel = seriesViewModel; this.seriesViewModel.PropertyChanged += this.OnViewModelPropertyChanged; this.chartState = chartState; this.chartState.PropertyChanged += this.OnChartStatePropertyChanged; }
// Methods public int AddInterval(int seriesUID, IIntervalViewModel ivm) { int intervalNumber = -1; ISeriesViewModel series; bool found = this.seriesList.TryGetValue(seriesUID, out series); if (found) { var interval = new Interval(new IntervalViewModel(ivm, series, this.chartState), this.chartState); interval.IntervalResized += this.OnIntervalResized; intervalNumber = Field.Add(interval); } return(intervalNumber); }
// Constructors public IntervalResizedEventArgs(IIntervalViewModel viewModel, int startDelta, int spanDelta) { this.ViewModel = viewModel; this.StartDelta = startDelta; this.SpanDelta = spanDelta; }