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); }
public bool NewMapItemUI() { MapItemForm dlg = new MapItemForm(); if (dlg.ShowDialog(this) == DialogResult.OK) { AddMapItem(dlg.NoteInNumber, dlg.NoteOutNumber, dlg.ItemName); return(true); } return(false); }