Exemple #1
0
        public void SetBeatSegment(BeatSegment summary)
        {
            TimePanel.SetPosition(this, TimeSpan.FromTicks(summary.Position));
            TimePanel.SetDuration(this, TimeSpan.FromTicks(summary.Duration));

            BeatLine.SetBeatSegment(summary);
        }
Exemple #2
0
        public BeatSegment GetBeatSegment()
        {
            BeatSegment summary = BeatLine.GetBeatSegment();

            summary.Duration = TimePanel.GetDuration(this).Ticks;
            summary.Position = TimePanel.GetPosition(this).Ticks;

            return(summary);
        }
Exemple #3
0
        public BeatSegment GetBeatSegment()
        {
            BeatSegment summary = new BeatSegment();

            summary.Beat            = BeatDefinition;
            summary.PatternDuration = PatternDuration.Ticks;
            summary.TimeLocked      = TimeLock;

            return(summary);
        }
Exemple #4
0
        private void AddItem(BeatSegment segment)
        {
            BeatContainer container = new BeatContainer();

            container.SetBeatSegment(segment);

            _containerDictionary.Add(segment, container);

            timePanel.Children.Add(container);
        }
Exemple #5
0
        public void SetBeatSegment(BeatSegment summary)
        {
            _timeLock = summary.TimeLocked;

            if (_timeLock)
            {
                _patternRepeats = summary.Duration / (double)summary.PatternDuration;
            }

            PatternDuration = TimeSpan.FromTicks(summary.PatternDuration);
            BeatDefinition  = summary.Beat;
        }
Exemple #6
0
 private void RemoveItem(BeatSegment segment)
 {
     timePanel.Children.Remove(_containerDictionary[segment]);
     _containerDictionary.Remove(segment);
 }