Exemplo n.º 1
0
 public BendBounds(Bend b, Note n, IBounds n_bounds, VisualInfo v_info, IDelegate del)
 {
     bend        = b;
     note        = n;
     note_bounds = n_bounds;
     info        = v_info;
 }
        private TreeNode buildBend(Bend bend, Note note, IBounds bounds)
        {
            var bounded = new StaticSingleBounded(new BendBounds(bend, note, bounds, info, new UnorderedDelegate()));
            var handler = new StaticEffectMouseHandler(bounded.Bounds, new UnorderedMouseDelegate());
            var drawing = new StaticDrawingVisual(new BendDrawingStrategy(bend, bounded.Bounds, info, new UnorderedDelegate()));

            return(new EffectTreeNode(bend, bounded, handler, drawing));
        }
Exemplo n.º 3
0
 public BendMenuStrategy(GuiCommandExecutor gui, NodeClick click, Bend bend)
     : base(gui, click, EffectType.Bend)
 {
     init_amount  = bend?.Amount ?? 1;
     init_returns = bend?.BendReturns ?? false;
     Amount       = init_amount.ToString();
     Returns      = init_returns;
 }
Exemplo n.º 4
0
        public BendDrawingStrategy(Bend b, IBounds bounds, VisualInfo v_info, IDelegate del)
        {
            Bounds       = bounds;
            DrawDelegate = del;

            info = v_info;
            bend = b;
        }
Exemplo n.º 5
0
        public IEffect genEffect(CommandSelections selection)
        {
            IEffect effect = null;

            switch (selection.SelectedEffectType)
            {
            case EffectType.Bend:
                effect = Bend.createInstance(selection.BendAmount ?? .5, selection.Returns ?? false);
                break;

            case EffectType.Pinch_Harmonic:
                effect = PinchHarmonic.createInstance();
                break;

            case EffectType.Vibrato:
                effect = Vibrato.createInstance(selection.Wide ?? false);
                break;
            }
            selection.SelectedEffect = effect;
            return(effect);
        }
Exemplo n.º 6
0
 public override IEffect createEffect()
 {
     return(Bend.createInstance(Amount, Returns));
 }
Exemplo n.º 7
0
 public SimplifiedBend(Bend bend)
 {
     Amount  = bend.Amount;
     Returns = bend.BendReturns;
 }