-
-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Events for changing a chunk-event-list #41
Comments
Thomas, Do you want |
Yes, I think so. I yesterday did a test with binding: I added „..chunk.events.ToList()“ to the binding of a datagridview - the grid then shows 2 columns of the events: the type and the delta-time. But when I delete an entry of the events (from outside), the datagridview does not update.... I hope I could explane my needs 😉 |
Thanks for explanation! I think current implementation of For example, you read a MIDI file and want to use events collection of first track chunk as binding source for your var originalEvents = trackChunk.Events;
var bindableCollection = new BindingList<MidiEvent>(originalEvents.ToList()); Then use originalEvents.Clear();
originalEvents.AddRange(bindableCollection); Please let me know if it's worked. |
Sure, this will work, but.... I‘m currently working directly at the chunks and events from DryWetMIDI. I‘m also deleting, merging and creating new chunks. To use own collections means to use the chunks-classes only for serializing the midi file. That‘s a pity. And by the way: I‘m also using playback etc.... |
Although you've closed the issue, let me explain why you should create appropriate collections on your side. Different frameworks requires different interfaces to support changes notification. WinForms works with Also data binding is a concept related to MVVM, where there is a separation between data and UI. DryWetMIDI provides a layer that relates to data (model in terms of MVVM). Interaction with UI is absolutely up to user of the library. |
Would it be possible to implement an event-handling for changes in a event-list of a chunk?
I think for using the lists in a datagridview with data-binding this would be necessary.
Regards
Thomas
The text was updated successfully, but these errors were encountered: