using System; using System.Linq; using JD.Application.View; using JD.Application.View.Actions; using JD.Interfaces.Player; using JD.Collections; using JD.Sequencers.Windowlesses; namespace JD.VideoPlayer.Project { public abstract class WaveControlledVideoPad : AbstractVideoPad { #region Properties public override IPlayerProvider PlayerProvider { set { var waveControl = PlayerProvider as WaveControl; if (waveControl != null) { waveControl.Selection.CollectionChanged -= Selection_CollectionChanged; } base.PlayerProvider = value; if (waveControl != null) { waveControl.Selection.CollectionChanged += Selection_CollectionChanged; } } } #endregion #region Private private void Selection_CollectionChanged(object sender, CollectionChangedEventArgs e) { if (e.Action != CollectionChangeAction.EndUpdated) return; UpdateConductors(); } #endregion } }