/// <summary> /// Raises the PlaybackRequested event. /// </summary> private void RaisePlaybackRequested() { if (VideoDetailIndex >= 0 && VideoDetailIndex < Videos.Count) { TBDbDetailExtArgs e = new TBDbDetailExtArgs() { TMDbDetailExt = Videos[VideoDetailIndex], Cancel = true }; PlaybackRequested?.Invoke(this, e); if (!e.Cancel) // the form the control is an was requested to be closed.. { CloseForm(); // ..so close the form.. } } }
/// <summary> /// Raises the DeleteRequested event. /// </summary> private void RaiseDeleteRequested() { if (VideoDetailIndex >= 0 && VideoDetailIndex < Videos.Count) { TBDbDetailExtArgs e = new TBDbDetailExtArgs() { TMDbDetailExt = Videos[VideoDetailIndex] }; if (DeleteRequested != null) { DeleteRequested(this, e); if (!e.Cancel) { Videos.Remove(e.TMDbDetailExt); } } } }