Example #1
0
        private TreeNode buildNote(Note note)
        {
            var bounded = new DynamicSingleBounded(new NoteBounds(note, info, new UnorderedDelegate()));
            var handler = new DynamicNoteMouseHandler(bounded.Bounds, executor, new UnorderedMouseDelegate());
            var drawing = new DynamicDrawingVisual(new NoteDrawingStrategy(note, bounded.Bounds, info, new UnorderedDelegate()));

            return(new NoteTreeNode(note, bounded, handler, drawing));
        }
Example #2
0
        private TreeNode buildTie(Tie tie, Note note, DynamicBounds bounds)
        {
            var bounded = new DynamicSingleBounded(new TieBounds(tie, note, bounds, info, new UnorderedDelegate()));
            var handler = new DynamicEffectMouseHandler(bounded.Bounds, executor, new UnorderedMouseDelegate());
            var drawing = new DynamicDrawingVisual(new TieDrawingStrategy(tie, bounded.Bounds, info, new UnorderedDelegate()));

            return(new EffectTreeNode(tie, bounded, handler, drawing));
        }
Example #3
0
        private TreeNode buildPart(Part part)
        {
            var bounded = new DynamicSingleBounded(new DynamicPartBounds(part, info, new OrderedDelegate()));
            var handler = new DynamicPartMouseHandler(bounded.Bounds, executor, new OrderedMouseDelegate());
            var drawing = new DynamicDrawingVisual(new PartDrawingStrategy(part, bounded.Bounds, info, new OrderedDelegate()));

            return(new PartTreeNode(part, bounded, handler, drawing));
        }
Example #4
0
        private TreeNode buildPinchHarmonic(PinchHarmonic pinch_harmonic, Note note, DynamicBounds bounds)
        {
            var bounded = new DynamicSingleBounded(new PinchHarmonicBounds(pinch_harmonic, note, bounds, info, new UnorderedDelegate()));
            var handler = new DynamicEffectMouseHandler(bounded.Bounds, executor, new UnorderedMouseDelegate());
            var drawing = new DynamicDrawingVisual(new PinchHarmonicDrawingStrategy(pinch_harmonic, bounded.Bounds, info, new UnorderedDelegate()));

            return(new EffectTreeNode(pinch_harmonic, bounded, handler, drawing));
        }
Example #5
0
        private TreeNode buildChord(Chord chord)
        {
            var bounds_strat = new ChordBounds(chord, info, new UnorderedDelegate());
            var bounded      = new DynamicSingleBounded(bounds_strat);
            var handler      = new DynamicChordMouseHandler(chord, bounded.Bounds, executor, new UnorderedMouseDelegate());
            ChordDrawingStrategy strategy;

            if (chord is NoteChord)
            {
                strategy = new ChordDrawingStrategy(chord, bounds_strat.ChordBar, bounds_strat.ChordTuple, bounded.Bounds, info, new UnorderedDelegate());
            }
            else
            {
                strategy = new RestChordDrawingStrategy(chord, bounds_strat.ChordBar, bounds_strat.ChordTuple, bounded.Bounds, info, new UnorderedDelegate());
            }
            var drawing = new DynamicDrawingVisual(strategy);

            return(new ChordTreeNode(chord, bounded, handler, drawing));
        }