Пример #1
0
 public HOPOBounds(HOPO h, Note n, IBounds n_bounds, VisualInfo v_info, IDelegate del)
 {
     hopo        = h;
     note        = n;
     note_bounds = n_bounds;
     info        = v_info;
 }
        private TreeNode buildHOPO(HOPO hopo, Note note, IBounds bounds)
        {
            var bounded = new StaticSingleBounded(new HOPOBounds(hopo, note, bounds, info, new UnorderedDelegate()));
            var handler = new StaticEffectMouseHandler(bounded.Bounds, new UnorderedMouseDelegate());
            var drawing = new StaticDrawingVisual(new HOPODrawingStrategy(hopo, bounded.Bounds, info, new UnorderedDelegate()));

            return(new EffectTreeNode(hopo, bounded, handler, drawing));
        }
Пример #3
0
        public HOPODrawingStrategy(HOPO h, IBounds bounds, VisualInfo v_info, IDelegate del)
        {
            Bounds       = bounds;
            DrawDelegate = del;

            info = v_info;
            hopo = h;
        }
Пример #4
0
        public override IMultiEffect createMultiEffect()
        {
            if (!canCreateMultiEffect())
            {
                return(null);
            }
            Note first  = SimplifiedNote.CreatedNotesToModel[FirstNoteId];
            Note second = SimplifiedNote.CreatedNotesToModel[SecondNoteId];

            return(HOPO.createInstance(first, second));
        }
Пример #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));
            }
        }
Пример #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);
        }