Пример #1
0
        public override void Add(Metrics metrics)
        {
            base.Add(metrics);
            StaffMetrics staffMetrics = metrics as StaffMetrics;

            if (staffMetrics != null)
            {
                SetTopAndBottomMetrics(staffMetrics);
            }
        }
Пример #2
0
        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;
        }
Пример #3
0
        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;
        }