コード例 #1
0
 private void DeleteButtonClicked(object obj, EventArgs args)
 {
     if (view.NodeSelection.SelectedNode != null)
     {
         NoteTreeNode selected = (NoteTreeNode)view.NodeSelection.SelectedNode;
         store.RemoveNode(selected);
         clientActivated.DeleteRecord(selected.GetNote());
     }
 }
コード例 #2
0
    private void NoteContentEdited(object o, Gtk.EditedArgs args)
    {
        Logger.Write("content edited");
        NoteTreeNode node = store.GetNode(new TreePath(args.Path)) as NoteTreeNode;
        Note         note = node.GetNote();

        note.content = args.NewText;
        clientActivated.UpdateRecord(note);
    }
コード例 #3
0
        public EffectProperties(GuiCommandExecutor exec, NodeClick c, IEffect e, EffectPosition pos, NoteTreeNode f, NoteTreeNode s)
            : base(c, exec)
        {
            effect    = e;
            init_type = effect?.Type ?? EffectType.No_Type;
            position  = pos;

            first  = f;
            second = s;

            Types           = genValidEffectTypes();
            CurrentStrategy = createNewStrategy(init_type);
            CurrentType     = init_type.getMenuName();
        }
コード例 #4
0
        public NoteProperties(NoteTreeNode n, GuiCommandExecutor ex, NodeClick c)
            : base(c, ex)
        {
            note = n.getNote();

            String = note.String.ToString();
            Fret   = note.Fret.ToString();

            NoteTreeNode prev_note = ref_click.PartNode?.getPreviousNote(n) ?? null;
            NoteTreeNode next_note = ref_click.PartNode?.getNextNote(n) ?? null;

            IntoEffectProperties   = new EffectProperties(executor, ref_click, note.getEffectAtPosition(EffectPosition.Into), EffectPosition.Into, prev_note, n);
            StrikeEffectProperties = new EffectProperties(executor, ref_click, note.getEffectAtPosition(EffectPosition.Strike), EffectPosition.Strike, null, null);
            AfterEffectProperties  = new EffectProperties(executor, ref_click, note.getEffectAtPosition(EffectPosition.After), EffectPosition.After, n, next_note);
        }
コード例 #5
0
        public NodeClick createCombinedClick(NodeClick select_click)
        {
            NoteTreeNode init   = initial_click.NoteNodes.First();
            NoteTreeNode select = select_click.NoteNodes.First();

            if (init.getNote().Position.occursBefore(select.getNote().Position))
            {
                initial_click.NoteNodes.Add(select);
                return(initial_click);
            }
            else
            {
                select_click.NoteNodes.Add(init);
                return(select_click);
            }
        }
コード例 #6
0
        private TreeNode buildEffectNode(IEffect effect, NoteTreeNode parent)
        {
            if (parent is null)
            {
                return(null);
            }
            Note    note   = parent.getNote();
            IBounds bounds = parent.Bounds;

            if (effect is PalmMute)
            {
                return(buildPalmMute((PalmMute)effect, note, bounds));
            }
            if (effect is Bend)
            {
                return(buildBend((Bend)effect, note, bounds));
            }
            if (effect is PinchHarmonic)
            {
                return(buildPinchHarmonic((PinchHarmonic)effect, note, bounds));
            }
            if (effect is Vibrato)
            {
                return(buildVibrato((Vibrato)effect, note, bounds));
            }
            if (effect is Slide)
            {
                return(buildSlide((Slide)effect, note, bounds));
            }
            if (effect is HOPO)
            {
                return(buildHOPO((HOPO)effect, note, bounds));
            }
            if (effect is Tie)
            {
                return(buildTie((Tie)effect, note, bounds));
            }
            return(null);
        }
コード例 #7
0
 public SlideMenuStrategy(GuiCommandExecutor gui, NodeClick click, NoteTreeNode first, NoteTreeNode second, Slide init_slide)
     : base(gui, click, EffectType.Slide, first, second)
 {
     init_legato = init_slide?.Legato ?? false;
     legato      = init_legato;
 }
コード例 #8
0
 public MultiEffectMenuStrategy(GuiCommandExecutor gui, NodeClick click, EffectType type, NoteTreeNode first, NoteTreeNode second)
     : base(gui, click, type)
 {
     first_note  = first;
     second_note = second;
 }