private void RenderForm_FormClosing(object sender, FormClosingEventArgs e) { FormClosing -= RenderForm_FormClosing; if (player != null) { player.Dispose(); } }
private void Form1_FormClosing(object sender, FormClosingEventArgs e) { player.Dispose(); }
private void RenderWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) { Closing -= RenderWindow_Closing; player?.Dispose(); }
private void WindowOnClosing(object sender, System.ComponentModel.CancelEventArgs e) { player.Dispose(); }
private void VideoPlayerForm_FormClosing(object sender, FormClosingEventArgs e) { _player?.Dispose(); }