Exemplo n.º 1
0
        public bool EditMapItemUI()
        {
            MapItemForm dlg = new MapItemForm();

            MidiNoteMapItem item = Selected;

            if (item != null)
            {
                dlg.ItemName      = item.Name;
                dlg.NoteInNumber  = item.NoteInNumber;
                dlg.NoteOutNumber = item.NoteOutNumber;

                if (dlg.ShowDialog(this) == DialogResult.OK)
                {
                    item.Name          = dlg.ItemName;
                    item.NoteInNumber  = (byte)dlg.NoteInNumber;
                    item.NoteOutNumber = (byte)dlg.NoteOutNumber;

                    Refresh(item);

                    return(true);
                }
            }

            return(false);
        }
Exemplo n.º 2
0
        public bool NewMapItemUI()
        {
            MapItemForm dlg = new MapItemForm();

            if (dlg.ShowDialog(this) == DialogResult.OK)
            {
                AddMapItem(dlg.NoteInNumber, dlg.NoteOutNumber, dlg.ItemName);

                return(true);
            }

            return(false);
        }