public override void Add(Metrics metrics) { base.Add(metrics); StaffMetrics staffMetrics = metrics as StaffMetrics; if (staffMetrics != null) { SetTopAndBottomMetrics(staffMetrics); } }
private void SetTopAndBottomMetrics(StaffMetrics staffMetrics) { _notesTop = _notesTop < staffMetrics.Top ? _notesTop : staffMetrics.Top; _stafflinesTop = _stafflinesTop < staffMetrics.StafflinesTop ? _stafflinesTop : staffMetrics.StafflinesTop; _stafflinesBottom = _stafflinesBottom > staffMetrics.StafflinesBottom ? _stafflinesBottom : staffMetrics.StafflinesBottom; _notesBottom = _notesBottom > staffMetrics.Bottom ? _notesBottom : staffMetrics.Bottom; }