Exemplo n.º 1
0
        private void ReloadButton_Click(object sender, EventArgs e)
        {
            // First grab the Track Filtering settings for our current track
            // Re-load the same midi track from file
            // And re-apply those settings

            // I don't think getting the settings is that easy but we'll try
            // Oh hey it can be.
            var data = trackSelectionManager.GetTrackSelectionData();

            player.LoadFile(currentTrackName);
            trackSelectionManager.SetTrackSelectionData(data);
            trackSelectionManager.SaveTrackManager();
            if (trackSelectionForm != null && !trackSelectionForm.IsDisposed && trackSelectionForm.IsHandleCreated) // Everything I can think to check
            {
                trackSelectionForm.Invoke((MethodInvoker) delegate { trackSelectionForm.Refresh(); });              // Invoking just in case this is on a diff thread somehow
            }
            Refresh();
        }