Ejemplo n.º 1
0
 public TieBounds(Tie t, Note n, IBounds n_bounds, VisualInfo v_info, IDelegate del)
 {
     tie         = t;
     note        = n;
     note_bounds = n_bounds;
     info        = v_info;
 }
        private TreeNode buildTie(Tie tie, Note note, IBounds bounds)
        {
            var bounded = new StaticSingleBounded(new TieBounds(tie, note, bounds, info, new UnorderedDelegate()));
            var handler = new StaticEffectMouseHandler(bounded.Bounds, new UnorderedMouseDelegate());
            var drawing = new StaticDrawingVisual(new TieDrawingStrategy(tie, bounded.Bounds, info, new UnorderedDelegate()));

            return(new EffectTreeNode(tie, bounded, handler, drawing));
        }
Ejemplo n.º 3
0
        public TieDrawingStrategy(Tie t, IBounds bounds, VisualInfo v_info, IDelegate del)
        {
            Bounds       = bounds;
            DrawDelegate = del;

            info = v_info;
            tie  = t;
        }
Ejemplo n.º 4
0
        public override IMultiEffect createMultiEffect()
        {
            if (!canCreateMultiEffect())
            {
                return(null);
            }
            Note first  = SimplifiedNote.CreatedNotesToModel[FirstNoteId];
            Note second = SimplifiedNote.CreatedNotesToModel[SecondNoteId];

            return(Tie.createInstance(first, second));
        }
Ejemplo n.º 5
0
        public void readInMultiEffect(SimplifiedMultiEffect effect)
        {
            if (effect == null || !canReadInMultiEffect(effect))
            {
                return;
            }
            Note first  = created_notes[effect.FirstNoteId];
            Note second = created_notes[effect.SecondNoteId];

            if (effect is SimplifiedSlide)
            {
                created_effects.Add(Slide.createInstance(first, second, (effect as SimplifiedSlide).Legato));
            }
            else if (effect is SimplifiedHOPO)
            {
                created_effects.Add(HOPO.createInstance(first, second));
            }
            else if (effect is SimplifiedTie)
            {
                created_effects.Add(Tie.createInstance(first, second));
            }
        }
Ejemplo n.º 6
0
        public IMultiEffect genEffect(CommandSelections selection)
        {
            Note         first  = selection.SelectedNote[0];
            Note         second = selection.SelectedNote[1];
            IMultiEffect effect = null;

            switch (selection.SelectedEffectType)
            {
            case EffectType.Slide:
                effect = Slide.createInstance(first, second, selection.Legato ?? false);
                break;

            case EffectType.HOPO:
                effect = HOPO.createInstance(first, second);
                break;

            case EffectType.Tie:
                effect = Tie.createInstance(first, second);
                break;
            }
            selection.SelectedEffect = effect;
            return(effect);
        }