protected override void SavePlayerState() { if (this.playingItem != null) { if (!this.window.UriPlayer.IsPlaying) { ImpDatabase.FileClosed(this.playingItem); } else { ImpDatabase.FileClosed(this.playingItem, TimeSpan.FromSeconds(this.window.UriPlayer.Position), TimeSpan.FromSeconds(this.window.UriPlayer.Duration)); } } }