コード例 #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;
 }
コード例 #2
0
        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));
        }
コード例 #3
0
        public TieDrawingStrategy(Tie t, IBounds bounds, VisualInfo v_info, IDelegate del)
        {
            Bounds       = bounds;
            DrawDelegate = del;

            info = v_info;
            tie  = t;
        }
コード例 #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));
        }
コード例 #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);
        }